/Makefile
/build-aux
+/config.*
+/libtool
/missing
/src/functions/functions
/src/inetcalc
+/src/libnetwork/libnetwork.pc
/src/network.pc
/src/ppp/ip-updown
/src/systemd/*.service
/*.tar.xz
*.log
*.cache
+*.la
+*.lo
*.o
*.stamp
*.trs
*~
.deps
.dirstamp
+.libs
Makefile.in
aclocal.m4
config.status
bashcompletiondir= $(datadir)/bash-completion/completions
libexecdir = $(prefix)/lib
-pkgconfigdatadir = $(datadir)/pkgconfig
+pkgconfigdir = $(libdir)/pkgconfig
pppdir = $(sysconfdir)/ppp
systemconfigdir = $(datadir)/network
sysctldir = $(prefix)/lib/sysctl.d
UNINSTALL_EXEC_HOOKS =
noinst_DATA =
-AM_CFLAGS = $(OUR_CFLAGS)
-AM_CPPFLAGS = $(OUR_CPPFLAGS)
-AM_LDFLAGS = $(OUR_LDFLAGS)
+AM_CPPFLAGS = \
+ $(OUR_CPPFLAGS) \
+ -include $(top_builddir)/config.h \
+ -I${top_srcdir}/src/libnetwork
+
+AM_CFLAGS = \
+ $(OUR_CFLAGS) \
+ -fvisibility=hidden \
+ -ffunction-sections \
+ -fdata-sections
+
+AM_LDFLAGS = \
+ $(OUR_LDFLAGS) \
+ -Wl,--gc-sections \
+ -Wl,--as-needed
DISTCHECK_CONFIGURE_FLAGS = \
--with-systemdsystemunitdir=$$dc_install_base/$(systemdsystemunitdir) \
src_inetcalc_SOURCES = \
src/inetcalc.c
+src_inetcalc_LDADD = \
+ src/libnetwork.la
+
dist_hooks_configs_SCRIPTS = \
src/hooks/configs/dhcp \
src/hooks/configs/ipv4-static \
# ------------------------------------------------------------------------------
+LIBNETWORK_CURRENT=0
+LIBNETWORK_REVISION=0
+LIBNETWORK_AGE=0
+
+pkginclude_HEADERS = \
+ src/libnetwork/network/libnetwork.h
+
+lib_LTLIBRARIES = \
+ src/libnetwork.la
+
+src_libnetwork_la_SOURCES = \
+ src/libnetwork/libnetwork-private.h \
+ src/libnetwork/libnetwork.c
+
+src_libnetwork_la_LDFLAGS = \
+ $(AM_LDFLAGS) \
+ -version-info $(LIBNETWORK_CURRENT):$(LIBNETWORK_REVISION):$(LIBNETWORK_AGE) \
+ -Wl,--version-script=$(top_srcdir)/src/libnetwork/libnetwork.sym
+
+src_libnetwork_la_DEPENDENCIES = \
+ src/libnetwork/libnetwork.sym
+
+EXTRA_DIST += \
+ src/libnetwork/libnetwork.sym
+
+# ------------------------------------------------------------------------------
+
ppp_SCRIPTS = \
src/ppp/ip-updown
# ------------------------------------------------------------------------------
-pkgconfigdata_DATA = \
+pkgconfig_DATA = \
src/network.pc
CLEANFILES += \
- $(pkgconfigdata_DATA)
+ $(pkgconfig_DATA)
EXTRA_DIST += \
src/network.pc.in
])
AM_SILENT_RULES([yes])
+LT_INIT([
+ disable-static
+ pic-only
+])
+
AC_PROG_LN_S
AC_PROG_MKDIR_P
AC_PROG_SED
AM_CONDITIONAL(HAVE_UDEV, [test -n "$with_udevdir"])
# ------------------------------------------------------------------------------
+AC_CONFIG_HEADERS(config.h)
AC_CONFIG_FILES([
Makefile
])
#include <string.h>
#include <sys/socket.h>
+#include <network/libnetwork.h>
+
typedef struct ip_address {
int family;
struct in6_addr addr;
int family = AF_UNSPEC;
while (1) {
- int c = getopt_long(argc, argv, "46bcefgnpsv", long_options, &option_index);
+ int c = getopt_long(argc, argv, "46bcefgnpsviV", long_options, &option_index);
if (c == -1)
break;
verbose = 1;
break;
+ case 'V':
+ printf("%s\n", network_version());
+ exit(0);
+ break;
+
case '?':
break;
--- /dev/null
+/*#############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2017 IPFire Network Development Team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+#############################################################################*/
+
+#ifndef LIBNETWORK_PRIVATE_H
+#define LIBNETWORK_PRIVATE_H
+
+#define NETWORK_EXPORT __attribute__ ((visibility("default")))
+
+#endif
--- /dev/null
+/*#############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2017 IPFire Network Development Team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+#############################################################################*/
+
+#include <network/libnetwork.h>
+#include "libnetwork-private.h"
+
+NETWORK_EXPORT const char* network_version() {
+ return "network " VERSION;
+}
--- /dev/null
+LIBNETWORK_0 {
+global:
+ network_version;
+local:
+ *;
+};
--- /dev/null
+/*#############################################################################
+# #
+# IPFire.org - A linux based firewall #
+# Copyright (C) 2017 IPFire Network Development Team #
+# #
+# This program is free software: you can redistribute it and/or modify #
+# it under the terms of the GNU General Public License as published by #
+# the Free Software Foundation, either version 3 of the License, or #
+# (at your option) any later version. #
+# #
+# This program is distributed in the hope that it will be useful, #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
+# GNU General Public License for more details. #
+# #
+# You should have received a copy of the GNU General Public License #
+# along with this program. If not, see <http://www.gnu.org/licenses/>. #
+# #
+#############################################################################*/
+
+#ifndef LIBNETWORK_H
+#define LIBNETWORK_H
+
+const char* network_version();
+
+#endif
prefix=@prefix@
exec_prefix=@exec_prefix@
+includedir=@includedir@
+libdir=@libdir@
networkdir=@networkdir@
Name: network
Description: Network configuration tools for IPFire
URL: @PACKAGE_URL@
Version: @PACKAGE_VERSION@
+Libs: -L${libdir} -lnetwork
+Libs.private:
+Cflags: -I${includedir}