about summary refs log tree commit diff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 5fa2be0..498fd08 100644
--- a/Makefile
+++ b/Makefile
@@ -2,6 +2,7 @@ OBJS += cptc.o
 OBJS += main.o
 OBJS += requestHandler.o
 OBJS += downloadAvatar.o
+OBJS += root.o
 
 CFLAGS += $(shell curl-config --cflags)
 CFLAGS += -std=c11
@@ -12,10 +13,19 @@ RM = rm -f
 
 all: cptc
 
+utils/%:
+	make -C utils
+
+root.c: utils/convert README
+	echo "const char *CPTC_root = \"$$(cat README | utils/convert)\";" > $@
+
 cptc: $(OBJS)
 	$(CC) -o $@ $^ $(LDFLAGS)
 
 clean:
 	$(RM) cptc *.o
+	make -C utils clean
 
 cptc: $(OBJS)
+
+.PHONY: all utils clean