1 TARGET
=$(shell uname
-s
)
4 CFLAGS
+= -DSOCKETS_NAMESPACE
=sockets
5 CFLAGS
+= -DSOCKETS_NAMESPACE_STR
='"sockets"'
8 CCFLAGS
+= -DSOCKETS_NAMESPACE
=sockets
9 CCFLAGS
+= -DSOCKETS_NAMESPACE_STR
='"sockets"'
11 LDFLAGS
= -g
-Wall
-O2
-lpthread
-lgcrypt
-lgpg-error
-lboost_serialization
13 ifeq ($(TARGET
),Linux
)
16 ifeq ($(TARGET
),OpenBSD
)
17 CCFLAGS
+= -I
/usr
/local
/include
18 LDFLAGS
+= -L
/usr
/local
/lib
22 OPENVPNDEPS
= openvpn
/tun.o \
46 SOCKETDEPS
= Sockets
/libSockets.a
48 #Sockets/TcpSocket.o \
51 # Sockets/SocketHandler.o \
52 # Sockets/Ipv4Address.o \
54 # Sockets/SSLInitializer.o
69 keyDerivationFactory.o \
85 syncConnectionCommand.o \
88 anyrtpproxy
/callIdQueue.o \
91 SYNCOBJS
= syncSocket.o \
96 ANYCTROBJS
= anyCtrSocket.o \
102 ANYCONFOBJS
= log.o \
106 keyDerivationFactory.o \
114 anyrtpproxy
/callIdQueue.o \
122 syncSocketHandler.o \
128 syncConnectionCommand.o \
131 EXECUTABLE
= anytun anytun-config anytun-controld anytun-showtables manpage
133 all: $(EXECUTABLE
) libAnysync.a anyrtpproxy
135 anytun
: $(OBJS
) $(SYNCOBJS
) anytun.o
136 $(LD
) $(OBJS
) $(SYNCOBJS
) anytun.o
-o
$@
$(LDFLAGS
)
138 anytun-nosync
: $(OBJS
) anytun-nosync.o
139 $(LD
) $(OBJS
) anytun-nosync.o
-o
$@
$(LDFLAGS
)
141 anytun-showtables
: $(OBJS
) anytun-showtables.o
142 $(LD
) $(OBJS
) anytun-showtables.o
-o
$@
$(LDFLAGS
)
144 anytun-config
: $(ANYCONFOBJS
) anytun-config.o
145 $(LD
) $(ANYCONFOBJS
) anytun-config.o
-o
$@
$(LDFLAGS
)
147 anytun-controld
: $(ANYCTROBJS
) anytun-controld.o
148 $(LD
) $(ANYCTROBJS
) anytun-controld.o
-o
$@
$(LDFLAGS
)
150 tunDevice.o
: tunDevice.
cpp tunDevice.h
151 $(C
++) $(CCFLAGS
) $< -c
153 Sockets
/libSockets.a
:
154 $(MAKE
) --directory
=.
/Sockets
156 packetSource.o
: packetSource.
cpp packetSource.h
157 $(C
++) $(CCFLAGS
) $< -c
159 buffer.o
: buffer.
cpp buffer.h
160 $(C
++) $(CCFLAGS
) $< -c
162 syncBuffer.o
: syncBuffer.
cpp syncBuffer.h
163 $(C
++) $(CCFLAGS
) $< -c
165 rtpSessionTable.o
: rtpSessionTable.
cpp rtpSessionTable.h
166 $(C
++) $(CCFLAGS
) $< -c
168 rtpSession.o
: rtpSession.
cpp rtpSession.h
169 $(C
++) $(CCFLAGS
) $< -c
171 plainPacket.o
: plainPacket.
cpp plainPacket.h buffer.h
172 $(C
++) $(CCFLAGS
) $< -c
174 encryptedPacket.o
: encryptedPacket.
cpp encryptedPacket.h buffer.h
175 $(C
++) $(CCFLAGS
) $< -c
177 cipher.o
: cipher.
cpp cipher.h buffer.h
178 $(C
++) $(CCFLAGS
) $< -c
180 anyCtrSocket.o
: anyCtrSocket.
cpp anyCtrSocket.h
181 $(C
++) $(CCFLAGS
) $< -c
183 anyCtrOptions.o
: anyCtrOptions.
cpp anyCtrOptions.h
184 $(C
++) $(CCFLAGS
) $< -c
186 anyConfOptions.o
: anyConfOptions.
cpp anyConfOptions.h
187 $(C
++) $(CCFLAGS
) $< -c
189 authAlgo.o
: authAlgo.
cpp authAlgo.h buffer.h
190 $(C
++) $(CCFLAGS
) $< -c
192 keyDerivation.o
: keyDerivation.
cpp keyDerivation.h
193 $(C
++) $(CCFLAGS
) $< -c
196 $(C
++) $(CCFLAGS
) $< -c
198 cipherFactory.o
: cipherFactory.
cpp cipherFactory.h cipher.h
199 $(C
++) $(CCFLAGS
) $< -c
201 authAlgoFactory.o
: authAlgoFactory.
cpp authAlgoFactory.h authAlgo.h
202 $(C
++) $(CCFLAGS
) $< -c
204 keyDerivationFactory.o
: keyDerivationFactory.
cpp keyDerivationFactory.h keyDerivation.h
205 $(C
++) $(CCFLAGS
) $< -c
207 routingTable.o
: routingTable.
cpp routingTable.h
208 $(C
++) $(CCFLAGS
) $< -c
210 syncSocket.o
: syncSocket.
cpp syncSocket.h
211 $(C
++) $(CCFLAGS
) $< -c
213 syncSocketHandler.o
: syncSocketHandler.
cpp syncSocketHandler.h
214 $(C
++) $(CCFLAGS
) $< -c
216 syncCommand.o
: syncCommand.
cpp syncCommand.h
217 $(C
++) $(CCFLAGS
) $< -c
219 syncRouteCommand.o
: syncRouteCommand.
cpp syncRouteCommand.h
220 $(C
++) $(CCFLAGS
) $< -c
222 syncRtpCommand.o
: syncRtpCommand.
cpp syncRtpCommand.h
223 $(C
++) $(CCFLAGS
) $< -c
225 syncConnectionCommand.o
: syncConnectionCommand.
cpp syncConnectionCommand.h
226 $(C
++) $(CCFLAGS
) $< -c
228 syncClientSocket.o
: syncClientSocket.
cpp syncClientSocket.h
229 $(C
++) $(CCFLAGS
) $< -c
231 syncQueue.o
: syncQueue.
cpp syncQueue.h
232 $(C
++) $(CCFLAGS
) $< -c
234 signalController.o
: signalController.
cpp signalController.h
235 $(C
++) $(CCFLAGS
) $< -c
237 PracticalSocket.o
: PracticalSocket.
cpp PracticalSocket.h
238 $(C
++) $(CCFLAGS
) $< -c
241 $(C
++) $(CCFLAGS
) $< -c
243 options.o
: options.
cpp options.h
244 $(C
++) $(CCFLAGS
) $< -c
246 seqWindow.o
: seqWindow.
cpp seqWindow.h
247 $(C
++) $(CCFLAGS
) $< -c
249 connectionList.o
: connectionList.
cpp connectionList.h
250 $(C
++) $(CCFLAGS
) $< -c
252 connectionParam.o
: connectionParam.
cpp connectionParam.h
253 $(C
++) $(CCFLAGS
) $< -c
255 networkPrefix.o
: networkPrefix.
cpp networkPrefix.h
256 $(C
++) $(CCFLAGS
) $< -c
258 networkAddress.o
: networkAddress.
cpp networkAddress.h
259 $(C
++) $(CCFLAGS
) $< -c
261 router.o
: router.
cpp router.h
262 $(C
++) $(CCFLAGS
) $< -c
265 $(C
++) $(CCFLAGS
) $< -c
267 anytun-nosync.o
: anytun.
cpp
268 $(C
++) $(CCFLAGS
) -DANYTUN_NOSYNC
$< -c
-o anytun-nosync.o
270 anytun-showtables.o
: anytun-showtables.
cpp
271 $(C
++) $(CCFLAGS
) $< -c
273 anytun-config.o
: anytun-config.
cpp
274 $(C
++) $(CCFLAGS
) $< -c
276 anytun-controld.o
: anytun-controld.
cpp
277 $(C
++) $(CCFLAGS
) $< -c
279 cConnectionParam.o
: cConnectionParam.
cpp
280 $(C
++) $(CCFLAGS
) $< -c
282 libAnysync.a
: $(OBJS
)
287 @cd anyrtpproxy
; $(MAKE
)
290 $(MAKE
) --directory
=$(CURDIR
)/openvpn
distclean
291 find .
-name
*.o
-exec
rm -f
{} \
;
292 rm -f config.sub config.guess
295 $(MAKE
) --directory
=$(CURDIR
)/man
clean
296 $(MAKE
) --directory
=$(CURDIR
)/Sockets
clean
297 $(MAKE
) --directory
=$(CURDIR
)/openvpn
clean
298 rm -f Sockets
/libSockets.a Sockets
/Sockets-config
307 $(MAKE
) --directory
=$(CURDIR
)/anyrtpproxy
clean
316 ctags
-R
--c
++-kinds
=+p
--fields
=+iaS
--extra
=+q .