fix #4546
[oweals/gnunet.git] / src / nat / Makefile.am
index e5630519cbf49a1b9e06fffb9ae37105bf66220a..5e89ac24d7f98e75d7c9f3d4fbd82a7b61b48802 100644 (file)
@@ -1,3 +1,4 @@
+# This Makefile.am is in the public domain
 AM_CPPFLAGS = -I$(top_srcdir)/src/include
 
 if MINGW
@@ -19,21 +20,22 @@ if LINUX
   NATSERVER = gnunet-helper-nat-server.c
   NATCLIENT = gnunet-helper-nat-client.c
 install-exec-hook:
-       $(top_srcdir)/src/nat/install-nat-helper.sh $(libexecdir) $(SUDO_BINARY) || true
+       $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true
 else
 if XFREEBSD
   NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
   NATSERVER = gnunet-helper-nat-server.c
   NATCLIENT = gnunet-helper-nat-client.c
 install-exec-hook:
-       $(top_srcdir)/src/nat/install-nat-helper.sh $(libexecdir) $(SUDO_BINARY) || true
+       $(top_srcdir)/src/nat/install-nat-helper.sh $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true
 endif
 else
 install-exec-hook:
 endif
 
 bin_PROGRAMS = \
- gnunet-nat-server 
+ gnunet-nat-server \
+ gnunet-nat
 
 libexec_PROGRAMS = \
  $(NATBIN) 
@@ -41,10 +43,8 @@ libexec_PROGRAMS = \
 gnunet_nat_server_SOURCES = \
  gnunet-nat-server.c nat.h
 gnunet_nat_server_LDADD = \
-  $(top_builddir)/src/nat/libgnunetnat.la \
+  libgnunetnat.la \
   $(top_builddir)/src/util/libgnunetutil.la
-gnunet_nat_server_DEPENDENCIES = \
-  libgnunetnat.la
 
 gnunet_helper_nat_server_SOURCES = \
  $(NATSERVER)
@@ -52,6 +52,12 @@ gnunet_helper_nat_server_SOURCES = \
 gnunet_helper_nat_client_SOURCES = \
  $(NATCLIENT)         
 
+gnunet_nat_SOURCES = \
+gnunet-nat.c nat.h
+gnunet_nat_LDADD = \
+  libgnunetnat.la \
+  $(top_builddir)/src/util/libgnunetutil.la
 
 
 if USE_COVERAGE
@@ -64,7 +70,8 @@ libgnunetnat_la_SOURCES = \
   nat.c nat.h \
   nat_auto.c \
   nat_test.c \
-  nat_mini.c 
+  nat_mini.c \
+  nat_stun.c
 
 libgnunetnat_la_LIBADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
@@ -72,37 +79,45 @@ libgnunetnat_la_LIBADD = \
 
 libgnunetnat_la_LDFLAGS = \
   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
-  -version-info 1:0:1
+  -version-info 1:1:1
 
 check_PROGRAMS = \
   test_nat \
   test_nat_mini \
-  test_nat_test
+  test_nat_test \
+  test_stun
 
 if ENABLE_TEST_RUN
+ AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
  TESTS = $(check_PROGRAMS)
 endif
 
 test_nat_SOURCES = \
   test_nat.c
 test_nat_LDADD = \
$(top_builddir)/src/nat/libgnunetnat.la \
+ libgnunetnat.la \
  $(top_builddir)/src/util/libgnunetutil.la 
 
 test_nat_mini_SOURCES = \
   test_nat_mini.c
 test_nat_mini_LDADD = \
$(top_builddir)/src/nat/libgnunetnat.la \
+ libgnunetnat.la \
  $(top_builddir)/src/util/libgnunetutil.la 
 
 
 test_nat_test_SOURCES = \
   test_nat_test.c
 test_nat_test_LDADD = \
$(top_builddir)/src/nat/libgnunetnat.la \
+ libgnunetnat.la \
  $(top_builddir)/src/util/libgnunetutil.la 
 
+test_stun_SOURCES = \
+  test_stun.c
+test_stun_LDADD = \
+ libgnunetnat.la \
+ $(top_builddir)/src/util/libgnunetutil.la 
 
 EXTRA_DIST = \
  test_nat_data.conf \
- test_nat_test_data.conf 
+ test_nat_test_data.conf \
+ test_stun.conf