renaming gnunet-nat-server/client for consistency, other minor fixes
[oweals/gnunet.git] / src / nat / Makefile.am
1 INCLUDES = -I$(top_srcdir)/src/include
2
3 if MINGW
4   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
5   NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
6   NATSERVER = gnunet-helper-nat-server-windows.c
7   NATCLIENT = gnunet-helper-nat-client-windows.c
8 endif
9
10 if LINUX
11 NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
12 NATSERVER = gnunet-helper-nat-server.c
13 NATCLIENT = gnunet-helper-nat-client.c
14 install-exec-hook:
15         chown root:root $(bindir)/gnunet-helper-nat-server $(bindir)/gnunet-helper-nat-client || true
16         chmod u+s $(bindir)/gnunet-helper-nat-server $(bindir)/gnunet-helper-nat-client || true
17 else
18 install-exec-hook:
19 endif
20
21 bin_PROGRAMS = \
22  gnunet-nat-server \
23  $(NATBIN) 
24
25 gnunet_nat_server_SOURCES = \
26  gnunet-nat-server.c
27 gnunet_nat_server_LDADD = \
28   $(top_builddir)/src/util/libgnunetutil.la 
29
30 gnunet_helper_nat_server_SOURCES = \
31  $(NATSERVER)
32
33 gnunet_helper_nat_client_SOURCES = \
34  $(NATCLIENT)         
35
36
37
38 if USE_COVERAGE
39   AM_CFLAGS = -fprofile-arcs -ftest-coverage
40 endif
41
42 lib_LTLIBRARIES = libgnunetnat.la
43
44 libgnunetnat_la_SOURCES = \
45   nat.c 
46
47 libgnunetnat_la_LIBADD = \
48   $(top_builddir)/src/util/libgnunetutil.la \
49   $(GN_LIBINTL) @EXT_LIBS@ 
50
51 libgnunetnat_la_LDFLAGS = \
52   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
53   -version-info 0:0:0           
54
55 check_PROGRAMS = \
56   test-nat
57
58 if ENABLE_TEST_RUN
59  TESTS = $(check_PROGRAMS)
60 endif
61
62 test_nat_SOURCES = \
63   test_nat.c
64
65 test_nat_LDADD = \
66  $(top_builddir)/src/nat/libgnunetnat.la \
67  $(top_builddir)/src/util/libgnunetutil.la \
68  @LIBCURL@
69
70 EXTRA_DIST = \
71  test_nat_data.conf