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