-ensure external symbols have proper prefix for conversation service
[oweals/gnunet.git] / src / nat / Makefile.am
index 769b68bd1c74ba10b141ec408c8188d289d3e038..6690026d26bdf28f1e601a5e9ca43733af07beec 100644 (file)
@@ -1,4 +1,4 @@
-INCLUDES = -I$(top_srcdir)/src/include
+AM_CPPFLAGS = -I$(top_srcdir)/src/include
 
 if MINGW
   WINFLAGS = -Wl,--no-undefined -Wl,--export-all-symbols
@@ -7,19 +7,27 @@ if MINGW
   NATCLIENT = gnunet-helper-nat-client-windows.c
 endif
 
+libexecdir= $(pkglibdir)/libexec/
+
+pkgcfgdir= $(pkgdatadir)/config.d/
+
+dist_pkgcfg_DATA = \
+  nat.conf
+
 if LINUX
-NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client
-NATSERVER = gnunet-helper-nat-server.c
-NATCLIENT = gnunet-helper-nat-client.c
+  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
+       $(top_srcdir)/src/nat/install-nat-helper.sh $(libexecdir) $(SUDO_BINARY) || true
 else
 install-exec-hook:
 endif
 
 bin_PROGRAMS = \
- gnunet-nat-server \
+ gnunet-nat-server 
+
+libexec_PROGRAMS = \
  $(NATBIN) 
 
 gnunet_nat_server_SOURCES = \
@@ -27,6 +35,8 @@ gnunet_nat_server_SOURCES = \
 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)
@@ -44,8 +54,9 @@ lib_LTLIBRARIES = libgnunetnat.la
 
 libgnunetnat_la_SOURCES = \
   nat.c nat.h \
+  nat_auto.c \
   nat_test.c \
-  nat_mini.c
+  nat_mini.c 
 
 libgnunetnat_la_LIBADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
@@ -53,10 +64,11 @@ libgnunetnat_la_LIBADD = \
 
 libgnunetnat_la_LDFLAGS = \
   $(GN_LIB_LDFLAGS) $(WINFLAGS) \
-  -version-info 0:0:0          
+  -version-info 1:0:1
 
 check_PROGRAMS = \
   test_nat \
+  test_nat_mini \
   test_nat_test
 
 if ENABLE_TEST_RUN
@@ -69,6 +81,12 @@ test_nat_LDADD = \
  $(top_builddir)/src/nat/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 \
+ $(top_builddir)/src/util/libgnunetutil.la 
+
 
 test_nat_test_SOURCES = \
   test_nat_test.c