build: Make builds more modular

Signed-off-by: Chloe M. <chloe@mensia.org>
This commit is contained in:
Chloe M.
2026-06-28 01:29:09 +00:00
parent 6424cb799e
commit 7863389486
3 changed files with 40 additions and 20 deletions
+23
View File
@@ -0,0 +1,23 @@
#
# Copyright (c) 2026, Chloe M.
# Provided under the BSD-3 clause
#
# Description: CUMHOLE build script
# Author: Chloe M.
#
include ../mk/global.mk
.SILENT:
CFILES = $(shell find . -name "*.c")
OFILES = $(CFILES:.c=.o)
.PHONY: all
all: ../hole
.PHONY: hole
../hole: $(OFILES)
$(CC) $^ -o $@
%.o: %.c
$(CC) -c $(CFLAGS) $< -o $@