forked from andreafabrizi/DNSProxy
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathMakefile
48 lines (37 loc) · 1.24 KB
/
Makefile
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
CC = gcc
CFLAGS = -O2 -Wall -W -pedantic -rdynamic -g
FLAG = -DTLS
CFLAGS += $(FLAG)
#CFLAGS = -std=c99
LIBS = -lcurl -lrt -lnghttp2 -lssl -lbrotlidec -lz -lcrypto -lpthread -lnghttp2
#LIBS += -lboost_system -lboost_system -lboost_thread
#LIBS += -lb64
#LIBS += -lpsl
#LIBS += -L/usr/local/lib
#TARGET = testflag
# with mutex
# gcc dnsp.c -W -lcurl -g -lpthread -rdynamic -lrt -lbrotlidec -o dnsp
# with semaphores
# gcc dnsp.c -W -lcurl -g -lpthread -rdynamic -lrt -o dnsp
# with threads
# gcc dnsp.c -DTLS -W -lcurl -g -lpthread -rdynamic -lrt -o dnsp
# asio, boost, nghttp, ssl
# gcc dnsp-h2.c -O2 -g -rdynamic -lcurl -lnghttp2 -lpthread -lssl -lboost_system -lboost_system -lboost_thread -lcrypto -lrt -lbrotlidec -w -o dnsp-h2
all : dnsp dnsp-h2
dnsp : dnsp.o
${CC} dnsp.o ${CFLAGS} ${LIBS} -w -o dnsp
dnsp.o : dnsp.c
${CC} -w -c dnsp.c
dnsp-h2 : dnsp-h2.o
${CC} encode.o decode.o dnsp-h2.o ${CFLAGS} ${LIBS} -g -w -o dnsp-h2
dnsp-h2.o : dnsp-h2.c
${CC} -w -g -c dnsp-h2.c
#${CC} librb64u.c encode.o decode.o base64.c dnsp-h2.c ${CFLAGS} ${LIBS} -w -o dnsp-h2
clean :
rm -v dnsp dnsp-h2 dnsp.o dnsp-h2.o
#$(TARGET): $(TARGET).c
# @echo "In Makefile: FLAG = <$(FLAG)>"
# $(CC) $(CFLAGS) $< -o $@
#
#clean:
# rm -f $(TARGET)