indent
[oweals/gnunet.git] / src / nat / Makefile.am
index 1b53095f33995ca46c223ed020c7f95cb8258d7e..7b738df4e8e19e824ffb45ff0cdc40c95f27e069 100644 (file)
@@ -2,30 +2,48 @@ INCLUDES = -I$(top_srcdir)/src/include
 
 if MINGW
   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
+  NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
+  NATSERVER = gnunet-helper-nat-server-windows.c
+  NATCLIENT = gnunet-helper-nat-client-windows.c
 endif
 
+if LINUX
+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-helper-nat-server $(bindir)/gnunet-helper-nat-client || true
+       chmod u+s $(bindir)/gnunet-helper-nat-server $(bindir)/gnunet-helper-nat-client || 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_helper_nat_server_SOURCES = \
+ $(NATSERVER)
+
+gnunet_helper_nat_client_SOURCES = \
+ $(NATCLIENT)         
+
+
+
 if USE_COVERAGE
   AM_CFLAGS = -fprofile-arcs -ftest-coverage
 endif
 
-if !MINGW
-
-if HAVE_EXPERIMENTAL
 lib_LTLIBRARIES = libgnunetnat.la
-endif
 
 libgnunetnat_la_SOURCES = \
-  upnp.c upnp.h \
-  upnp-commands.c upnp-commands.h \
-  upnp-discover.c upnp-discover.h \
-  upnp-igd-parse.c upnp-igd-parse.h \
-  upnp-minixml.c upnp-minixml.h \
-  upnp-reply-parse.c upnp-reply-parse.h bsdqueue.h \
-  nat.c 
-
-libgnunetnat_la_CFLAGS = \
- -I$(top_scrdir)/include \
- -DDEBUG_UPNP -g -O0
+  nat.c nat_test.c nat.h
 
 libgnunetnat_la_LIBADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
@@ -33,15 +51,13 @@ libgnunetnat_la_LIBADD = \
 
 libgnunetnat_la_LDFLAGS = \
   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
-  -version-info 0:0:0
+  -version-info 0:0:0          
 
-if HAVE_EXPERIMENTAL
 check_PROGRAMS = \
   test-nat
-endif
 
-if !DISABLE_TEST_RUN
-TESTS = $(check_PROGRAMS)
+if ENABLE_TEST_RUN
+ TESTS = $(check_PROGRAMS)
 endif
 
 test_nat_SOURCES = \
@@ -51,4 +67,6 @@ test_nat_LDADD = \
  $(top_builddir)/src/nat/libgnunetnat.la \
  $(top_builddir)/src/util/libgnunetutil.la \
  @LIBCURL@
-endif
+
+EXTRA_DIST = \
+ test_nat_data.conf