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
)
14 # CFLAGS += -D_XOPEN_SOURCE=600
15 # CCFLAGS += -D_XOPEN_SOURCE=600
18 ifeq ($(TARGET
),OpenBSD
)
19 CCFLAGS
+= -I
/usr
/local
/include
20 LDFLAGS
+= -L
/usr
/local
/lib
24 OPENVPNDEPS
= openvpn
/tun.o \
49 SOCKETDEPS
= Sockets
/libSockets.a
51 #Sockets/TcpSocket.o \
54 # Sockets/SocketHandler.o \
55 # Sockets/Ipv4Address.o \
57 # Sockets/SSLInitializer.o
72 keyDerivationFactory.o \
88 syncConnectionCommand.o \
91 anyrtpproxy
/callIdQueue.o \
94 SYNCOBJS
= syncSocket.o \
99 ANYCTROBJS
= anyCtrSocket.o \
105 ANYCONFOBJS
= log.o \
109 keyDerivationFactory.o \
117 anyrtpproxy
/callIdQueue.o \
125 syncSocketHandler.o \
131 syncConnectionCommand.o \
134 EXECUTABLE
= anytun anytun-config anytun-controld anytun-showtables manpage
136 all: $(EXECUTABLE
) libAnysync.a anyrtpproxy
138 anytun
: $(OBJS
) $(SYNCOBJS
) anytun.o
139 $(LD
) $(OBJS
) $(SYNCOBJS
) anytun.o
-o
$@
$(LDFLAGS
)
141 anytun-nosync
: $(OBJS
) anytun-nosync.o
142 $(LD
) $(OBJS
) anytun-nosync.o
-o
$@
$(LDFLAGS
)
144 anytun-showtables
: $(OBJS
) anytun-showtables.o
145 $(LD
) $(OBJS
) anytun-showtables.o
-o
$@
$(LDFLAGS
)
147 anytun-config
: $(ANYCONFOBJS
) anytun-config.o
148 $(LD
) $(ANYCONFOBJS
) anytun-config.o
-o
$@
$(LDFLAGS
)
150 anytun-controld
: $(ANYCTROBJS
) anytun-controld.o
151 $(LD
) $(ANYCTROBJS
) anytun-controld.o
-o
$@
$(LDFLAGS
)
153 tunDevice.o
: tunDevice.
cpp tunDevice.h
154 $(C
++) $(CCFLAGS
) $< -c
156 Sockets
/libSockets.a
:
157 $(MAKE
) --directory
=.
/Sockets
159 packetSource.o
: packetSource.
cpp packetSource.h
160 $(C
++) $(CCFLAGS
) $< -c
162 buffer.o
: buffer.
cpp buffer.h
163 $(C
++) $(CCFLAGS
) $< -c
165 syncBuffer.o
: syncBuffer.
cpp syncBuffer.h
166 $(C
++) $(CCFLAGS
) $< -c
168 rtpSessionTable.o
: rtpSessionTable.
cpp rtpSessionTable.h
169 $(C
++) $(CCFLAGS
) $< -c
171 rtpSession.o
: rtpSession.
cpp rtpSession.h
172 $(C
++) $(CCFLAGS
) $< -c
174 plainPacket.o
: plainPacket.
cpp plainPacket.h buffer.h
175 $(C
++) $(CCFLAGS
) $< -c
177 encryptedPacket.o
: encryptedPacket.
cpp encryptedPacket.h buffer.h
178 $(C
++) $(CCFLAGS
) $< -c
180 cipher.o
: cipher.
cpp cipher.h buffer.h
181 $(C
++) $(CCFLAGS
) $< -c
183 anyCtrSocket.o
: anyCtrSocket.
cpp anyCtrSocket.h
184 $(C
++) $(CCFLAGS
) $< -c
186 anyCtrOptions.o
: anyCtrOptions.
cpp anyCtrOptions.h
187 $(C
++) $(CCFLAGS
) $< -c
189 anyConfOptions.o
: anyConfOptions.
cpp anyConfOptions.h
190 $(C
++) $(CCFLAGS
) $< -c
192 authAlgo.o
: authAlgo.
cpp authAlgo.h buffer.h
193 $(C
++) $(CCFLAGS
) $< -c
195 keyDerivation.o
: keyDerivation.
cpp keyDerivation.h
196 $(C
++) $(CCFLAGS
) $< -c
199 $(C
++) $(CCFLAGS
) $< -c
201 cipherFactory.o
: cipherFactory.
cpp cipherFactory.h cipher.h
202 $(C
++) $(CCFLAGS
) $< -c
204 authAlgoFactory.o
: authAlgoFactory.
cpp authAlgoFactory.h authAlgo.h
205 $(C
++) $(CCFLAGS
) $< -c
207 keyDerivationFactory.o
: keyDerivationFactory.
cpp keyDerivationFactory.h keyDerivation.h
208 $(C
++) $(CCFLAGS
) $< -c
210 routingTable.o
: routingTable.
cpp routingTable.h
211 $(C
++) $(CCFLAGS
) $< -c
213 syncSocket.o
: syncSocket.
cpp syncSocket.h
214 $(C
++) $(CCFLAGS
) $< -c
216 syncSocketHandler.o
: syncSocketHandler.
cpp syncSocketHandler.h
217 $(C
++) $(CCFLAGS
) $< -c
219 syncCommand.o
: syncCommand.
cpp syncCommand.h
220 $(C
++) $(CCFLAGS
) $< -c
222 syncRouteCommand.o
: syncRouteCommand.
cpp syncRouteCommand.h
223 $(C
++) $(CCFLAGS
) $< -c
225 syncRtpCommand.o
: syncRtpCommand.
cpp syncRtpCommand.h
226 $(C
++) $(CCFLAGS
) $< -c
228 syncConnectionCommand.o
: syncConnectionCommand.
cpp syncConnectionCommand.h
229 $(C
++) $(CCFLAGS
) $< -c
231 syncClientSocket.o
: syncClientSocket.
cpp syncClientSocket.h
232 $(C
++) $(CCFLAGS
) $< -c
234 syncQueue.o
: syncQueue.
cpp syncQueue.h
235 $(C
++) $(CCFLAGS
) $< -c
237 signalController.o
: signalController.
cpp signalController.h
238 $(C
++) $(CCFLAGS
) $< -c
240 PracticalSocket.o
: PracticalSocket.
cpp PracticalSocket.h
241 $(C
++) $(CCFLAGS
) $< -c
244 $(C
++) $(CCFLAGS
) $< -c
246 options.o
: options.
cpp options.h
247 $(C
++) $(CCFLAGS
) $< -c
249 seqWindow.o
: seqWindow.
cpp seqWindow.h
250 $(C
++) $(CCFLAGS
) $< -c
252 connectionList.o
: connectionList.
cpp connectionList.h
253 $(C
++) $(CCFLAGS
) $< -c
255 connectionParam.o
: connectionParam.
cpp connectionParam.h
256 $(C
++) $(CCFLAGS
) $< -c
258 networkPrefix.o
: networkPrefix.
cpp networkPrefix.h
259 $(C
++) $(CCFLAGS
) $< -c
261 networkAddress.o
: networkAddress.
cpp networkAddress.h
262 $(C
++) $(CCFLAGS
) $< -c
264 router.o
: router.
cpp router.h
265 $(C
++) $(CCFLAGS
) $< -c
268 $(C
++) $(CCFLAGS
) $< -c
270 anytun-nosync.o
: anytun.
cpp
271 $(C
++) $(CCFLAGS
) -DANYTUN_NOSYNC
$< -c
-o anytun-nosync.o
273 anytun-showtables.o
: anytun-showtables.
cpp
274 $(C
++) $(CCFLAGS
) $< -c
276 anytun-config.o
: anytun-config.
cpp
277 $(C
++) $(CCFLAGS
) $< -c
279 anytun-controld.o
: anytun-controld.
cpp
280 $(C
++) $(CCFLAGS
) $< -c
282 cConnectionParam.o
: cConnectionParam.
cpp
283 $(C
++) $(CCFLAGS
) $< -c
285 libAnysync.a
: $(OBJS
)
290 @cd anyrtpproxy
; $(MAKE
)
294 $(MAKE
) --directory
=$(CURDIR
)/openvpn
distclean
296 find .
-name
*.o
-exec
rm -f
{} \
;
297 rm -f config.sub config.guess
298 rm -f tunDevice.
cpp tunDevice.h
301 $(MAKE
) --directory
=$(CURDIR
)/man
clean
302 $(MAKE
) --directory
=$(CURDIR
)/Sockets
clean
304 $(MAKE
) --directory
=$(CURDIR
)/openvpn
clean
306 rm -f Sockets
/libSockets.a Sockets
/Sockets-config
315 $(MAKE
) --directory
=$(CURDIR
)/anyrtpproxy
clean
324 ctags
-R
--c
++-kinds
=+p
--fields
=+iaS
--extra
=+q .