(no commit message)
[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 pkgcfgdir= $(pkgdatadir)/config.d/
11
12 dist_pkgcfg_DATA = \
13   nat.conf
14
15 if LINUX
16 NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
17 NATSERVER = gnunet-helper-nat-server.c
18 NATCLIENT = gnunet-helper-nat-client.c
19 install-exec-hook:
20         $(top_srcdir)/src/nat/install-nat-helper.sh $(bindir) $(SUDO_BINARY) || true
21 else
22 install-exec-hook:
23 endif
24
25 bin_PROGRAMS = \
26  gnunet-nat-server \
27  $(NATBIN) 
28
29 gnunet_nat_server_SOURCES = \
30  gnunet-nat-server.c nat.h
31 gnunet_nat_server_LDADD = \
32   $(top_builddir)/src/nat/libgnunetnat.la \
33   $(top_builddir)/src/util/libgnunetutil.la
34 gnunet_nat_server_DEPENDENCIES = \
35   libgnunetnat.la
36
37 gnunet_helper_nat_server_SOURCES = \
38  $(NATSERVER)
39
40 gnunet_helper_nat_client_SOURCES = \
41  $(NATCLIENT)         
42
43
44
45 if USE_COVERAGE
46   AM_CFLAGS = -fprofile-arcs -ftest-coverage
47 endif
48
49 lib_LTLIBRARIES = libgnunetnat.la
50
51 libgnunetnat_la_SOURCES = \
52   nat.c nat.h \
53   nat_test.c \
54   nat_mini.c
55
56 libgnunetnat_la_LIBADD = \
57   $(top_builddir)/src/util/libgnunetutil.la \
58   $(GN_LIBINTL) @EXT_LIBS@ 
59
60 libgnunetnat_la_LDFLAGS = \
61   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
62   -version-info 0:0:0           
63
64 check_PROGRAMS = \
65   test_nat \
66   test_nat_mini \
67   test_nat_test
68
69 if ENABLE_TEST_RUN
70  TESTS = $(check_PROGRAMS)
71 endif
72
73 test_nat_SOURCES = \
74   test_nat.c
75 test_nat_LDADD = \
76  $(top_builddir)/src/nat/libgnunetnat.la \
77  $(top_builddir)/src/util/libgnunetutil.la 
78
79 test_nat_mini_SOURCES = \
80   test_nat_mini.c
81 test_nat_mini_LDADD = \
82  $(top_builddir)/src/nat/libgnunetnat.la \
83  $(top_builddir)/src/util/libgnunetutil.la 
84
85
86 test_nat_test_SOURCES = \
87   test_nat_test.c
88 test_nat_test_LDADD = \
89  $(top_builddir)/src/nat/libgnunetnat.la \
90  $(top_builddir)/src/util/libgnunetutil.la 
91
92
93 EXTRA_DIST = \
94  test_nat_data.conf \
95  test_nat_test_data.conf