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