-improve indentation, reduce duplication of PIDs in core's neighbour map
[oweals/gnunet.git] / src / nat / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 if MINGW
5   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
6   NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
7   NATSERVER = gnunet-helper-nat-server-windows.c
8   NATCLIENT = gnunet-helper-nat-client-windows.c
9 endif
10
11 libexecdir= $(pkglibdir)/libexec/
12
13 pkgcfgdir= $(pkgdatadir)/config.d/
14
15 dist_pkgcfg_DATA = \
16   nat.conf
17
18 if LINUX
19   NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
20   NATSERVER = gnunet-helper-nat-server.c
21   NATCLIENT = gnunet-helper-nat-client.c
22 install-exec-hook:
23         $(top_srcdir)/src/nat/install-nat-helper.sh $(libexecdir) $(SUDO_BINARY) || true
24 else
25 if XFREEBSD
26   NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
27   NATSERVER = gnunet-helper-nat-server.c
28   NATCLIENT = gnunet-helper-nat-client.c
29 install-exec-hook:
30         $(top_srcdir)/src/nat/install-nat-helper.sh $(libexecdir) $(SUDO_BINARY) || true
31 endif
32 else
33 install-exec-hook:
34 endif
35
36 bin_PROGRAMS = \
37  gnunet-nat-server 
38
39 libexec_PROGRAMS = \
40  $(NATBIN) 
41
42 gnunet_nat_server_SOURCES = \
43  gnunet-nat-server.c nat.h
44 gnunet_nat_server_LDADD = \
45   libgnunetnat.la \
46   $(top_builddir)/src/util/libgnunetutil.la
47
48 gnunet_helper_nat_server_SOURCES = \
49  $(NATSERVER)
50
51 gnunet_helper_nat_client_SOURCES = \
52  $(NATCLIENT)         
53
54
55
56 if USE_COVERAGE
57   AM_CFLAGS = -fprofile-arcs -ftest-coverage
58 endif
59
60 lib_LTLIBRARIES = libgnunetnat.la
61
62 libgnunetnat_la_SOURCES = \
63   nat.c nat.h \
64   nat_auto.c \
65   nat_test.c \
66   nat_mini.c \
67   nat_stun.c
68
69 libgnunetnat_la_LIBADD = \
70   $(top_builddir)/src/util/libgnunetutil.la \
71   $(GN_LIBINTL) @EXT_LIBS@ 
72
73 libgnunetnat_la_LDFLAGS = \
74   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
75   -version-info 1:1:1
76
77 check_PROGRAMS = \
78   test_nat \
79   test_nat_mini \
80   test_nat_test \
81   test_stun
82
83 if ENABLE_TEST_RUN
84  AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
85  TESTS = $(check_PROGRAMS)
86 endif
87
88 test_nat_SOURCES = \
89   test_nat.c
90 test_nat_LDADD = \
91  libgnunetnat.la \
92  $(top_builddir)/src/util/libgnunetutil.la 
93
94 test_nat_mini_SOURCES = \
95   test_nat_mini.c
96 test_nat_mini_LDADD = \
97  libgnunetnat.la \
98  $(top_builddir)/src/util/libgnunetutil.la 
99
100
101 test_nat_test_SOURCES = \
102   test_nat_test.c
103 test_nat_test_LDADD = \
104  libgnunetnat.la \
105  $(top_builddir)/src/util/libgnunetutil.la 
106
107 test_stun_SOURCES = \
108   test_stun.c
109 test_stun_LDADD = \
110  libgnunetnat.la \
111  $(top_builddir)/src/util/libgnunetutil.la 
112
113 EXTRA_DIST = \
114  test_nat_data.conf \
115  test_nat_test_data.conf