- minor changes, TODO, debug message
[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 $(DESTDIR)$(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 $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true
31 endif
32 else
33 install-exec-hook:
34 endif
35
36 bin_PROGRAMS = \
37  gnunet-nat-server \
38  gnunet-nat
39
40 libexec_PROGRAMS = \
41  $(NATBIN) 
42
43 gnunet_nat_server_SOURCES = \
44  gnunet-nat-server.c nat.h
45 gnunet_nat_server_LDADD = \
46   libgnunetnat.la \
47   $(top_builddir)/src/util/libgnunetutil.la
48
49 gnunet_helper_nat_server_SOURCES = \
50  $(NATSERVER)
51
52 gnunet_helper_nat_client_SOURCES = \
53  $(NATCLIENT)         
54
55
56 gnunet_nat_SOURCES = \
57 gnunet-nat.c nat.h
58 gnunet_nat_LDADD = \
59   libgnunetnat.la \
60   $(top_builddir)/src/util/libgnunetutil.la
61
62
63 if USE_COVERAGE
64   AM_CFLAGS = -fprofile-arcs -ftest-coverage
65 endif
66
67 lib_LTLIBRARIES = \
68   libgnunetnat.la \
69   libgnunetnatnew.la 
70
71 libgnunetnat_la_SOURCES = \
72   nat.c nat.h \
73   nat_auto.c \
74   nat_test.c \
75   nat_mini.c \
76   nat_stun.c
77 libgnunetnat_la_LIBADD = \
78   $(top_builddir)/src/util/libgnunetutil.la \
79   $(GN_LIBINTL) @EXT_LIBS@ 
80 libgnunetnat_la_LDFLAGS = \
81   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
82   -version-info 1:1:1
83
84 libgnunetnatnew_la_SOURCES = \
85   nat_api.c nat.h
86 libgnunetnatnew_la_LIBADD = \
87   $(top_builddir)/src/util/libgnunetutil.la \
88   $(GN_LIBINTL) @EXT_LIBS@ 
89 libgnunetnatnew_la_LDFLAGS = \
90   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
91   -version-info 2:0:0
92
93 check_PROGRAMS = \
94   test_nat \
95   test_nat_mini \
96   test_nat_test \
97   test_stun
98
99 if ENABLE_TEST_RUN
100  AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
101  TESTS = $(check_PROGRAMS)
102 endif
103
104 test_nat_SOURCES = \
105   test_nat.c
106 test_nat_LDADD = \
107  libgnunetnat.la \
108  $(top_builddir)/src/util/libgnunetutil.la 
109
110 test_nat_mini_SOURCES = \
111   test_nat_mini.c
112 test_nat_mini_LDADD = \
113  libgnunetnat.la \
114  $(top_builddir)/src/util/libgnunetutil.la 
115
116
117 test_nat_test_SOURCES = \
118   test_nat_test.c
119 test_nat_test_LDADD = \
120  libgnunetnat.la \
121  $(top_builddir)/src/util/libgnunetutil.la 
122
123 test_stun_SOURCES = \
124   test_stun.c
125 test_stun_LDADD = \
126  libgnunetnat.la \
127  $(top_builddir)/src/util/libgnunetutil.la 
128
129 EXTRA_DIST = \
130  test_nat_data.conf \
131  test_nat_test_data.conf \
132  test_stun.conf