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
)
35 CXXFLAGS
= -g
-Wall
-O2
#-DUSE_SSL_CRYPTO
37 LDFLAGS
= -g
-Wall
-O2
-lboost_thread
-lgcrypt
-lgpg-error
-lboost_serialization
-lboost_system
38 #LDFLAGS = -g -Wall -O2 -lboost_thread -lcrypto -lboost_serialization -lboost_system
40 ifeq ($(TARGET
),Linux
)
41 CFLAGS
+= -D_XOPEN_SOURCE
=600
42 CXXFLAGS
+= -D_XOPEN_SOURCE
=600
45 ifeq ($(TARGET
),OpenBSD
)
46 CXXFLAGS
+= -I
/usr
/local
/include
47 LDFLAGS
+= -L
/usr
/local
/lib
61 keyDerivationFactory.o \
73 SYNCOBJS
= syncServer.o \
78 syncConnectionCommand.o \
81 ANYCTROBJS
= signalController.o \
90 keyDerivationFactory.o \
103 syncTcpConnection.o \
105 syncConnectionCommand.o
107 EXECUTABLE
= anytun anytun-config anytun-controld anytun-showtables
108 EXEOBJS
= anytun.o anytun-config.o anytun-controld.o anytun-showtables.o
110 SRCS
= $(OBJS
:%.o
=%.
cpp)
111 SYNCSRCS
= $(SYNCOBJS
:%.o
=%.
cpp)
112 ANYCTRSRCS
= $(ANYCTROBJS
:%.o
=%.
cpp)
113 ANYCONFSRCS
= $(ANYCONFOBJS
:%.o
=%.
cpp)
114 EXESRCS
= $(EXEOBJS
:%.o
=%.
cpp)
116 .PHONY
: distclean cleanall
clean ctags
118 all: $(EXECUTABLE
) #libAnysync.a
122 $(CXX
) -MM
$(CXXFLAGS
) $< > $@.
$$$$; \
123 sed
's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.
$$$$ > $@
; \
124 rm -f
$@.
$$$$; echo
'(re)building $@'
126 -include $(SRCS
:%.
cpp=%.d
) $(SYNCSRCS
:%.
cpp=%.d
) $(ANYCTRSRCS
:%.
cpp=%.d
) $(ANYCONFSRCS
:%.
cpp=%.d
) $(EXESRCS
:%.
cpp=%.d
)
128 anytun
: $(OBJS
) $(SYNCOBJS
) anytun.o
129 $(LD
) $(OBJS
) $(SYNCOBJS
) anytun.o
-o
$@
$(LDFLAGS
)
131 anytun-static
: $(OBJS
) $(SYNCOBJS
) anytun.o
132 $(LD
) $(OBJS
) $(SYNCOBJS
) anytun.o
-o
$@
$(LDFLAGS
) -lpthread
-static
133 strip -s anytun-static
135 anytun-nosync
: $(OBJS
) anytun-nosync.o
136 $(LD
) $(OBJS
) anytun-nosync.o
-o
$@
$(LDFLAGS
)
138 anytun-nosync.o
: anytun.
cpp anytun.o
139 $(CXX
) $(CXXFLAGS
) -DANYTUN_NOSYNC
$< -c
-o anytun-nosync.o
141 anytun-showtables
: $(OBJS
) $(SYNCOBJS
) anytun-showtables.o
142 $(LD
) $(OBJS
) $(SYNCOBJS
) 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
)
151 $(CXX
) $(CXXFLAGS
) $< -c
153 libAnysync.a
: $(OBJS
)
158 $(MAKE
) --directory
=$(CURDIR
)/anyrtpproxy
161 find .
-name
*.o
-exec
rm -f
{} \
;
162 rm -f config.sub config.guess
166 $(MAKE
) --directory
=$(CURDIR
)/man
clean
176 $(MAKE
) --directory
=$(CURDIR
)/anyrtpproxy
clean
185 ctags
-R
--c
++-kinds
=+p
--fields
=+iaS
--extra
=+q .