Add generic crypto headers.
[tinc] / src / Makefile.am
1 ## Produce this file with automake to get Makefile.in
2
3 sbin_PROGRAMS = tincd tinc sptps_test
4
5 EXTRA_DIST = linux bsd solaris cygwin mingw openssl gcrypt
6
7 tincd_SOURCES = \
8         utils.c getopt.c getopt1.c list.c splay_tree.c dropin.c fake-getaddrinfo.c fake-getnameinfo.c hash.c \
9         buffer.c conf.c connection.c control.c edge.c graph.c logger.c meta.c net.c net_packet.c net_setup.c \
10         net_socket.c netutl.c node.c process.c protocol.c protocol_auth.c protocol_edge.c protocol_misc.c \
11         protocol_key.c protocol_subnet.c route.c sptps.c subnet.c subnet_parse.c event.c tincd.c \
12         dummy_device.c raw_socket_device.c multicast_device.c names.c
13
14 tinc_SOURCES = \
15         utils.c getopt.c getopt1.c dropin.c \
16         info.c list.c subnet_parse.c tincctl.c top.c names.c
17
18 sptps_test_SOURCES = \
19         logger.c sptps.c sptps_test.c utils.c
20
21 ## Conditionally compile device drivers
22         
23 if LINUX
24 tincd_SOURCES += linux/device.c
25 endif
26
27 if BSD
28 tincd_SOURCES += bsd/device.c
29 if TUNEMU
30 tincd_SOURCES += bsd/tunemu.c
31 endif
32 endif
33
34 if SOLARIS
35 tincd_SOURCES += solaris/device.c
36 endif
37
38 if MINGW
39 tincd_SOURCES += mingw/device.c
40 endif
41
42 if CYGWIN
43 tincd_SOURCES += cygwin/device.c
44 endif
45
46 if UML
47 tincd_SOURCES += uml_device.c
48 endif
49
50 if VDE
51 tincd_SOURCES += vde_device.c
52 endif
53
54 if OPENSSL
55 tincd_SOURCES += \
56         openssl/cipher.c \
57         openssl/crypto.c \
58         openssl/ecdh.c \
59         openssl/ecdsa.c \
60         openssl/digest.c \
61         openssl/prf.c \
62         openssl/rsa.c
63 tinc_SOURCES += \
64         openssl/ecdsa.c \
65         openssl/ecdsagen.c \
66         openssl/rsa.c \
67         openssl/rsagen.c
68 sptps_test_SOURCES += \
69         openssl/cipher.c \
70         openssl/crypto.c \
71         openssl/ecdh.c \
72         openssl/ecdsa.c \
73         openssl/digest.c \
74         openssl/prf.c
75 endif
76
77 if GCRYPT
78 tincd_SOURCES += \
79         gcrypt/cipher.c \
80         gcrypt/crypto.c \
81         gcrypt/ecdh.c \
82         gcrypt/ecdsa.c \
83         gcrypt/digest.c \
84         gcrypt/prf.c \
85         gcrypt/rsa.c
86 tinc_SOURCES += \
87         gcrypt/ecdsa.c \
88         gcrypt/ecdsagen.c \
89         gcrypt/rsa.c \
90         gcrypt/rsagen.c
91 sptps_test_SOURCES += \
92         gcrypt/cipher.c \
93         gcrypt/crypto.c \
94         gcrypt/ecdh.c \
95         gcrypt/ecdsa.c \
96         gcrypt/digest.c \
97         gcrypt/prf.c
98 endif
99
100 tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS)
101
102 DEFAULT_INCLUDES =
103
104 INCLUDES = @INCLUDES@
105
106 noinst_HEADERS = \
107         xalloc.h utils.h getopt.h list.h splay_tree.h dropin.h fake-getaddrinfo.h fake-getnameinfo.h fake-gai-errnos.h ipv6.h ipv4.h ethernet.h \
108         buffer.h conf.h connection.h control.h control_common.h device.h edge.h graph.h info.h logger.h meta.h net.h netutl.h node.h process.h \
109         protocol.h route.h subnet.h sptps.h tincctl.h top.h hash.h event.h names.h have.h system.h \
110         cipher.h crypto.h digest.h ecdh.h ecdsa.h ecdsagen.h prf.h rsa.h rsagen.h
111
112 LIBS = @LIBS@ @LIBGCRYPT_LIBS@
113
114 if TUNEMU
115 LIBS += -lpcap
116 endif
117
118 AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\"
119
120 dist-hook:
121         rm -f `find . -type l`