minor changes
[anytun.git] / Makefile
blob38de924f9e61f7098b101fea6b21944827167e69
1 C = gcc
2 CFLAGS = -g -Wall
3 CFLAGS += -DSOCKETS_NAMESPACE=sockets
4 CFLAGS += -DSOCKETS_NAMESPACE_STR='"sockets"'
5 C++ = g++
6 CCFLAGS = -g -Wall
7 CCFLAGS += -DSOCKETS_NAMESPACE=sockets
8 CCFLAGS += -DSOCKETS_NAMESPACE_STR='"sockets"'
9 LD = g++
10 LDFLAGS = -g -Wall -O2 -ldl -lpthread -lgcrypt -lssl -lboost_serialization
12 OPENVPNDEPS = openvpn/tun.o \
13 openvpn/error.o \
14 openvpn/socket.o \
15 openvpn/buffer.o \
16 openvpn/misc.o \
17 openvpn/manage.o \
18 openvpn/fdmisc.o \
19 openvpn/otime.o \
20 openvpn/options.o \
21 openvpn/mtu.o \
22 openvpn/plugin.o \
23 openvpn/sig.o \
24 openvpn/proxy.o \
25 openvpn/socks.o \
26 openvpn/status.o \
27 openvpn/event.o \
28 openvpn/route.o \
29 openvpn/helper.o \
30 openvpn/init.o \
31 openvpn/interval.o \
32 openvpn/base64.o \
33 openvpn/shaper.o \
34 openvpn/fragment.o
36 SOCKETDEPS = Sockets/libSockets.a
38 #Sockets/TcpSocket.o \
39 # Sockets/Socket.o \
40 # Sockets/Thread.o \
41 # Sockets/SocketHandler.o \
42 # Sockets/Ipv4Address.o \
43 # Sockets/Mutex.o \
44 # Sockets/SSLInitializer.o
47 OBJS = anytun.o \
48 tunDevice.o \
49 packetSource.o \
50 buffer.o \
51 syncBuffer.o \
52 syncCommand.o \
53 plainPacket.o \
54 encryptedPacket.o \
55 cypher.o \
56 authAlgo.o \
57 authTag.o \
58 keyDerivation.o \
59 mpi.o \
60 cypherFactory.o \
61 authAlgoFactory.o \
62 connectionList.o \
63 connectionParam.o \
64 networkAddress.o \
65 PracticalSocket.o \
66 router.o \
67 signalController.o \
68 syncSocket.o \
69 syncSocketHandler.o \
70 syncClientSocket.o \
71 syncQueue.o \
72 log.o \
73 options.o \
74 seqWindow.o \
75 $(OPENVPNDEPS) \
76 $(SOCKETDEPS)
78 EXECUTABLE = anytun
80 all: $(EXECUTABLE) libAnysync.a
82 anytun: $(OBJS)
83 $(LD) $(OBJS) -o $@ $(LDFLAGS)
85 tunDevice.o: tunDevice.cpp tunDevice.h
86 $(C++) $(CCFLAGS) $< -c
88 packetSource.o: packetSource.cpp packetSource.h
89 $(C++) $(CCFLAGS) $< -c
91 buffer.o: buffer.cpp buffer.h
92 $(C++) $(CCFLAGS) $< -c
94 syncBuffer.o: syncBuffer.cpp syncBuffer.h
95 $(C++) $(CCFLAGS) $< -c
97 plainPacket.o: plainPacket.cpp plainPacket.h buffer.h
98 $(C++) $(CCFLAGS) $< -c
100 encryptedPacket.o: encryptedPacket.cpp encryptedPacket.h buffer.h
101 $(C++) $(CCFLAGS) $< -c
103 cypher.o: cypher.cpp cypher.h buffer.h
104 $(C++) $(CCFLAGS) $< -c
106 authAlgo.o: authAlgo.cpp authAlgo.h buffer.h
107 $(C++) $(CCFLAGS) $< -c
109 authTag.o: authTag.cpp authTag.h buffer.h
110 $(C++) $(CCFLAGS) $< -c
112 keyDerivation.o: keyDerivation.cpp keyDerivation.h
113 $(C++) $(CCFLAGS) $< -c
115 mpi.o: mpi.cpp mpi.h
116 $(C++) $(CCFLAGS) $< -c
118 cypherFactory.o: cypherFactory.cpp cypherFactory.h cypher.h
119 $(C++) $(CCFLAGS) $< -c
121 authAlgoFactory.o: authAlgoFactory.cpp authAlgoFactory.h authAlgo.h
122 $(C++) $(CCFLAGS) $< -c
124 syncSocket.o: syncSocket.cpp syncSocket.h
125 $(C++) $(CCFLAGS) $< -c
127 syncSocketHandler.o: syncSocketHandler.cpp syncSocketHandler.h
128 $(C++) $(CCFLAGS) $< -c
130 syncCommand.o: syncCommand.cpp syncCommand.h
131 $(C++) $(CCFLAGS) $< -c
133 syncClientSocket.o: syncClientSocket.cpp syncClientSocket.h
134 $(C++) $(CCFLAGS) $< -c
136 syncQueue.o: syncQueue.cpp syncQueue.h
137 $(C++) $(CCFLAGS) $< -c
139 signalController.o: signalController.cpp signalController.h
140 $(C++) $(CCFLAGS) $< -c
142 PracticalSocket.o: PracticalSocket.cpp PracticalSocket.h
143 $(C++) $(CCFLAGS) $< -c
145 log.o: log.cpp log.h
146 $(C++) $(CCFLAGS) $< -c
148 options.o: options.cpp options.h
149 $(C++) $(CCFLAGS) $< -c
151 seqWindow.o: seqWindow.cpp seqWindow.h
152 $(C++) $(CCFLAGS) $< -c
154 connectionList.o: connectionList.cpp connectionList.h
155 $(C++) $(CCFLAGS) $< -c
157 connectionParam.o: connectionParam.cpp connectionParam.h
158 $(C++) $(CCFLAGS) $< -c
160 networkAddress.o: networkAddress.cpp networkAddress.h
161 $(C++) $(CCFLAGS) $< -c
163 router.o: router.cpp router.h
164 $(C++) $(CCFLAGS) $< -c
166 anytun.o: anytun.cpp
167 $(C++) $(CCFLAGS) $< -c
169 cConnectionParam.o: cConnectionParam.cpp
170 $(C++) $(CCFLAGS) $< -c
172 libAnysync.a: $(OBJS)
173 ar cru $@ $(OBJS)
174 ranlib $@
176 clean:
177 rm -f *.o
178 rm -f $(EXECUTABLE)
179 rm -f -r doc/html/*
180 rm -f -r doc/latex/*
182 doxygen:
183 doxygen Doxyfile
185 ctags:
186 ctags -R --c++-kinds=+p --fields=+iaS --extra=+q .