summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am5
-rw-r--r--configure.ac2
-rw-r--r--extensions/GNUmakefile.in4
-rw-r--r--iptables/Makefile.am18
-rw-r--r--libxtables/Makefile.am20
-rw-r--r--libxtables/xtables.c (renamed from iptables/xtables.c)0
-rw-r--r--libxtables/xtoptions.c (renamed from iptables/xtoptions.c)0
7 files changed, 28 insertions, 21 deletions
diff --git a/Makefile.am b/Makefile.am
index 9167e8e3..4eb63ebe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,7 @@
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = foreign subdir-objects
-SUBDIRS = libiptc iptables
+SUBDIRS = libiptc libxtables
if ENABLE_DEVEL
SUBDIRS += include
endif
@@ -13,7 +13,10 @@ endif
if HAVE_LIBNFNETLINK
SUBDIRS += utils
endif
+# Depends on libxtables:
SUBDIRS += extensions
+# Depends on extensions/libext.a:
+SUBDIRS += iptables
.PHONY: tarball
tarball:
diff --git a/configure.ac b/configure.ac
index 22b7bf15..8afba8c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -112,6 +112,6 @@ AC_SUBST([libxtables_vmajor])
AC_CONFIG_FILES([Makefile extensions/GNUmakefile include/Makefile
iptables/Makefile iptables/xtables.pc
libipq/Makefile libipq/libipq.pc
- libiptc/Makefile libiptc/libiptc.pc utils/Makefile
+ libiptc/Makefile libiptc/libiptc.pc libxtables/Makefile utils/Makefile
include/xtables.h include/iptables/internal.h])
AC_OUTPUT
diff --git a/extensions/GNUmakefile.in b/extensions/GNUmakefile.in
index 60f28c0c..221c2c91 100644
--- a/extensions/GNUmakefile.in
+++ b/extensions/GNUmakefile.in
@@ -72,10 +72,10 @@ all: ${targets} check
check: ${targets}
@echo " CHECK unknown symbols in .so files"; \
- . ../iptables/libxtables.la; \
+ . ../libxtables/libxtables.la; \
for i in "" lib*.so; do \
[ -z "$$i" ] && continue; \
- LD_PRELOAD="$$dlname" LD_LIBRARY_PATH=../iptables/.libs \
+ LD_PRELOAD="$$dlname" LD_LIBRARY_PATH=../libxtables/.libs \
ldd -r $$i 2>&1 >/dev/null; \
done;
diff --git a/iptables/Makefile.am b/iptables/Makefile.am
index af620f76..bdd4da11 100644
--- a/iptables/Makefile.am
+++ b/iptables/Makefile.am
@@ -3,22 +3,6 @@
AM_CFLAGS = ${regular_CFLAGS}
AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_srcdir}/include ${kinclude_CPPFLAGS}
-lib_LTLIBRARIES = libxtables.la
-libxtables_la_SOURCES = xtables.c xtoptions.c
-libxtables_la_LDFLAGS = -version-info ${libxtables_vcurrent}:0:${libxtables_vage}
-libxtables_la_LIBADD =
-if ENABLE_STATIC
-# With --enable-static, shipped extensions are linked into the main executable,
-# so we need all the LIBADDs here too
-libxtables_la_LIBADD += -lm
-endif
-if ENABLE_SHARED
-libxtables_la_CFLAGS = ${AM_CFLAGS}
-libxtables_la_LIBADD += -ldl
-else
-libxtables_la_CFLAGS = ${AM_CFLAGS} -DNO_SHARED_LIBS=1
-endif
-
xtables_multi_SOURCES = xtables-multi.c iptables-xml.c
xtables_multi_CFLAGS = ${AM_CFLAGS}
xtables_multi_LDADD = ../extensions/libext.a
@@ -38,7 +22,7 @@ xtables_multi_CFLAGS += -DENABLE_IPV6
xtables_multi_LDADD += ../libiptc/libip6tc.la ../extensions/libext6.a
endif
xtables_multi_SOURCES += xshared.c
-xtables_multi_LDADD += libxtables.la -lm
+xtables_multi_LDADD += ../libxtables/libxtables.la -lm
sbin_PROGRAMS = xtables-multi
man_MANS = iptables.8 iptables-restore.8 iptables-save.8 \
diff --git a/libxtables/Makefile.am b/libxtables/Makefile.am
new file mode 100644
index 00000000..c5795fef
--- /dev/null
+++ b/libxtables/Makefile.am
@@ -0,0 +1,20 @@
+# -*- Makefile -*-
+
+AM_CFLAGS = ${regular_CFLAGS}
+AM_CPPFLAGS = ${regular_CPPFLAGS} -I${top_builddir}/include -I${top_srcdir}/include -I${top_srcdir}/iptables ${kinclude_CPPFLAGS}
+
+lib_LTLIBRARIES = libxtables.la
+libxtables_la_SOURCES = xtables.c xtoptions.c
+libxtables_la_LDFLAGS = -version-info ${libxtables_vcurrent}:0:${libxtables_vage}
+libxtables_la_LIBADD =
+if ENABLE_STATIC
+# With --enable-static, shipped extensions are linked into the main executable,
+# so we need all the LIBADDs here too
+libxtables_la_LIBADD += -lm
+endif
+if ENABLE_SHARED
+libxtables_la_CFLAGS = ${AM_CFLAGS}
+libxtables_la_LIBADD += -ldl
+else
+libxtables_la_CFLAGS = ${AM_CFLAGS} -DNO_SHARED_LIBS=1
+endif
diff --git a/iptables/xtables.c b/libxtables/xtables.c
index 014e115b..014e115b 100644
--- a/iptables/xtables.c
+++ b/libxtables/xtables.c
diff --git a/iptables/xtoptions.c b/libxtables/xtoptions.c
index 5f617a42..5f617a42 100644
--- a/iptables/xtoptions.c
+++ b/libxtables/xtoptions.c