Update links in the documentation.
[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 with the latest git information
6 .PHONY: ${srcdir}/version.c version_git.h
7 version_git.h:
8         echo >$@
9         -(cd $(srcdir) && git describe) && echo '#define GIT_DESCRIPTION "'`(cd $(srcdir) && git describe) | sed 's/release-//'`'"' >$@
10 ${srcdir}/version.c: version_git.h
11
12 if LINUX
13 sbin_PROGRAMS += sptps_speed
14 endif
15
16 ed25519_SOURCES = \
17         ed25519/add_scalar.c \
18         ed25519/ed25519.h \
19         ed25519/fe.c ed25519/fe.h \
20         ed25519/fixedint.h \
21         ed25519/ge.c ed25519/ge.h \
22         ed25519/key_exchange.c \
23         ed25519/keypair.c \
24         ed25519/precomp_data.h \
25         ed25519/sc.c ed25519/sc.h \
26         ed25519/sha512.c ed25519/sha512.h \
27         ed25519/sign.c \
28         ed25519/verify.c
29
30 chacha_poly1305_SOURCES = \
31         chacha-poly1305/chacha.c chacha-poly1305/chacha.h \
32         chacha-poly1305/chacha-poly1305.c chacha-poly1305/chacha-poly1305.h \
33         chacha-poly1305/poly1305.c chacha-poly1305/poly1305.h
34
35 tincd_SOURCES = \
36         buffer.c buffer.h \
37         cipher.h \
38         conf.c conf.h \
39         connection.c connection.h \
40         control.c control.h \
41         control_common.h \
42         crypto.h \
43         device.h \
44         digest.h \
45         dropin.c dropin.h \
46         dummy_device.c \
47         ecdh.h \
48         ecdsa.h \
49         ecdsagen.h \
50         edge.c edge.h \
51         ethernet.h \
52         event.c event.h \
53         fake-gai-errnos.h \
54         fake-getaddrinfo.c fake-getaddrinfo.h \
55         fake-getnameinfo.c fake-getnameinfo.h \
56         graph.c graph.h \
57         hash.c hash.h \
58         have.h \
59         ipv4.h \
60         ipv6.h \
61         list.c list.h \
62         logger.c logger.h \
63         meta.c meta.h \
64         multicast_device.c \
65         names.c names.h \
66         net.c net.h \
67         net_packet.c \
68         net_setup.c \
69         net_socket.c \
70         netutl.c netutl.h \
71         node.c node.h \
72         prf.h \
73         process.c process.h \
74         protocol.c protocol.h \
75         protocol_auth.c \
76         protocol_edge.c \
77         protocol_key.c \
78         protocol_misc.c \
79         protocol_subnet.c \
80         raw_socket_device.c \
81         route.c route.h \
82         rsa.h \
83         rsagen.h \
84         script.c script.h \
85         splay_tree.c splay_tree.h \
86         sptps.c sptps.h \
87         subnet.c subnet.h \
88         subnet_parse.c \
89         system.h \
90         tincd.c \
91         utils.c utils.h \
92         xalloc.h \
93         version.c version.h \
94         ed25519/ecdh.c \
95         ed25519/ecdsa.c \
96         $(ed25519_SOURCES) \
97         $(chacha_poly1305_SOURCES)
98
99 tinc_SOURCES = \
100         dropin.c dropin.h \
101         getopt.c getopt.h \
102         getopt1.c \
103         fsck.c fsck.h \
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 !GETOPT
152 tincd_SOURCES += \
153         getopt.c getopt.h \
154         getopt1.c
155 tinc_SOURCES += \
156         getopt.c getopt.h \
157         getopt1.cendif
158 sptps_test_SOURCES += \
159         getopt.c getopt.h \
160         getopt1.c
161 sptps_keypair_SOURCES += \
162         getopt.c getopt.h \
163         getopt1.c
164 endif
165
166 if LINUX
167 tincd_SOURCES += linux/device.c
168 endif
169
170 if BSD
171 tincd_SOURCES += bsd/device.c
172 if TUNEMU
173 tincd_SOURCES += bsd/tunemu.c bsd/tunemu.h
174 endif
175 endif
176
177 if SOLARIS
178 tincd_SOURCES += solaris/device.c
179 endif
180
181 if MINGW
182 tincd_SOURCES += mingw/device.c mingw/common.h
183 endif
184
185 if CYGWIN
186 tincd_SOURCES += cygwin/device.c
187 endif
188
189 if UML
190 tincd_SOURCES += uml_device.c
191 endif
192
193 if VDE
194 tincd_SOURCES += vde_device.c
195 endif
196
197 if OPENSSL
198 tincd_SOURCES += \
199         openssl/cipher.c \
200         openssl/crypto.c \
201         openssl/digest.c openssl/digest.h \
202         openssl/prf.c \
203         openssl/rsa.c
204 tinc_SOURCES += \
205         openssl/cipher.c \
206         openssl/crypto.c \
207         openssl/digest.c openssl/digest.h \
208         openssl/prf.c \
209         openssl/rsa.c \
210         openssl/rsagen.c
211 sptps_test_SOURCES += \
212         openssl/crypto.c \
213         openssl/digest.c openssl/digest.h \
214         openssl/prf.c
215 sptps_keypair_SOURCES += \
216         openssl/crypto.c
217 sptps_speed_SOURCES += \
218         openssl/crypto.c \
219         openssl/digest.c openssl/digest.h \
220         openssl/prf.c
221 else
222 if GCRYPT
223 tincd_SOURCES += \
224         gcrypt/cipher.c \
225         gcrypt/crypto.c \
226         gcrypt/digest.c gcrypt/digest.h \
227         gcrypt/prf.c \
228         gcrypt/rsa.c
229 tinc_SOURCES += \
230         gcrypt/cipher.c \
231         gcrypt/crypto.c \
232         gcrypt/digest.c gcrypt/digest.h \
233         gcrypt/prf.c \
234         gcrypt/rsa.c \
235         gcrypt/rsagen.c
236 sptps_test_SOURCES += \
237         gcrypt/cipher.c \
238         gcrypt/crypto.c \
239         gcrypt/digest.c gcrypt/digest.h \
240         gcrypt/prf.c
241 sptps_keypair_SOURCES += \
242         openssl/crypto.c
243 sptps_speed_SOURCES += \
244         openssl/crypto.c \
245         openssl/digest.c openssl/digest.h \
246         openssl/prf.c
247 else
248 tincd_SOURCES += \
249         nolegacy/crypto.c \
250         nolegacy/prf.c
251 tinc_SOURCES += \
252         nolegacy/crypto.c \
253         nolegacy/prf.c
254 sptps_test_SOURCES += \
255         nolegacy/crypto.c \
256         nolegacy/prf.c
257 sptps_keypair_SOURCES += \
258         nolegacy/crypto.c
259 sptps_speed_SOURCES += \
260         nolegacy/crypto.c \
261         nolegacy/prf.c
262 endif
263 endif
264
265 if MINIUPNPC
266 tincd_SOURCES += upnp.h upnp.c
267 tincd_LDADD = $(MINIUPNPC_LIBS)
268 tincd_LDFLAGS = -pthread
269 endif
270
271 tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS)
272 sptps_speed_LDADD = -lrt
273
274 LIBS = @LIBS@ -lm
275
276 if TUNEMU
277 LIBS += -lpcap
278 endif
279
280 AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\" -iquote.