X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fnat%2FMakefile.am;h=f0d5639a1627487aed94eddc1e2632a6d76e271f;hb=ccd23df541fac1192f492b0169cb87f0f23a726d;hp=50edd5f77edf4d0e0d5719dd018e16b845aa9aed;hpb=a0401360a9b8a78e6b7976f6dd50c50573aa1a7b;p=oweals%2Fgnunet.git diff --git a/src/nat/Makefile.am b/src/nat/Makefile.am index 50edd5f77..f0d5639a1 100644 --- a/src/nat/Makefile.am +++ b/src/nat/Makefile.am @@ -1,48 +1,127 @@ -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 -if USE_COVERAGE - AM_CFLAGS = -fprofile-arcs -ftest-coverage +libexecdir= $(pkglibdir)/libexec/ + +pkgcfgdir= $(pkgdatadir)/config.d/ + +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 $(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 $(DESTDIR)$(libexecdir) $(SUDO_BINARY) || true +endif +else +install-exec-hook: endif -lib_LTLIBRARIES = libgnunetnat.la +bin_PROGRAMS = \ + gnunet-nat + +libexec_PROGRAMS = \ + $(NATBIN) \ + gnunet-service-nat + + +gnunet_helper_nat_server_SOURCES = \ + $(NATSERVER) + +gnunet_helper_nat_client_SOURCES = \ + $(NATCLIENT) + -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 +gnunet_nat_SOURCES = \ + gnunet-nat.c nat.h +gnunet_nat_LDADD = \ + libgnunetnatnew.la \ + $(top_builddir)/src/util/libgnunetutil.la -libgnunetnat_la_CFLAGS = \ - -I$(top_scrdir)/include \ - -DDEBUG_UPNP -g -O0 -libgnunetnat_la_LIBADD = \ +if USE_COVERAGE + AM_CFLAGS = -fprofile-arcs -ftest-coverage +endif + +lib_LTLIBRARIES = \ + libgnunetnatnew.la + +libgnunetnatnew_la_SOURCES = \ + nat_api.c \ + nat_api_stun.c nat_stun.h \ + nat.h +libgnunetnatnew_la_LIBADD = \ $(top_builddir)/src/util/libgnunetutil.la \ $(GN_LIBINTL) @EXT_LIBS@ - -libgnunetnat_la_LDFLAGS = \ +libgnunetnatnew_la_LDFLAGS = \ $(GN_LIB_LDFLAGS) $(WINFLAGS) \ - -version-info 0:0:0 \ - @LIBCURL@ + -version-info 2:0:0 -check_PROGRAMS = \ - test-nat +gnunet_service_nat_SOURCES = \ + gnunet-service-nat.c gnunet-service-nat.h \ + gnunet-service-nat_externalip.c gnunet-service-nat_externalip.h \ + gnunet-service-nat_stun.c gnunet-service-nat_stun.h \ + gnunet-service-nat_mini.c gnunet-service-nat_mini.h \ + gnunet-service-nat_helper.c gnunet-service-nat_helper.h +gnunet_service_nat_LDADD = \ + $(top_builddir)/src/util/libgnunetutil.la \ + $(top_builddir)/src/statistics/libgnunetstatistics.la \ + $(LIBGCRYPT_LIBS) \ + -lgcrypt \ + $(GN_LIBINTL) + +#check_PROGRAMS = \ +# test_nat \ +# test_nat_mini \ +# test_nat_test \ +# test_stun -if !DISABLE_TEST_RUN -TESTS = $(check_PROGRAMS) +if ENABLE_TEST_RUN + AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;unset XDG_DATA_HOME;unset XDG_CONFIG_HOME; + TESTS = $(check_PROGRAMS) endif -test_nat_SOURCES = \ - test_nat.c +#test_nat_SOURCES = \ +# test_nat.c +#test_nat_LDADD = \ +# 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 -test_nat_LDADD = \ - $(top_builddir)/src/nat/libgnunetnat.la \ - $(top_builddir)/src/util/libgnunetutil.la \ - @LIBCURL@ +EXTRA_DIST = \ + test_nat_data.conf \ + test_nat_test_data.conf \ + test_stun.conf