-bringing copyright tags up to FSF standard
[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
68 libgnunetnat_la_LIBADD = \
69   $(top_builddir)/src/util/libgnunetutil.la \
70   $(GN_LIBINTL) @EXT_LIBS@ 
71
72 libgnunetnat_la_LDFLAGS = \
73   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
74   -version-info 1:1:1
75
76 check_PROGRAMS = \
77   test_nat \
78   test_nat_mini \
79   test_nat_test
80
81 if ENABLE_TEST_RUN
82  AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
83  TESTS = $(check_PROGRAMS)
84 endif
85
86 test_nat_SOURCES = \
87   test_nat.c
88 test_nat_LDADD = \
89  libgnunetnat.la \
90  $(top_builddir)/src/util/libgnunetutil.la 
91
92 test_nat_mini_SOURCES = \
93   test_nat_mini.c
94 test_nat_mini_LDADD = \
95  libgnunetnat.la \
96  $(top_builddir)/src/util/libgnunetutil.la 
97
98
99 test_nat_test_SOURCES = \
100   test_nat_test.c
101 test_nat_test_LDADD = \
102  libgnunetnat.la \
103  $(top_builddir)/src/util/libgnunetutil.la 
104
105
106 EXTRA_DIST = \
107  test_nat_data.conf \
108  test_nat_test_data.conf