-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
58 lines (42 loc) · 1.33 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
48
49
50
51
52
53
54
55
56
57
CC=gcc
CXX=g++
RM=rm -f
CCFLAGS=-Wall -Wextra -std=gnu11 -pedantic -g -O2 -DDEBUG
CXXFLAGS=-Wall -Wextra -std=c++11 -pedantic -g -O2 -DDEBUG
spaclient_OBJS=spaclient.o
spaclient_CCFLAGS=
spaclient_LDFLAGS=
spaclient_LIBS=-lcrypto
pkclient_OBJS=pkclient.o
pkclient_CCFLAGS=
pkclient_LDFLAGS=
pkclient_LIBS=-lcrypto
spaserver_OBJS=spamain.o Config.o SpaConfig.o NFQ.o Listener.o Signals.o \
PKConfig.o PKListener.o spc_sanitize.o logmsg.o Logmsg.o \
drop_priv.o
spaserver_CXXFLAGS=-IREMAP/linux-2.6.20.7/include \
`libgcrypt-config --cflags` \
`pkg-config --cflags libxml++-2.6`
spaserver_LDFLAGS=-L/usr/local/lib
spaserver_LIBS=`libgcrypt-config --libs` `pkg-config --libs libxml++-2.6` \
-lnetfilter_queue
.PHONY: all clean distclean depend
all: spaclient spaserver pkclient
pkclient: ${pkclient_OBJS}
${CC} -o $@ $^ ${LDFLAGS} ${pkclient_LDFLAGS} ${pkclient_LIBS}
spaclient: ${spaclient_OBJS}
${CC} -o $@ $^ ${LDFLAGS} ${spaclient_LDFLAGS} ${spaclient_LIBS}
spaserver: ${spaserver_OBJS}
${CXX} -o $@ $^ ${LDFLAGS} ${spaserver_LDFLAGS} ${spaserver_LIBS}
%.o: %.c
${CC} -c ${CCFLAGS} ${spaclient_CCFLAGS} $<
%.o: %.cpp
${CXX} -c ${CXXFLAGS} ${spaserver_CXXFLAGS} $<
clean:
${RM} a.out *.o *~
distclean: clean
${RM} spaclient spaserver .depend
depend:
${CC} -MM *.c *.cpp >.depend
# dependencies
-include .depend