aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKrow Savcik <krow@savcik.xyz>2024-01-11 15:29:47 +0200
committerKrow Savcik <krow@savcik.xyz>2024-01-11 15:29:47 +0200
commit0df2d329d9ec3458d8f6d80b5937ad92722da940 (patch)
tree6f72d1e7345a63214e9fdd3176f276793d5ed911 /Makefile
parente19d0f9124f09df0c37038d422db79d841e3763c (diff)
added: config.def.h
Now the default configuration is in config.def.h Before compiling for the first time, config.h is created.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index ba33b3c..b3eccec 100644
--- a/Makefile
+++ b/Makefile
@@ -3,11 +3,12 @@ include config.mk
TOBJ = ui.o canvas.o user.o palette.o tools.o debug.o
OBJ = $(addprefix build/, ${TOBJ})
-all: build run
-
-build: ${OBJ} src/cdraw.c
+build: prep config.h ${OBJ} src/cdraw.c
${CC} ${CFLAGS} ${LIBS} ${OBJ} src/cdraw.c -o build/cdraw
+config.h:
+ cp config.def.h config.h
+
prep:
mkdir -p build
@@ -20,3 +21,5 @@ build/%.o: src/%.c
clean:
rm $(OBJ)
rm build/cdraw
+
+.PHONY: build clean run prep