fixing 2012: network structure alignment now forced to be correct even on W32 using...
[oweals/gnunet.git] / src / nat / Makefile.am
index a60b4b5f3daa2c5b653624c6e51c731184d65af8..ed3a1545ae5cc281836dbad82cdcc9df3067e4aa 100644 (file)
@@ -2,36 +2,52 @@ INCLUDES = -I$(top_srcdir)/src/include
 
 if MINGW
   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
-  NATBIN = gnunet-nat-server gnunet-nat-client
-  NATSERVER = gnunet-nat-server-windows.c
-  NATCLIENT = gnunet-nat-client-windows.c
-else
-  NATSERVER = gnunet-nat-server.c
-  NATCLIENT = gnunet-nat-client.c
+  NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
+  NATSERVER = gnunet-helper-nat-server-windows.c
+  NATCLIENT = gnunet-helper-nat-client-windows.c
 endif
 
+pkgcfgdir= $(pkgdatadir)/config.d/
+
+dist_pkgcfg_DATA = \
+  nat.conf
+
+
+if ENABLE_TEST_RUN
+ nattest = $(bindir)/gnunet-nat-server
+endif
+
+
 if LINUX
-NATBIN = gnunet-nat-server gnunet-nat-client
+NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
+NATSERVER = gnunet-helper-nat-server.c
+NATCLIENT = gnunet-helper-nat-client.c
 install-exec-hook:
-       chown root:root $(bindir)/gnunet-nat-server $(bindir)/gnunet-nat-client $(bindir)/gnunet-transport-wlan-helper || true
-       chmod u+s $(bindir)/gnunet-nat-server $(bindir)/gnunet-nat-client $(bindir)/gnunet-transport-wlan-helper || true
+       $(SUDO_BINARY) chown root:root $(bindir)/gnunet-helper-nat-server $(bindir)/gnunet-helper-nat-client $(nattest) || true
+       $(SUDO_BINARY) chmod u+s $(bindir)/gnunet-helper-nat-server $(bindir)/gnunet-helper-nat-client $(nattest) || true
 else
 install-exec-hook:
 endif
 
 bin_PROGRAMS = \
+ gnunet-nat-server \
  $(NATBIN) 
 
 gnunet_nat_server_SOURCES = \
+ gnunet-nat-server.c nat.h
+gnunet_nat_server_LDADD = \
+  $(top_builddir)/src/nat/libgnunetnat.la \
+  $(top_builddir)/src/util/libgnunetutil.la
+gnunet_nat_server_DEPENDENCIES = \
+  libgnunetnat.la
+
+gnunet_helper_nat_server_SOURCES = \
  $(NATSERVER)
 
-gnunet_nat_client_SOURCES = \
+gnunet_helper_nat_client_SOURCES = \
  $(NATCLIENT)         
 
 
-if MINGW
-  WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
-endif
 
 if USE_COVERAGE
   AM_CFLAGS = -fprofile-arcs -ftest-coverage
@@ -40,7 +56,9 @@ endif
 lib_LTLIBRARIES = libgnunetnat.la
 
 libgnunetnat_la_SOURCES = \
-  nat.c 
+  nat.c nat.h \
+  nat_test.c \
+  nat_mini.c
 
 libgnunetnat_la_LIBADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
@@ -51,7 +69,9 @@ libgnunetnat_la_LDFLAGS = \
   -version-info 0:0:0          
 
 check_PROGRAMS = \
-  test-nat
+  test_nat \
+  test_nat_mini \
+  test_nat_test
 
 if ENABLE_TEST_RUN
  TESTS = $(check_PROGRAMS)
@@ -59,11 +79,24 @@ endif
 
 test_nat_SOURCES = \
   test_nat.c
-
 test_nat_LDADD = \
  $(top_builddir)/src/nat/libgnunetnat.la \
- $(top_builddir)/src/util/libgnunetutil.la \
- @LIBCURL@
+ $(top_builddir)/src/util/libgnunetutil.la 
+
+test_nat_mini_SOURCES = \
+  test_nat_mini.c
+test_nat_mini_LDADD = \
+ $(top_builddir)/src/nat/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 \
+ $(top_builddir)/src/util/libgnunetutil.la 
+
 
 EXTRA_DIST = \
- test_nat_data.conf
+ test_nat_data.conf \
+ test_nat_test_data.conf 
\ No newline at end of file