Use conditional compilation for device.c.
[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 ## Conditionally compile device drivers
15         
16 if LINUX
17 tincd_SOURCES += linux/device.c
18 endif
19
20 if BSD
21 tincd_SOURCES += bsd/device.c
22 endif
23
24 if SOLARIS
25 tincd_SOURCES += solaris/device.c
26 endif
27
28 if MINGW
29 tincd_SOURCES += mingw/device.c
30 endif
31
32 if CYGWIN
33 tincd_SOURCES += cygwin/device.c
34 endif
35
36 if UML
37 tincd_SOURCES += uml_device.c
38 endif
39
40 if VDE
41 tincd_SOURCES += vde_device.c
42 endif
43
44 nodist_tincd_SOURCES = \
45         cipher.c crypto.c ecdh.c ecdsa.c digest.c prf.c rsa.c
46
47 tinc_SOURCES = \
48         utils.c getopt.c getopt1.c dropin.c \
49         info.c list.c subnet_parse.c tincctl.c top.c names.c
50
51 nodist_tinc_SOURCES = \
52         ecdsagen.c rsagen.c
53
54 sptps_test_SOURCES = \
55         logger.c cipher.c crypto.c ecdh.c ecdsa.c digest.c prf.c \
56         sptps.c sptps_test.c utils.c
57
58 if TUNEMU
59 tincd_SOURCES += bsd/tunemu.c
60 endif
61
62 tinc_LDADD = $(READLINE_LIBS) $(CURSES_LIBS)
63
64 DEFAULT_INCLUDES =
65
66 INCLUDES = @INCLUDES@
67
68 noinst_HEADERS = \
69         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 \
70         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 \
71         protocol.h route.h subnet.h sptps.h tincctl.h top.h bsd/tunemu.h hash.h event.h names.h
72
73 nodist_noinst_HEADERS = \
74         cipher.h crypto.h ecdh.h ecdsa.h digest.h prf.h rsa.h ecdsagen.h rsagen.h
75
76 LIBS = @LIBS@ @LIBGCRYPT_LIBS@
77
78 if TUNEMU
79 LIBS += -lpcap
80 endif
81
82 AM_CFLAGS = -DCONFDIR=\"$(sysconfdir)\" -DLOCALSTATEDIR=\"$(localstatedir)\" -DSBINDIR=\"$(sbindir)\"
83
84 dist-hook:
85         rm -f `find . -type l`