doing replay protection before learning remote host
[anytun.git] / src / Makefile
blob396b2553df9c75e90025765f0b1910f12fca2c78
1 ##
2 ## anytun
3 ##
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 include include.mk
34 OBJS = tunDevice.o \
35 packetSource.o \
36 buffer.o \
37 syncBuffer.o \
38 plainPacket.o \
39 encryptedPacket.o \
40 cipher.o \
41 authAlgo.o \
42 keyDerivation.o \
43 cipherFactory.o \
44 authAlgoFactory.o \
45 keyDerivationFactory.o \
46 connectionList.o \
47 connectionParam.o \
48 networkAddress.o \
49 networkPrefix.o \
50 routingTable.o \
51 signalController.o \
52 log.o \
53 options.o \
54 seqWindow.o \
55 routingTreeNode.o \
57 SYNCOBJS= syncServer.o \
58 syncClient.o \
59 syncQueue.o \
60 syncCommand.o \
61 syncRouteCommand.o \
62 syncConnectionCommand.o \
63 syncTcpConnection.o
65 ANYCTROBJS = signalController.o \
66 anyCtrOptions.o \
67 log.o \
68 syncTcpConnection.o \
69 syncServer.o
71 ANYCONFOBJS = log.o \
72 buffer.o \
73 keyDerivation.o \
74 keyDerivationFactory.o \
75 networkAddress.o \
76 networkPrefix.o \
77 connectionList.o \
78 connectionParam.o \
79 routingTreeNode.o \
80 anyConfOptions.o \
81 routingTable.o \
82 seqWindow.o \
83 syncQueue.o \
84 syncBuffer.o \
85 syncCommand.o \
86 syncServer.o \
87 syncTcpConnection.o \
88 syncRouteCommand.o \
89 syncConnectionCommand.o
91 EXECUTABLE = anytun anytun-config anytun-controld anytun-showtables
92 EXEOBJS = anytun.o anytun-config.o anytun-controld.o anytun-showtables.o
94 SRCS = $(OBJS:%.o=%.cpp)
95 SYNCSRCS = $(SYNCOBJS:%.o=%.cpp)
96 ANYCTRSRCS = $(ANYCTROBJS:%.o=%.cpp)
97 ANYCONFSRCS = $(ANYCONFOBJS:%.o=%.cpp)
98 EXESRCS = $(EXEOBJS:%.o=%.cpp)
100 .PHONY: distclean cleanall clean ctags
102 all: $(EXECUTABLE) #libAnysync.a
104 %.d: %.cpp
105 @set -e; rm -f $@; \
106 $(CXX) -MM $(CXXFLAGS) $< > $@.$$$$; \
107 sed 's,\($*\)\.o[ :]*,\1.o $@ : ,g' < $@.$$$$ > $@; \
108 rm -f $@.$$$$; echo '(re)building $@'
110 -include $(SRCS:%.cpp=%.d) $(SYNCSRCS:%.cpp=%.d) $(ANYCTRSRCS:%.cpp=%.d) $(ANYCONFSRCS:%.cpp=%.d) $(EXESRCS:%.cpp=%.d)
112 anytun: $(OBJS) $(SYNCOBJS) anytun.o
113 $(LD) $(OBJS) $(SYNCOBJS) anytun.o -o $@ $(LDFLAGS)
115 anytun-static: $(OBJS) $(SYNCOBJS) anytun.o
116 $(LD) $(OBJS) $(SYNCOBJS) anytun.o -o $@ $(LDFLAGS) -lpthread -static
117 strip -s anytun-static
119 anytun-nosync: $(OBJS) anytun-nosync.o
120 $(LD) $(OBJS) anytun-nosync.o -o $@ $(LDFLAGS)
122 anytun-nosync.o: anytun.cpp anytun.o
123 $(CXX) $(CXXFLAGS) -DANYTUN_NOSYNC $< -c -o anytun-nosync.o
125 anytun-showtables: $(OBJS) $(SYNCOBJS) anytun-showtables.o
126 $(LD) $(OBJS) $(SYNCOBJS) anytun-showtables.o -o $@ $(LDFLAGS)
128 anytun-config: $(ANYCONFOBJS) anytun-config.o
129 $(LD) $(ANYCONFOBJS) anytun-config.o -o $@ $(LDFLAGS)
131 anytun-controld: $(ANYCTROBJS) anytun-controld.o
132 $(LD) $(ANYCTROBJS) anytun-controld.o -o $@ $(LDFLAGS)
134 %.o: %.cpp
135 $(CXX) $(CXXFLAGS) $< -c
137 libAnysync.a: $(OBJS)
138 ar cru $@ $(OBJS)
139 ranlib $@
141 anyrtpproxy: anytun
142 $(MAKE) --directory=$(CURDIR)/anyrtpproxy
144 distclean: cleanall
145 find . -name *.o -exec rm -f {} \;
146 rm -f config.sub config.guess
147 rm -f tunDevice.cpp
148 rm -f include.mk
150 cleanall: clean
151 $(MAKE) --directory=$(CURDIR)/man clean
153 clean:
154 rm -f *.o
155 rm -f *.d
156 rm -f $(EXECUTABLE)
157 rm -f anytun-nosync
158 rm -f -r doc/html/*
159 rm -f -r doc/latex/*
160 rm -f libAnysync.a
161 $(MAKE) --directory=$(CURDIR)/anyrtpproxy clean
163 manpage:
164 @cd man ; $(MAKE)
166 doxygen:
167 doxygen Doxyfile
169 ctags:
170 ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .