From 34fc96bd1451d6f8dfa1add742dab6e5269ec411 Mon Sep 17 00:00:00 2001 From: Nakidai Date: Fri, 27 Sep 2024 19:17:40 +0300 Subject: Autogenerate root on build --- Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Makefile') 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 -- cgit 1.4.1