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/>.
32 ifneq ($(MAKECMDGOALS),distclean)
47 keyDerivationFactory.o \
62 SYNCOBJS := syncServer.o \
67 syncConnectionCommand.o \
70 ANYCTROBJS := signalController.o \
80 ANYCONFOBJS := log.o \
85 keyDerivationFactory.o \
100 syncConnectionCommand.o \
103 EXECUTABLE := anytun anytun-config anytun-controld anytun-showtables anytun-nosync
104 EXEOBJS := anytun.o anytun-config.o anytun-controld.o anytun-showtables.o
106 SRCS := $(OBJS:%.o=%.cpp)
107 SYNCSRCS := $(SYNCOBJS:%.o=%.cpp)
108 ANYCTRSRCS := $(ANYCTROBJS:%.o=%.cpp)
109 ANYCONFSRCS := $(ANYCONFOBJS:%.o=%.cpp)
110 EXESRCS := $(EXEOBJS:%.o=%.cpp)
112 .PHONY: distclean cleanall clean ctags
114 all: $(EXECUTABLE) #libAnysync.a
118 $(CXX) -MM $(CXXFLAGS) $< > $@.$$$$; \
119 sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
120 rm -f $@.$$$$; echo '(re)building $@'
122 ifneq ($(MAKECMDGOALS),distclean)
123 -include $(SRCS:%.cpp=%.d) $(SYNCSRCS:%.cpp=%.d) $(ANYCTRSRCS:%.cpp=%.d) $(ANYCONFSRCS:%.cpp=%.d) $(EXESRCS:%.cpp=%.d)
127 strip -s $(EXECUTABLE)
129 anytun: $(OBJS) $(SYNCOBJS) anytun.o
130 $(LD) $(OBJS) $(SYNCOBJS) anytun.o -o $@ $(LDFLAGS)
132 anytun-static: $(OBJS) $(SYNCOBJS) anytun-noprivdrop.o
133 $(LD) $(OBJS) $(SYNCOBJS) anytun-noprivdrop.o -o $@ -Bstatic -lstdc++ -static $(LDFLAGS) -lpthread
134 strip -s anytun-static
136 anytun-nosync: $(OBJS) anytun-nosync.o
137 $(LD) $(OBJS) anytun-nosync.o -o $@ $(LDFLAGS)
139 anytun-nosync.o: anytun.cpp
140 $(CXX) $(CXXFLAGS) -DANYTUN_NOSYNC $< -c -o anytun-nosync.o
142 anytun-noprivdrop.o: anytun.cpp
143 $(CXX) $(CXXFLAGS) -DNO_PRIVDROP $< -c -o anytun-noprivdrop.o
145 anytun-showtables: $(OBJS) $(SYNCOBJS) anytun-showtables.o
146 $(LD) $(OBJS) $(SYNCOBJS) anytun-showtables.o -o $@ $(LDFLAGS)
148 anytun-config: $(ANYCONFOBJS) anytun-config.o
149 $(LD) $(ANYCONFOBJS) anytun-config.o -o $@ $(LDFLAGS)
151 anytun-controld: $(ANYCTROBJS) anytun-controld.o
152 $(LD) $(ANYCTROBJS) anytun-controld.o -o $@ $(LDFLAGS)
155 options.o: options.cpp
156 $(CXX) $(CXXFLAGS) -DANYTUN_OPTIONS $< -c -o $@
158 anyCtrOptions.o: options.cpp
159 $(CXX) $(CXXFLAGS) -DANYCTR_OPTIONS $< -c -o $@
161 anyConfOptions.o: options.cpp
162 $(CXX) $(CXXFLAGS) -DANYCONF_OPTIONS $< -c -o $@
165 $(CXX) $(CXXFLAGS) $< -c
168 libAnysync.a: $(OBJS)
173 $(MAKE) --directory=$(CURDIR)/anyrtpproxy
177 find . -name *.o -exec rm -f {} \;
178 rm -f config.sub config.guess
183 $(MAKE) --directory=$(CURDIR)/man clean
194 $(MAKE) --directory=$(CURDIR)/anyrtpproxy clean