-
Notifications
You must be signed in to change notification settings - Fork 252
/
Makefile.Darwin
62 lines (40 loc) · 1.53 KB
/
Makefile.Darwin
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
58
59
60
61
CFLAGS=-O2 -I./src -I./libs -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1
CLI_LDFLAGS=-L/usr/lib -pthread
GNB_ES_LDFLAGS=-L/usr/lib -pthread
GNB_CRYPTO=gnb_crypto
GNB_CTL=gnb_ctl
GNB_ES=gnb_es
GNB_CLI=gnb
include Makefile.inc
GNB_CLI_OBJS = \
./src/cli/gnb.o \
./src/gnb_argv.o \
./src/unix/unix_platform.o \
./src/Darwin/gnb_drv_darwin.o
GNB_ES_OBJS += ./src/unix/unix_platform.o
all:${GNB_CLI} ${GNB_CRYPTO} ${GNB_ES} ${GNB_CTL}
${GNB_CTL}: ${GNB_CTL_OBJS}
${CC} -o ${GNB_CTL} ${GNB_CTL_OBJS} ${CLI_LDFLAGS}
strip ${GNB_CTL}
${GNB_ES}: ${GNB_ES_OBJS} ${CRYPTO_OBJS} ${MINIUPNP_OBJS} ${LIBNATPMP_OBJS}
${CC} -o ${GNB_ES} ${GNB_ES_OBJS} ${CRYPTO_OBJS} ${MINIUPNP_OBJS} ${LIBNATPMP_OBJS} ${GNB_ES_LDFLAGS}
strip ${GNB_ES}
${GNB_CRYPTO}: ${CRYPTO_OBJS} ./src/cli/gnb_crypto.o
${CC} -o ${GNB_CRYPTO} ./src/cli/gnb_crypto.o ${CRYPTO_OBJS} ${CLI_LDFLAGS}
strip ${GNB_CRYPTO}
${GNB_CLI}: ${GNB_OBJS} ${GNB_CLI_OBJS} ${GNB_PF_OBJS} ${CRYPTO_OBJS} ${ZLIB_OBJS}
${CC} -o ${GNB_CLI} ${GNB_OBJS} ${GNB_CLI_OBJS} ${GNB_PF_OBJS} ${CRYPTO_OBJS} ${ZLIB_OBJS} ${CLI_LDFLAGS}
strip ${GNB_CLI}
%.o:%.c
${CC} ${CFLAGS} -c -o $@ $<
install:${GNB_CLI} ${GNB_CRYPTO} ${GNB_ES} ${GNB_CTL}
mkdir -p ./bin/
cp ${GNB_CLI} ./bin/
cp ${GNB_CTL} ./bin/
cp ${GNB_CRYPTO} ./bin/
cp ${GNB_ES} ./bin/
clean:
find . -name "*.o" -exec rm -f {} \;
rm -f ${GNB_CLI} ${GNB_CRYPTO} ${GNB_ES} ${GNB_CTL}
rm -f core
rm -f *.exe