769b68bd1c74ba10b141ec408c8188d289d3e038
[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 nat.h
27 gnunet_nat_server_LDADD = \
28   $(top_builddir)/src/nat/libgnunetnat.la \
29   $(top_builddir)/src/util/libgnunetutil.la
30
31 gnunet_helper_nat_server_SOURCES = \
32  $(NATSERVER)
33
34 gnunet_helper_nat_client_SOURCES = \
35  $(NATCLIENT)         
36
37
38
39 if USE_COVERAGE
40   AM_CFLAGS = -fprofile-arcs -ftest-coverage
41 endif
42
43 lib_LTLIBRARIES = libgnunetnat.la
44
45 libgnunetnat_la_SOURCES = \
46   nat.c nat.h \
47   nat_test.c \
48   nat_mini.c
49
50 libgnunetnat_la_LIBADD = \
51   $(top_builddir)/src/util/libgnunetutil.la \
52   $(GN_LIBINTL) @EXT_LIBS@ 
53
54 libgnunetnat_la_LDFLAGS = \
55   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
56   -version-info 0:0:0           
57
58 check_PROGRAMS = \
59   test_nat \
60   test_nat_test
61
62 if ENABLE_TEST_RUN
63  TESTS = $(check_PROGRAMS)
64 endif
65
66 test_nat_SOURCES = \
67   test_nat.c
68 test_nat_LDADD = \
69  $(top_builddir)/src/nat/libgnunetnat.la \
70  $(top_builddir)/src/util/libgnunetutil.la 
71
72
73 test_nat_test_SOURCES = \
74   test_nat_test.c
75 test_nat_test_LDADD = \
76  $(top_builddir)/src/nat/libgnunetnat.la \
77  $(top_builddir)/src/util/libgnunetutil.la 
78
79
80 EXTRA_DIST = \
81  test_nat_data.conf \
82  test_nat_test_data.conf