4 ## The secure anycast tunneling protocol (satp) defines a protocol used
5 ## for communication between any combination of unicast and anycast
6 ## tunnel endpoints. It has less protocol overhead than IPSec in Tunnel
7 ## mode and allows tunneling of every ETHER TYPE protocol (e.g.
8 ## ethernet, ip, arp ...). satp directly includes cryptography and
9 ## message authentication based on the methodes used by SRTP. It is
10 ## intended to deliver a generic, scaleable and secure solution for
11 ## tunneling and relaying of packets of any protocol.
14 ## Copyright (C) 2007-2008 Othmar Gsenger, Erwin Nindl,
15 ## Christian Pointner <satp@wirdorange.org>
17 ## This file is part of Anytun.
19 ## Anytun is free software: you can redistribute it and/or modify
20 ## it under the terms of the GNU General Public License version 3 as
21 ## published by the Free Software Foundation.
23 ## Anytun is distributed in the hope that it will be useful,
24 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
25 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 ## GNU General Public License for more details.
28 ## You should have received a copy of the GNU General Public License
29 ## along with anytun. If not, see <http://www.gnu.org/licenses/>.
31 TARGET
=$(shell uname
-s
)
37 LDFLAGS
= -g
-Wall
-O2
-lboost_thread
-lgcrypt
-lgpg-error
-lboost_serialization
39 ifeq ($(TARGET
),Linux
)
40 CFLAGS
+= -D_XOPEN_SOURCE
=600
41 CCFLAGS
+= -D_XOPEN_SOURCE
=600
44 ifeq ($(TARGET
),OpenBSD
)
45 CCFLAGS
+= -I
/usr
/local
/include
46 LDFLAGS
+= -L
/usr
/local
/lib
61 keyDerivationFactory.o \
76 syncConnectionCommand.o \
79 anyrtpproxy
/callIdQueue.o
81 SYNCOBJS
= syncServer.o \
85 ANYCTROBJS
= signalController.o \
95 keyDerivationFactory.o \
103 anyrtpproxy
/callIdQueue.o \
113 syncTcpConnection.o \
115 syncConnectionCommand.o
117 EXECUTABLE
= anytun anytun-config anytun-controld anytun-showtables
119 all: $(EXECUTABLE
) libAnysync.a
#anyrtpproxy
121 anytun
: $(OBJS
) $(SYNCOBJS
) anytun.o
122 $(LD
) $(OBJS
) $(SYNCOBJS
) anytun.o
-o
$@
$(LDFLAGS
)
124 anytun-nosync
: $(OBJS
) anytun-nosync.o
125 $(LD
) $(OBJS
) anytun-nosync.o
-o
$@
$(LDFLAGS
)
127 anytun-showtables
: $(OBJS
) $(SYNCOBJS
) anytun-showtables.o
128 $(LD
) $(OBJS
) $(SYNCOBJS
) anytun-showtables.o
-o
$@
$(LDFLAGS
)
130 anytun-config
: $(ANYCONFOBJS
) anytun-config.o
131 $(LD
) $(ANYCONFOBJS
) anytun-config.o
-o
$@
$(LDFLAGS
)
133 anytun-controld
: $(ANYCTROBJS
) anytun-controld.o
134 $(LD
) $(ANYCTROBJS
) anytun-controld.o
-o
$@
$(LDFLAGS
)
136 tunDevice.o
: tunDevice.
cpp tunDevice.h
137 $(C
++) $(CCFLAGS
) $< -c
139 packetSource.o
: packetSource.
cpp packetSource.h
140 $(C
++) $(CCFLAGS
) $< -c
142 buffer.o
: buffer.
cpp buffer.h
143 $(C
++) $(CCFLAGS
) $< -c
145 syncBuffer.o
: syncBuffer.
cpp syncBuffer.h
146 $(C
++) $(CCFLAGS
) $< -c
148 syncServer.o
: syncServer.
cpp syncServer.h
149 $(C
++) $(CCFLAGS
) $< -c
151 syncClient.o
: syncClient.
cpp syncClient.h
152 $(C
++) $(CCFLAGS
) $< -c
154 syncTcpConnection.o
: syncTcpConnection.
cpp syncTcpConnection.h
155 $(C
++) $(CCFLAGS
) $< -c
157 controldTcpConnection.
cpp: controldTcpConnection.
cpp syncTcpConnection.h
158 $(C
++) $(CCFLAGS
) $< -c
160 rtpSessionTable.o
: rtpSessionTable.
cpp rtpSessionTable.h
161 $(C
++) $(CCFLAGS
) $< -c
163 rtpSession.o
: rtpSession.
cpp rtpSession.h
164 $(C
++) $(CCFLAGS
) $< -c
166 plainPacket.o
: plainPacket.
cpp plainPacket.h buffer.h
167 $(C
++) $(CCFLAGS
) $< -c
169 encryptedPacket.o
: encryptedPacket.
cpp encryptedPacket.h buffer.h
170 $(C
++) $(CCFLAGS
) $< -c
172 cipher.o
: cipher.
cpp cipher.h buffer.h
173 $(C
++) $(CCFLAGS
) $< -c
175 anyCtrSocket.o
: anyCtrSocket.
cpp anyCtrSocket.h
176 $(C
++) $(CCFLAGS
) $< -c
178 anyCtrOptions.o
: anyCtrOptions.
cpp anyCtrOptions.h
179 $(C
++) $(CCFLAGS
) $< -c
181 anyConfOptions.o
: anyConfOptions.
cpp anyConfOptions.h
182 $(C
++) $(CCFLAGS
) $< -c
184 authAlgo.o
: authAlgo.
cpp authAlgo.h buffer.h
185 $(C
++) $(CCFLAGS
) $< -c
187 keyDerivation.o
: keyDerivation.
cpp keyDerivation.h
188 $(C
++) $(CCFLAGS
) $< -c
191 $(C
++) $(CCFLAGS
) $< -c
193 cipherFactory.o
: cipherFactory.
cpp cipherFactory.h cipher.h
194 $(C
++) $(CCFLAGS
) $< -c
196 authAlgoFactory.o
: authAlgoFactory.
cpp authAlgoFactory.h authAlgo.h
197 $(C
++) $(CCFLAGS
) $< -c
199 keyDerivationFactory.o
: keyDerivationFactory.
cpp keyDerivationFactory.h keyDerivation.h
200 $(C
++) $(CCFLAGS
) $< -c
202 routingTable.o
: routingTable.
cpp routingTable.h
203 $(C
++) $(CCFLAGS
) $< -c
205 syncCommand.o
: syncCommand.
cpp syncCommand.h
206 $(C
++) $(CCFLAGS
) $< -c
208 syncRouteCommand.o
: syncRouteCommand.
cpp syncRouteCommand.h
209 $(C
++) $(CCFLAGS
) $< -c
211 syncRtpCommand.o
: syncRtpCommand.
cpp syncRtpCommand.h
212 $(C
++) $(CCFLAGS
) $< -c
214 syncConnectionCommand.o
: syncConnectionCommand.
cpp syncConnectionCommand.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
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
251 $(C
++) $(CCFLAGS
) $< -c
253 anytun-nosync.o
: anytun.
cpp
254 $(C
++) $(CCFLAGS
) -DANYTUN_NOSYNC
$< -c
-o anytun-nosync.o
256 anytun-showtables.o
: anytun-showtables.
cpp
257 $(C
++) $(CCFLAGS
) $< -c
259 anytun-config.o
: anytun-config.
cpp
260 $(C
++) $(CCFLAGS
) $< -c
262 anytun-controld.o
: anytun-controld.
cpp
263 $(C
++) $(CCFLAGS
) $< -c
265 cConnectionParam.o
: cConnectionParam.
cpp
266 $(C
++) $(CCFLAGS
) $< -c
268 libAnysync.a
: $(OBJS
)
273 @cd anyrtpproxy
; $(MAKE
)
276 find .
-name
*.o
-exec
rm -f
{} \
;
277 rm -f config.sub config.guess
278 rm -f tunDevice.
cpp tunDevice.h
281 $(MAKE
) --directory
=$(CURDIR
)/man
clean
290 $(MAKE
) --directory
=$(CURDIR
)/anyrtpproxy
clean
299 ctags
-R
--c
++-kinds
=+p
--fields
=+iaS
--extra
=+q .