fixed init
[anytun.git] / Makefile
blob5240a47e09902225d95b8aca23dcfc3818ccdd5b
1 C = gcc
2 CFLAGS = -g -Wall
3 CFLAGS += -DSOCKETS_NAMESPACE=sockets
4 CFLAGS += -DSOCKETS_NAMESPACE_STR='"sockets"'
5 C++ = g++
6 CCFLAGS = -g -Wall
7 CCFLAGS += -DSOCKETS_NAMESPACE=sockets
8 CCFLAGS += -DSOCKETS_NAMESPACE_STR='"sockets"'
9 LD = g++
10 LDFLAGS = -g -Wall -O2 -ldl -lpthread -lgcrypt -lboost_serialization
12 OPENVPNDEPS = openvpn/tun.o \
13 openvpn/error.o \
14 openvpn/socket.o \
15 openvpn/buffer.o \
16 openvpn/misc.o \
17 openvpn/manage.o \
18 openvpn/fdmisc.o \
19 openvpn/otime.o \
20 openvpn/options.o \
21 openvpn/mtu.o \
22 openvpn/plugin.o \
23 openvpn/sig.o \
24 openvpn/proxy.o \
25 openvpn/socks.o \
26 openvpn/status.o \
27 openvpn/event.o \
28 openvpn/route.o \
29 openvpn/helper.o \
30 openvpn/init.o \
31 openvpn/interval.o \
32 openvpn/base64.o \
33 openvpn/shaper.o \
34 openvpn/fragment.o
36 SOCKETDEPS = Sockets/libSockets.a
38 #Sockets/TcpSocket.o \
39 # Sockets/Socket.o \
40 # Sockets/Thread.o \
41 # Sockets/SocketHandler.o \
42 # Sockets/Ipv4Address.o \
43 # Sockets/Mutex.o \
44 # Sockets/SSLInitializer.o
47 OBJS = tunDevice.o \
48 packetSource.o \
49 buffer.o \
50 syncBuffer.o \
51 syncCommand.o \
52 syncRouteCommand.o \
53 syncRtpCommand.o \
54 syncConnectionCommand.o \
55 plainPacket.o \
56 encryptedPacket.o \
57 cipher.o \
58 authAlgo.o \
59 keyDerivation.o \
60 rtpSessionTable.o \
61 rtpSession.o \
62 anyrtpproxy/callIdQueue.o \
63 mpi.o \
64 cipherFactory.o \
65 authAlgoFactory.o \
66 keyDerivationFactory.o \
67 connectionList.o \
68 connectionParam.o \
69 networkAddress.o \
70 networkPrefix.o \
71 PracticalSocket.o \
72 router.o \
73 routingTable.o \
74 signalController.o \
75 syncSocket.o \
76 syncSocketHandler.o \
77 syncClientSocket.o \
78 syncQueue.o \
79 log.o \
80 options.o \
81 seqWindow.o \
82 $(OPENVPNDEPS) \
83 $(SOCKETDEPS)
85 ANYMUXOBJS = muxSocket.o \
86 anymuxOptions.o \
87 signalController.o \
88 log.o \
89 $(SOCKETDEPS)
91 ANYCTROBJS = log.o \
92 buffer.o \
93 keyDerivation.o \
94 mpi.o \
95 keyDerivationFactory.o \
96 networkAddress.o \
97 networkPrefix.o \
98 signalController.o \
99 connectionList.o \
100 connectionParam.o \
101 rtpSessionTable.o \
102 rtpSession.o \
103 anyrtpproxy/callIdQueue.o \
104 syncRtpCommand.o \
105 PracticalSocket.o \
106 anyctrOptions.o \
107 router.o \
108 routingTable.o \
109 seqWindow.o \
110 syncSocket.o \
111 syncSocketHandler.o \
112 syncClientSocket.o \
113 syncQueue.o \
114 syncBuffer.o \
115 syncCommand.o \
116 syncRouteCommand.o \
117 syncConnectionCommand.o \
118 $(SOCKETDEPS)
120 EXECUTABLE = anytun anytun-config anytun-controld anytun-showtables manpage
122 all: $(EXECUTABLE) libAnysync.a anyrtpproxy
124 anytun: $(OBJS) anytun.o
125 $(LD) $(OBJS) anytun.o -o $@ $(LDFLAGS)
127 anytun-showtables: $(OBJS) anytun-showtables.o
128 $(LD) $(OBJS) anytun-showtables.o -o $@ $(LDFLAGS)
130 anytun-config: $(ANYCTROBJS) anytun-config.o
131 $(LD) $(ANYCTROBJS) anytun-config.o -o $@ $(LDFLAGS)
133 anytun-controld: $(ANYMUXOBJS) anytun-controld.o
134 $(LD) $(ANYMUXOBJS) anytun-controld.o -o $@ $(LDFLAGS)
136 tunDevice.o: tunDevice.cpp tunDevice.h
137 $(C++) $(CCFLAGS) $< -c
139 Sockets/libSockets.a:
140 make --directory=./Sockets
142 packetSource.o: packetSource.cpp packetSource.h
143 $(C++) $(CCFLAGS) $< -c
145 buffer.o: buffer.cpp buffer.h
146 $(C++) $(CCFLAGS) $< -c
148 syncBuffer.o: syncBuffer.cpp syncBuffer.h
149 $(C++) $(CCFLAGS) $< -c
151 rtpSessionTable.o: rtpSessionTable.cpp rtpSessionTable.h
152 $(C++) $(CCFLAGS) $< -c
154 rtpSession.o: rtpSession.cpp rtpSession.h
155 $(C++) $(CCFLAGS) $< -c
157 plainPacket.o: plainPacket.cpp plainPacket.h buffer.h
158 $(C++) $(CCFLAGS) $< -c
160 encryptedPacket.o: encryptedPacket.cpp encryptedPacket.h buffer.h
161 $(C++) $(CCFLAGS) $< -c
163 cipher.o: cipher.cpp cipher.h buffer.h
164 $(C++) $(CCFLAGS) $< -c
166 muxSocket.o: muxSocket.cpp muxSocket.h
167 $(C++) $(CCFLAGS) $< -c
169 anymuxOptions.o: anymuxOptions.cpp anymuxOptions.h
170 $(C++) $(CCFLAGS) $< -c
172 anyctrOptions.o: anyctrOptions.cpp anyctrOptions.h
173 $(C++) $(CCFLAGS) $< -c
175 authAlgo.o: authAlgo.cpp authAlgo.h buffer.h
176 $(C++) $(CCFLAGS) $< -c
178 keyDerivation.o: keyDerivation.cpp keyDerivation.h
179 $(C++) $(CCFLAGS) $< -c
181 mpi.o: mpi.cpp mpi.h
182 $(C++) $(CCFLAGS) $< -c
184 cipherFactory.o: cipherFactory.cpp cipherFactory.h cipher.h
185 $(C++) $(CCFLAGS) $< -c
187 authAlgoFactory.o: authAlgoFactory.cpp authAlgoFactory.h authAlgo.h
188 $(C++) $(CCFLAGS) $< -c
190 keyDerivationFactory.o: keyDerivationFactory.cpp keyDerivationFactory.h keyDerivation.h
191 $(C++) $(CCFLAGS) $< -c
193 routingTable.o: routingTable.cpp routingTable.h
194 $(C++) $(CCFLAGS) $< -c
196 syncSocket.o: syncSocket.cpp syncSocket.h
197 $(C++) $(CCFLAGS) $< -c
199 syncSocketHandler.o: syncSocketHandler.cpp syncSocketHandler.h
200 $(C++) $(CCFLAGS) $< -c
202 syncCommand.o: syncCommand.cpp syncCommand.h
203 $(C++) $(CCFLAGS) $< -c
205 syncRouteCommand.o: syncRouteCommand.cpp syncRouteCommand.h
206 $(C++) $(CCFLAGS) $< -c
208 syncRtpCommand.o: syncRtpCommand.cpp syncRtpCommand.h
209 $(C++) $(CCFLAGS) $< -c
211 syncConnectionCommand.o: syncConnectionCommand.cpp syncConnectionCommand.h
212 $(C++) $(CCFLAGS) $< -c
214 syncClientSocket.o: syncClientSocket.cpp syncClientSocket.h
215 $(C++) $(CCFLAGS) $< -c
217 syncQueue.o: syncQueue.cpp syncQueue.h
218 $(C++) $(CCFLAGS) $< -c
220 signalController.o: signalController.cpp signalController.h
221 $(C++) $(CCFLAGS) $< -c
223 PracticalSocket.o: PracticalSocket.cpp PracticalSocket.h
224 $(C++) $(CCFLAGS) $< -c
226 log.o: log.cpp log.h
227 $(C++) $(CCFLAGS) $< -c
229 options.o: options.cpp options.h
230 $(C++) $(CCFLAGS) $< -c
232 seqWindow.o: seqWindow.cpp seqWindow.h
233 $(C++) $(CCFLAGS) $< -c
235 connectionList.o: connectionList.cpp connectionList.h
236 $(C++) $(CCFLAGS) $< -c
238 connectionParam.o: connectionParam.cpp connectionParam.h
239 $(C++) $(CCFLAGS) $< -c
241 networkPrefix.o: networkPrefix.cpp networkPrefix.h
242 $(C++) $(CCFLAGS) $< -c
244 networkAddress.o: networkAddress.cpp networkAddress.h
245 $(C++) $(CCFLAGS) $< -c
247 router.o: router.cpp router.h
248 $(C++) $(CCFLAGS) $< -c
250 anytun.o: anytun.cpp
251 $(C++) $(CCFLAGS) $< -c
253 anytun-showtables.o: anytun-showtables.cpp
254 $(C++) $(CCFLAGS) $< -c
256 anytun-config.o: anytun-config.cpp
257 $(C++) $(CCFLAGS) $< -c
259 anytun-controld.o: anytun-controld.cpp
260 $(C++) $(CCFLAGS) $< -c
262 cConnectionParam.o: cConnectionParam.cpp
263 $(C++) $(CCFLAGS) $< -c
265 libAnysync.a: $(OBJS)
266 ar cru $@ $(OBJS)
267 ranlib $@
269 anyrtpproxy: anytun
270 @cd anyrtpproxy ; make
272 distclean: clean
273 make --directory=$(CURDIR)/openvpn distclean
274 find -name *.o | xargs rm -f
275 rm -f config.sub config.guess
277 cleanall: clean
278 @cd man ; make clean
279 make --directory=$(CURDIR)/Sockets clean
280 make --directory=$(CURDIR)/openvpn clean
281 rm -f Sockets/libSockets.a Sockets/Sockets-config
283 clean:
284 rm -f *.o
285 rm -f $(EXECUTABLE)
286 rm -f -r doc/html/*
287 rm -f -r doc/latex/*
288 rm -f libAnysync.a
289 make --directory=$(CURDIR)/anyrtpproxy clean
291 manpage:
292 @cd man ; make
294 doxygen:
295 doxygen Doxyfile
297 ctags:
298 ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .