-
Notifications
You must be signed in to change notification settings - Fork 253
/
Makefile.mingw_x86_64
64 lines (40 loc) · 1.96 KB
/
Makefile.mingw_x86_64
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
62
63
CFLAGS=-O2 -I./src -I/usr/x86_64-w64-mingw32/include -I./libs -I./libs/wintun -I./libs/miniupnpc -I./libs/libnatpmp -I./libs/zlib -D NO_GZIP=1 -DMINIUPNP_STATICLIB -DNATPMP_STATICLIB
CLI_LDFLAGS=-s -static -L/usr/x86_64-w64-mingw32/lib/ -lwsock32 -lws2_32 -liphlpapi -lpthread -lmingwex
GNB_ES_LDFLAGS=-s -static -L/usr/x86_64-w64-mingw32/lib/ -lwsock32 -lws2_32 -liphlpapi -lpthread -lmingwex
GNB_CRYPTO=gnb_crypto.exe
GNB_CTL=gnb_ctl.exe
GNB_ES=gnb_es.exe
GNB_CLI=gnb.exe
include Makefile.inc
GNB_CLI_OBJS = \
./src/cli/gnb.o \
./src/gnb_argv.o \
./src/mingw/gnb_res.o \
./src/mingw/windows_platform.o \
./src/mingw/gnb_drv_win32.o \
./src/mingw/gnb_drv_wintun.o
GNB_ES_OBJS += ./src/mingw/windows_platform.o
all:${GNB_CLI} ${GNB_CRYPTO} ${GNB_ES} ${GNB_CTL}
${GNB_CTL}: ${GNB_CTL_OBJS} ./src/mingw/gnb_res.o
${CC} -o ${GNB_CTL} ${GNB_CTL_OBJS} ./src/mingw/gnb_res.o ${CLI_LDFLAGS}
${GNB_ES}: ${GNB_ES_OBJS} ${CRYPTO_OBJS} ${MINIUPNP_OBJS} ${LIBNATPMP_OBJS}
${CC} -o ${GNB_ES} ${GNB_ES_OBJS} ${CRYPTO_OBJS} ${MINIUPNP_OBJS} ${LIBNATPMP_OBJS} ./src/mingw/gnb_res.o ${GNB_ES_LDFLAGS}
$(GNB_CRYPTO): $(CRYPTO_OBJS) ./src/cli/gnb_crypto.o
${CC} -o ${GNB_CRYPTO} ./src/cli/gnb_crypto.o ${CRYPTO_OBJS} ${CLI_LDFLAGS}
${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}
%.o:%.c
${CC} ${CFLAGS} -c -o $@ $<
./src/mingw/gnb_res.o: ./src/mingw/gnb_res.rc
${WINDRES} ./src/mingw/gnb_res.rc -o ./src/mingw/gnb_res.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