X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=src%2Fnat%2FMakefile.am;h=72ac0a1f0e25f0d8776b73b8d82ea8b3dd30eb54;hb=1b4ccddc7946888fc0b66c58b1434e1814a43822;hp=769b68bd1c74ba10b141ec408c8188d289d3e038;hpb=1c5ace41aa144afd32221db565c6f627765afdd0;p=oweals%2Fgnunet.git diff --git a/src/nat/Makefile.am b/src/nat/Makefile.am index 769b68bd1..72ac0a1f0 100644 --- a/src/nat/Makefile.am +++ b/src/nat/Makefile.am @@ -1,4 +1,5 @@ -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 @@ -7,25 +8,41 @@ 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 +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 \ + gnunet-nat-server + +libexec_PROGRAMS = \ $(NATBIN) gnunet_nat_server_SOURCES = \ gnunet-nat-server.c nat.h gnunet_nat_server_LDADD = \ - $(top_builddir)/src/nat/libgnunetnat.la \ + libgnunetnat.la \ $(top_builddir)/src/util/libgnunetutil.la gnunet_helper_nat_server_SOURCES = \ @@ -44,8 +61,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,30 +71,38 @@ libgnunetnat_la_LIBADD = \ libgnunetnat_la_LDFLAGS = \ $(GN_LIB_LDFLAGS) $(WINFLAGS) \ - -version-info 0:0:0 + -version-info 1:1:1 check_PROGRAMS = \ test_nat \ + test_nat_mini \ test_nat_test 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 \ + 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 = \ - $(top_builddir)/src/nat/libgnunetnat.la \ + libgnunetnat.la \ $(top_builddir)/src/util/libgnunetutil.la EXTRA_DIST = \ test_nat_data.conf \ - test_nat_test_data.conf \ No newline at end of file + test_nat_test_data.conf