initialize response_code, always
[oweals/gnunet.git] / src / nat / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include
3
4 if MINGW
5   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
6   NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
7   NATSERVER = gnunet-helper-nat-server-windows.c
8   NATCLIENT = gnunet-helper-nat-client-windows.c
9 endif
10
11 libexecdir= $(pkglibdir)/libexec/
12
13 pkgcfgdir= $(pkgdatadir)/config.d/
14
15 pkgcfg_DATA = \
16   nat.conf
17
18 if LINUX
19   NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
20   NATSERVER = gnunet-helper-nat-server.c
21   NATCLIENT = gnunet-helper-nat-client.c
22 install-exec-hook:
23         $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true
24 else
25 if XFREEBSD
26   NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
27   NATSERVER = gnunet-helper-nat-server.c
28   NATCLIENT = gnunet-helper-nat-client.c
29 install-exec-hook:
30         $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true
31 endif
32 else
33 install-exec-hook:
34 endif
35
36 bin_PROGRAMS = \
37  gnunet-nat
38
39 libexec_PROGRAMS = \
40  $(NATBIN) \
41  gnunet-service-nat
42
43
44 gnunet_helper_nat_server_SOURCES = \
45  $(NATSERVER)
46
47 gnunet_helper_nat_client_SOURCES = \
48  $(NATCLIENT)         
49
50
51 gnunet_nat_SOURCES = \
52   gnunet-nat.c nat.h
53 gnunet_nat_LDADD = \
54   libgnunetnatnew.la \
55   $(top_builddir)/src/util/libgnunetutil.la
56
57
58 if USE_COVERAGE
59   AM_CFLAGS = -fprofile-arcs -ftest-coverage
60 endif
61
62 lib_LTLIBRARIES = \
63   libgnunetnatnew.la 
64
65 libgnunetnatnew_la_SOURCES = \
66   nat_api.c \
67   nat_api_stun.c nat_stun.h \
68   nat.h
69 libgnunetnatnew_la_LIBADD = \
70   $(top_builddir)/src/util/libgnunetutil.la \
71   $(GN_LIBINTL) @EXT_LIBS@ 
72 libgnunetnatnew_la_LDFLAGS = \
73   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
74   -version-info 2:0:0
75
76 gnunet_service_nat_SOURCES = \
77  gnunet-service-nat.c gnunet-service-nat.h \
78  gnunet-service-nat_externalip.c gnunet-service-nat_externalip.h \
79  gnunet-service-nat_stun.c gnunet-service-nat_stun.h \
80  gnunet-service-nat_mini.c gnunet-service-nat_mini.h \
81  gnunet-service-nat_helper.c gnunet-service-nat_helper.h
82 gnunet_service_nat_LDADD = \
83   $(top_builddir)/src/util/libgnunetutil.la \
84   $(top_builddir)/src/statistics/libgnunetstatistics.la \
85   $(LIBGCRYPT_LIBS) \
86   -lgcrypt \
87   $(GN_LIBINTL)
88
89 #check_PROGRAMS = \
90 #  test_nat \
91 #  test_nat_mini \
92 #  test_nat_test \
93 #  test_stun
94
95 if ENABLE_TEST_RUN
96  AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME;
97  TESTS = $(check_PROGRAMS)
98 endif
99
100 #test_nat_SOURCES = \
101 #  test_nat.c
102 #test_nat_LDADD = \
103 # libgnunetnat.la \
104 # $(top_builddir)/src/util/libgnunetutil.la 
105
106 #test_nat_mini_SOURCES = \
107 #  test_nat_mini.c
108 #test_nat_mini_LDADD = \
109 # libgnunetnat.la \
110 # $(top_builddir)/src/util/libgnunetutil.la 
111
112 #test_nat_test_SOURCES = \
113 #  test_nat_test.c
114 #test_nat_test_LDADD = \
115 # libgnunetnat.la \
116 # $(top_builddir)/src/util/libgnunetutil.la 
117
118 #test_stun_SOURCES = \
119 #  test_stun.c
120 #test_stun_LDADD = \
121 # libgnunetnat.la \
122 # $(top_builddir)/src/util/libgnunetutil.la 
123
124 EXTRA_DIST = \
125  test_nat_data.conf \
126  test_nat_test_data.conf \
127  test_stun.conf