Lines 1-110
Link Here
|
1 |
--- src/makefiles/freebsd_32bit.mak.orig 2016-04-24 14:49:31 UTC |
|
|
2 |
+++ src/makefiles/freebsd_32bit.mak |
3 |
@@ -25,19 +25,19 @@ |
4 |
|
5 |
#CC=gcc |
6 |
|
7 |
-OPTIONS_COMPILE_DEBUG=-D_DEBUG -DDEBUG -DUNIX -DUNIX_BSD -DBRIDGE_BPF -DNO_VLAN -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -I/usr/local/include -I/usr/include -g -fsigned-char |
8 |
+OPTIONS_COMPILE_DEBUG=-D_DEBUG -DDEBUG -DUNIX -DUNIX_BSD -DBRIDGE_BPF -DNO_VLAN -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -g -fsigned-char |
9 |
|
10 |
-OPTIONS_LINK_DEBUG=-g -fsigned-char -L/usr/local/lib -L/usr/lib -lm -lpthread -lssl -lcrypto -liconv -lreadline -lncurses -lz |
11 |
+OPTIONS_LINK_DEBUG=-g -fsigned-char -lm -lpthread -lssl -lcrypto ${ICONV_LIB} -lreadline -lncurses -lz |
12 |
|
13 |
-OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_BSD -DBRIDGE_BPF -DNO_VLAN -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -I/usr/local/include -I/usr/include -O2 -fsigned-char |
14 |
+OPTIONS_COMPILE_RELEASE=-DNDEBUG -DVPN_SPEED -DUNIX -DUNIX_BSD -DBRIDGE_BPF -DNO_VLAN -D_REENTRANT -DREENTRANT -D_THREAD_SAFE -D_THREADSAFE -DTHREAD_SAFE -DTHREADSAFE -D_FILE_OFFSET_BITS=64 -I./src/ -I./src/Cedar/ -I./src/Mayaqua/ -fsigned-char ${CFLAGS} |
15 |
|
16 |
-OPTIONS_LINK_RELEASE=-O2 -fsigned-char -L/usr/local/lib -L/usr/lib -lm -lpthread -lssl -lcrypto -liconv -lreadline -lncurses -lz |
17 |
+OPTIONS_LINK_RELEASE=-fsigned-char ${LDFLAGS} ${LIBS} -lm -lpthread -lssl -lcrypto ${ICONV_LIB} -lreadline -lncurses -lz |
18 |
|
19 |
-INSTALL_BINDIR=/usr/bin/ |
20 |
-INSTALL_VPNSERVER_DIR=/usr/vpnserver/ |
21 |
-INSTALL_VPNBRIDGE_DIR=/usr/vpnbridge/ |
22 |
-INSTALL_VPNCLIENT_DIR=/usr/vpnclient/ |
23 |
-INSTALL_VPNCMD_DIR=/usr/vpncmd/ |
24 |
+INSTALL_BINDIR=${PREFIX}/sbin/ |
25 |
+INSTALL_VPNSERVER_DIR=${PREFIX}/softethervpn/vpnserver/ |
26 |
+INSTALL_VPNBRIDGE_DIR=${PREFIX}/softethervpn/vpnbridge/ |
27 |
+INSTALL_VPNCLIENT_DIR=${PREFIX}/softethervpn/vpnclient/ |
28 |
+INSTALL_VPNCMD_DIR=${PREFIX}/softethervpn/vpncmd/ |
29 |
|
30 |
ifeq ($(DEBUG),YES) |
31 |
OPTIONS_COMPILE=$(OPTIONS_COMPILE_DEBUG) |
32 |
@@ -379,7 +379,7 @@ tmp/objs/vpncmd.o: src/vpncmd/vpncmd.c $ |
33 |
$(CC) $(OPTIONS_COMPILE) -c src/vpncmd/vpncmd.c -o tmp/objs/vpncmd.o |
34 |
|
35 |
# Install |
36 |
-install: $(INSTALL_BINDIR)vpnserver $(INSTALL_BINDIR)vpnbridge $(INSTALL_BINDIR)vpnclient $(INSTALL_BINDIR)vpncmd |
37 |
+install: $(STAGEDIR)$(INSTALL_BINDIR)vpnserver $(STAGEDIR)$(INSTALL_BINDIR)vpnbridge $(STAGEDIR)$(INSTALL_BINDIR)vpnclient $(STAGEDIR)$(INSTALL_BINDIR)vpncmd |
38 |
@echo |
39 |
@echo "--------------------------------------------------------------------" |
40 |
@echo "Installation completed successfully." |
41 |
@@ -391,41 +391,37 @@ install: $(INSTALL_BINDIR)vpnserver $(IN |
42 |
@echo "--------------------------------------------------------------------" |
43 |
@echo |
44 |
|
45 |
-$(INSTALL_BINDIR)vpnserver: bin/vpnserver/hamcore.se2 bin/vpnserver/vpnserver |
46 |
- @mkdir -p $(INSTALL_VPNSERVER_DIR) |
47 |
- cp bin/vpnserver/hamcore.se2 $(INSTALL_VPNSERVER_DIR)hamcore.se2 |
48 |
- cp bin/vpnserver/vpnserver $(INSTALL_VPNSERVER_DIR)vpnserver |
49 |
- echo "#!/bin/sh" > $(INSTALL_BINDIR)vpnserver |
50 |
- echo $(INSTALL_VPNSERVER_DIR)vpnserver '"$$@"' >> $(INSTALL_BINDIR)vpnserver |
51 |
- echo 'exit $$?' >> $(INSTALL_BINDIR)vpnserver |
52 |
- chmod 755 $(INSTALL_BINDIR)vpnserver |
53 |
+$(STAGEDIR)$(INSTALL_BINDIR)vpnserver: bin/vpnserver/hamcore.se2 bin/vpnserver/vpnserver |
54 |
+ @mkdir -p $(STAGEDIR)$(INSTALL_VPNSERVER_DIR) |
55 |
+ cp bin/vpnserver/hamcore.se2 $(STAGEDIR)$(INSTALL_VPNSERVER_DIR)hamcore.se2 |
56 |
+ $(BSD_INSTALL_PROGRAM) bin/vpnserver/vpnserver $(STAGEDIR)$(INSTALL_VPNSERVER_DIR)vpnserver |
57 |
+ echo "#!/bin/sh" > $(STAGEDIR)$(INSTALL_BINDIR)vpnserver |
58 |
+ echo exec $(INSTALL_VPNSERVER_DIR)vpnserver '"$$@"' >> $(STAGEDIR)$(INSTALL_BINDIR)vpnserver |
59 |
+ chmod 755 $(STAGEDIR)$(INSTALL_BINDIR)vpnserver |
60 |
|
61 |
-$(INSTALL_BINDIR)vpnbridge: bin/vpnbridge/hamcore.se2 bin/vpnbridge/vpnbridge |
62 |
- @mkdir -p $(INSTALL_VPNBRIDGE_DIR) |
63 |
- cp bin/vpnbridge/hamcore.se2 $(INSTALL_VPNBRIDGE_DIR)hamcore.se2 |
64 |
- cp bin/vpnbridge/vpnbridge $(INSTALL_VPNBRIDGE_DIR)vpnbridge |
65 |
- echo "#!/bin/sh" > $(INSTALL_BINDIR)vpnbridge |
66 |
- echo $(INSTALL_VPNBRIDGE_DIR)vpnbridge '"$$@"' >> $(INSTALL_BINDIR)vpnbridge |
67 |
- echo 'exit $$?' >> $(INSTALL_BINDIR)vpnbridge |
68 |
- chmod 755 $(INSTALL_BINDIR)vpnbridge |
69 |
+$(STAGEDIR)$(INSTALL_BINDIR)vpnbridge: bin/vpnbridge/hamcore.se2 bin/vpnbridge/vpnbridge |
70 |
+ @mkdir -p $(STAGEDIR)$(INSTALL_VPNBRIDGE_DIR) |
71 |
+ cp bin/vpnbridge/hamcore.se2 $(STAGEDIR)$(INSTALL_VPNBRIDGE_DIR)hamcore.se2 |
72 |
+ $(BSD_INSTALL_PROGRAM) bin/vpnbridge/vpnbridge $(STAGEDIR)$(INSTALL_VPNBRIDGE_DIR)vpnbridge |
73 |
+ echo "#!/bin/sh" > $(STAGEDIR)$(INSTALL_BINDIR)vpnbridge |
74 |
+ echo exec $(INSTALL_VPNBRIDGE_DIR)vpnbridge '"$$@"' >> $(STAGEDIR)$(INSTALL_BINDIR)vpnbridge |
75 |
+ chmod 755 $(STAGEDIR)$(INSTALL_BINDIR)vpnbridge |
76 |
|
77 |
-$(INSTALL_BINDIR)vpnclient: bin/vpnclient/hamcore.se2 bin/vpnclient/vpnclient |
78 |
- @mkdir -p $(INSTALL_VPNCLIENT_DIR) |
79 |
- cp bin/vpnclient/hamcore.se2 $(INSTALL_VPNCLIENT_DIR)hamcore.se2 |
80 |
- cp bin/vpnclient/vpnclient $(INSTALL_VPNCLIENT_DIR)vpnclient |
81 |
- echo "#!/bin/sh" > $(INSTALL_BINDIR)vpnclient |
82 |
- echo $(INSTALL_VPNCLIENT_DIR)vpnclient '"$$@"' >> $(INSTALL_BINDIR)vpnclient |
83 |
- echo 'exit $$?' >> $(INSTALL_BINDIR)vpnclient |
84 |
- chmod 755 $(INSTALL_BINDIR)vpnclient |
85 |
+$(STAGEDIR)$(INSTALL_BINDIR)vpnclient: bin/vpnclient/hamcore.se2 bin/vpnclient/vpnclient |
86 |
+ @mkdir -p $(STAGEDIR)$(INSTALL_VPNCLIENT_DIR) |
87 |
+ cp bin/vpnclient/hamcore.se2 $(STAGEDIR)$(INSTALL_VPNCLIENT_DIR)hamcore.se2 |
88 |
+ $(BSD_INSTALL_PROGRAM) bin/vpnclient/vpnclient $(STAGEDIR)$(INSTALL_VPNCLIENT_DIR)vpnclient |
89 |
+ echo "#!/bin/sh" > $(STAGEDIR)$(INSTALL_BINDIR)vpnclient |
90 |
+ echo exec $(INSTALL_VPNCLIENT_DIR)vpnclient '"$$@"' >> $(STAGEDIR)$(INSTALL_BINDIR)vpnclient |
91 |
+ chmod 755 $(STAGEDIR)$(INSTALL_BINDIR)vpnclient |
92 |
|
93 |
-$(INSTALL_BINDIR)vpncmd: bin/vpncmd/hamcore.se2 bin/vpncmd/vpncmd |
94 |
- @mkdir -p $(INSTALL_VPNCMD_DIR) |
95 |
- cp bin/vpncmd/hamcore.se2 $(INSTALL_VPNCMD_DIR)hamcore.se2 |
96 |
- cp bin/vpncmd/vpncmd $(INSTALL_VPNCMD_DIR)vpncmd |
97 |
- echo "#!/bin/sh" > $(INSTALL_BINDIR)vpncmd |
98 |
- echo $(INSTALL_VPNCMD_DIR)vpncmd '"$$@"' >> $(INSTALL_BINDIR)vpncmd |
99 |
- echo 'exit $$?' >> $(INSTALL_BINDIR)vpncmd |
100 |
- chmod 755 $(INSTALL_BINDIR)vpncmd |
101 |
+$(STAGEDIR)$(INSTALL_BINDIR)vpncmd: bin/vpncmd/hamcore.se2 bin/vpncmd/vpncmd |
102 |
+ @mkdir -p $(STAGEDIR)$(INSTALL_VPNCMD_DIR) |
103 |
+ cp bin/vpncmd/hamcore.se2 $(STAGEDIR)$(INSTALL_VPNCMD_DIR)hamcore.se2 |
104 |
+ $(BSD_INSTALL_PROGRAM) bin/vpncmd/vpncmd $(STAGEDIR)$(INSTALL_VPNCMD_DIR)vpncmd |
105 |
+ echo "#!/bin/sh" > $(STAGEDIR)$(INSTALL_BINDIR)vpncmd |
106 |
+ echo exec $(INSTALL_VPNCMD_DIR)vpncmd '"$$@"' >> $(STAGEDIR)$(INSTALL_BINDIR)vpncmd |
107 |
+ chmod 755 $(STAGEDIR)$(INSTALL_BINDIR)vpncmd |
108 |
|
109 |
# Clean |
110 |
clean: |