7b738df4e8e19e824ffb45ff0cdc40c95f27e069
[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_test.c nat.h
47
48 libgnunetnat_la_LIBADD = \
49   $(top_builddir)/src/util/libgnunetutil.la \
50   $(GN_LIBINTL) @EXT_LIBS@ 
51
52 libgnunetnat_la_LDFLAGS = \
53   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
54   -version-info 0:0:0           
55
56 check_PROGRAMS = \
57   test-nat
58
59 if ENABLE_TEST_RUN
60  TESTS = $(check_PROGRAMS)
61 endif
62
63 test_nat_SOURCES = \
64   test_nat.c
65
66 test_nat_LDADD = \
67  $(top_builddir)/src/nat/libgnunetnat.la \
68  $(top_builddir)/src/util/libgnunetutil.la \
69  @LIBCURL@
70
71 EXTRA_DIST = \
72  test_nat_data.conf