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