commit 2c51639edc91b4c50ef6d62e9372785916b0b8b4
parent 077c801be803a630a65b5e2ad980986fac7b4a83
Author: Wim Dupont <wim@wimdupont.com>
Date: Sun, 22 Dec 2024 21:25:39 +0100
updated config setup
Diffstat:
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/.gitignore b/.gitignore
@@ -1,2 +1,3 @@
*.o
cpc
+config.h
diff --git a/Makefile b/Makefile
@@ -8,9 +8,11 @@ MANPREFIX = ${PREFIX}/share/man
BIN = cpc
SRC = cpc.c
-OBJ = ${SRC:.c=.o} config.h
+OBJ = ${SRC:.c=.o}
MAN1 = ${BIN:=.1}
+${OBJ}: config.h
+
all: ${BIN}
LDFLAGS=-lcjson -lcurl
@@ -21,6 +23,9 @@ LDFLAGS=-lcjson -lcurl
cpc: ${OBJ}
${CC} -g -o $@ ${OBJ} ${LDFLAGS}
+config.h:
+ cp config.def.h $@
+
clean:
rm -f ${BIN} ${OBJ}
diff --git a/config.h b/config.def.h