about summary refs log tree commit diff
path: root/Makefile
blob: 51f4f55e648c77c316532affa1cda9c4eefbae14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
OBJS += cptc.o
OBJS += downloadAvatar.o
OBJS += main.o
OBJS += requestHandler.o
OBJS += root.o

CFLAGS += $(shell curl-config --cflags)
CFLAGS += -std=c11

LDLIBS += $(shell curl-config --libs)
LDLIBS += -lcurl
LDLIBS += -lcpetpet
LDLIBS += -lhttpc
RM = rm -f

all: cptc

utils/convert:
	make -C utils

root.c: utils/convert README
	echo "const char *CPTC_root = \"$$(cat README | utils/convert)\";" > $@

cptc: $(OBJS)
	$(CC) $(LDFLAGS) $(OBJS) $(LDLIBS) -o $@

clean:
	$(RM) cptc root.c *.o
	make -C utils clean

cptc: $(OBJS)

.PHONY: all clean