X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fnat%2FMakefile.am;h=063b8e3ab6294104a460d2d7aef83ba688beb4db;hb=20d8a41eaa19064d16e9a004dea2d9abcdbd9731;hp=3ec124c5e508b4061db321cc770e63fb6faf9219;hpb=bb960e581aff44f7890440faccb3383d0e105ca4;p=oweals%2Fgnunet.git diff --git a/src/nat/Makefile.am b/src/nat/Makefile.am index 3ec124c5e..063b8e3ab 100644 --- a/src/nat/Makefile.am +++ b/src/nat/Makefile.am @@ -1,10 +1,57 @@ -SUBDIRS = miniupnp libnatpmp - -INCLUDES = -I$(top_srcdir)/src/include +# This Makefile.am is in the public domain +AM_CPPFLAGS = -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 + +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 +install-exec-hook: + $(top_srcdir)/src/nat/install-nat-helper.sh $(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 endif +else +install-exec-hook: +endif + +bin_PROGRAMS = \ + gnunet-nat-server + +libexec_PROGRAMS = \ + $(NATBIN) + +gnunet_nat_server_SOURCES = \ + gnunet-nat-server.c nat.h +gnunet_nat_server_LDADD = \ + 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 @@ -13,32 +60,56 @@ endif lib_LTLIBRARIES = libgnunetnat.la libgnunetnat_la_SOURCES = \ - upnp.c upnp.h \ - natpmp.c natpmp.h \ - nat.c - -libgnunetnat_la_CFLAGS = \ - -I$(top_scrdir)/include + nat.c nat.h \ + nat_auto.c \ + nat_test.c \ + nat_mini.c \ + nat_stun.c libgnunetnat_la_LIBADD = \ $(top_builddir)/src/util/libgnunetutil.la \ - $(top_builddir)/src/nat/miniupnp/libminiupnp.la \ - $(top_builddir)/src/nat/libnatpmp/libnatpmp.la \ - $(GN_LIBINTL) @EXT_LIBS@ + $(GN_LIBINTL) @EXT_LIBS@ libgnunetnat_la_LDFLAGS = \ $(GN_LIB_LDFLAGS) $(WINFLAGS) \ - -version-info 0:0:0 + -version-info 1:1:1 check_PROGRAMS = \ - test-nat + test_nat \ + test_nat_mini \ + test_nat_test \ + test_stun -TESTS = $(check_PROGRAMS) +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 \ - $(top_builddir)/src/util/libgnunetutil.la + libgnunetnat.la \ + $(top_builddir)/src/util/libgnunetutil.la + +test_nat_mini_SOURCES = \ + test_nat_mini.c +test_nat_mini_LDADD = \ + libgnunetnat.la \ + $(top_builddir)/src/util/libgnunetutil.la + + +test_nat_test_SOURCES = \ + test_nat_test.c +test_nat_test_LDADD = \ + 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