Use a smarter algorithm for choosing MTU discovery probe sizes.
[tinc] / src / Makefile.am
1 ## Produce this file with automake to get Makefile.in
2
3 sbin_PROGRAMS = tincd tinc sptps_test sptps_keypair
4
5 ## Make sure version.c is always rebuilt
6 .PHONY: version.c
7 version.c:
8
9 if LINUX
10 sbin_PROGRAMS += sptps_speed
11 endif
12
13 DEFAULT_INCLUDES =
14
15 ed25519_SOURCES = \
16         ed25519/add_scalar.c \
17         ed25519/ed25519.h \
18         ed25519/fe.c ed25519/fe.h \
19         ed25519/fixedint.h \
20         ed25519/ge.c ed25519/ge.h \
21         ed25519/key_exchange.c \
22         ed25519/keypair.c \
23         ed25519/precomp_data.h \
24         ed25519/sc.c ed25519/sc.h \
25         ed25519/sha512.c ed25519/sha512.h \
26         ed25519/sign.c \
27         ed25519/verify.c
28
29 chacha_poly1305_SOURCES = \
30         chacha-poly1305/chacha.c chacha-poly1305/chacha.h \
31         chacha-poly1305/chacha-poly1305.c chacha-poly1305/chacha-poly1305.h \
32         chacha-poly1305/poly1305.c chacha-poly1305/poly1305.h
33
34 tincd_SOURCES = \
35         buffer.c buffer.h \
36         cipher.h \
37         conf.c conf.h \
38         connection.c connection.h \
39         control.c control.h \
40         control_common.h \
41         crypto.h \
42         device.h \
43         digest.h \
44         dropin.c dropin.h \
45         dummy_device.c \
46         ecdh.h \
47         ecdsa.h \
48         ecdsagen.h \
49         edge.c edge.h \
50         ethernet.h \
51         event.c event.h \
52         fake-gai-errnos.h \
53         fake-getaddrinfo.c fake-getaddrinfo.h \
54         fake-getnameinfo.c fake-getnameinfo.h \
55         getopt.c getopt.h \
56         getopt1.c \
57         graph.c graph.h \
58         hash.c hash.h \
59         have.h \
60         ipv4.h \
61         ipv6.h \
62         list.c list.h \
63         logger.c logger.h \
64         meta.c meta.h \
65         multicast_device.c \
66         names.c names.h \
67         net.c net.h \
68         net_packet.c \
69         net_setup.c \
70         net_socket.c \
71         netutl.c netutl.h \
72         node.c node.h \
73         prf.h \
74         process.c process.h \
75         protocol.c protocol.h \
76         protocol_auth.c \
77         protocol_edge.c \
78         protocol_key.c \
79         protocol_misc.c \
80         protocol_subnet.c \
81         raw_socket_device.c \
82         route.c route.h \
83         rsa.h \
84         rsagen.h \
85         script.c script.h \
86         splay_tree.c splay_tree.h \
87         sptps.c sptps.h \
88         subnet.c subnet.h \
89         subnet_parse.c \
90         system.h \
91         tincd.c \
92         utils.c utils.h \
93         xalloc.h \
94         version.c version.h \
95         ed25519/ecdh.c \
96         ed25519/ecdsa.c \
97         $(ed25519_SOURCES) \
98         $(chacha_poly1305_SOURCES)
99
100 tinc_SOURCES = \
101         dropin.c dropin.h \
102         getopt.c getopt.h \
103         getopt1.c \
104         info.c info.h \
105         invitation.c invitation.h \
106         list.c list.h \
107         names.c names.h \
108         netutl.c netutl.h \
109         script.c script.h \
110         sptps.c sptps.h \
111         subnet_parse.c subnet.h \
112         tincctl.c tincctl.h \
113         top.c top.h \
114         utils.c utils.h \
115         version.c version.h \
116         ed25519/ecdh.c \
117         ed25519/ecdsa.c \
118         ed25519/ecdsagen.c \
119         $(ed25519_SOURCES) \
120         $(chacha_poly1305_SOURCES)
121
122 sptps_test_SOURCES = \
123         logger.c logger.h \
124         sptps.c sptps.h \
125         sptps_test.c \
126         utils.c utils.h \
127         ed25519/ecdh.c \
128         ed25519/ecdsa.c \
129         $(ed25519_SOURCES) \
130         $(chacha_poly1305_SOURCES)
131
132 sptps_keypair_SOURCES = \
133         sptps_keypair.c \
134         utils.c utils.h \
135         ed25519/ecdsagen.c \
136         $(ed25519_SOURCES)
137
138 sptps_speed_SOURCES = \
139         logger.c logger.h \
140         sptps.c sptps.h \
141         sptps_speed.c \
142         utils.c utils.h \
143         ed25519/ecdh.c \
144         ed25519/ecdsa.c \
145         ed25519/ecdsagen.c \
146         $(ed25519_SOURCES) \
147         $(chacha_poly1305_SOURCES)
148
149 ## Conditionally compile device drivers
150         
151 if LINUX
152 tincd_SOURCES += linux/device.c
153 endif
154
155 if BSD
156 tincd_SOURCES += bsd/device.c
157 if TUNEMU
158 tincd_SOURCES += bsd/tunemu.c bsd/tunemu.h
159 endif
160 endif
161
162 if SOLARIS
163 tincd_SOURCES += solaris/device.c
164 endif
165
166 if MINGW
167 tincd_SOURCES += mingw/device.c mingw/common.h
168 endif
169
170 if CYGWIN
171 tincd_SOURCES += cygwin/device.c
172 endif
173
174 if UML
175 tincd_SOURCES += uml_device.c
176 endif
177
178 if VDE
179 tincd_SOURCES += vde_device.c
180 endif
181
182 if OPENSSL
183 tincd_SOURCES += \
184         openssl/cipher.c \
185         openssl/crypto.c \
186         openssl/digest.c openssl/digest.h \
187         openssl/prf.c \
188         openssl/rsa.c
189 tinc_SOURCES += \
190         openssl/cipher.c \
191         openssl/crypto.c \
192         openssl/digest.c openssl/digest.h \
193         openssl/prf.c \
194         openssl/rsa.c \
195         openssl/rsagen.c
196 sptps_test_SOURCES += \
197         openssl/crypto.c \
198         openssl/digest.c openssl/digest.h \
199         openssl/prf.c
200 sptps_keypair_SOURCES += \
201         openssl/crypto.c
202 sptps_speed_SOURCES += \
203         openssl/crypto.c \
204         openssl/digest.c openssl/digest.h \
205         openssl/prf.c
206 else
207 if GCRYPT
208 tincd_SOURCES += \
209         gcrypt/cipher.c \
210         gcrypt/crypto.c \
211         gcrypt/digest.c gcrypt/digest.h \
212         gcrypt/prf.c \
213         gcrypt/rsa.c
214 tinc_SOURCES += \
215         gcrypt/cipher.c \
216         gcrypt/crypto.c \
217         gcrypt/digest.c gcrypt/digest.h \
218         gcrypt/prf.c \
219         gcrypt/rsa.c \
220         gcrypt/rsagen.c
221 sptps_test_SOURCES += \
222         gcrypt/cipher.c \
223         gcrypt/crypto.c \
224         gcrypt/digest.c gcrypt/digest.h \
225         gcrypt/prf.c
226 sptps_keypair_SOURCES += \
227         openssl/crypto.c
228 sptps_speed_SOURCES += \
229         openssl/crypto.c \
230         openssl/digest.c openssl/digest.h \
231         openssl/prf.c
232 else
233 tincd_SOURCES += \
234         nolegacy/crypto.c \
235         nolegacy/prf.c
236 tinc_SOURCES += \
237         nolegacy/crypto.c \
238         nolegacy/prf.c
239 sptps_test_SOURCES += \
240         nolegacy/crypto.c \
241         nolegacy/prf.c
242 sptps_keypair_SOURCES += \
243         nolegacy/crypto.c
244 sptps_speed_SOURCES += \
245         nolegacy/crypto.c \
246         nolegacy/prf.c
247 endif
248 endif
249
250 tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS)
251 sptps_speed_LDADD = -lrt
252
253 LIBS = @LIBS@ -lm
254
255 if TUNEMU
256 LIBS += -lpcap
257 endif
258
259 AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\"