2017-03-22 15:02:09 +00:00
|
|
|
--- a/extensions/GNUmakefile.in
|
|
|
|
+++ b/extensions/GNUmakefile.in
|
|
|
|
@@ -85,7 +85,7 @@ pf6_solibs := $(patsubst %,libip6t_%.
|
2015-05-26 09:16:50 +00:00
|
|
|
#
|
|
|
|
# Building blocks
|
|
|
|
#
|
2017-03-22 15:02:09 +00:00
|
|
|
-targets := libext.a libext4.a libext6.a libext_ebt.a libext_arpt.a matches.man targets.man
|
|
|
|
+targets := libiptext.so libiptext4.so libiptext6.so libiptext_ebt.so libiptext_arpt.so matches.man targets.man
|
2015-05-26 09:16:50 +00:00
|
|
|
targets_install :=
|
|
|
|
libext_objs := ${pfx_objs}
|
2017-03-22 15:02:09 +00:00
|
|
|
libext_ebt_objs := ${pfb_objs}
|
|
|
|
@@ -112,7 +112,7 @@ clean:
|
2015-05-26 09:16:50 +00:00
|
|
|
distclean: clean
|
|
|
|
|
|
|
|
init%.o: init%.c
|
|
|
|
- ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=$*_init ${CFLAGS} -o $@ -c $<;
|
|
|
|
+ ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -D_INIT=$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
|
|
|
|
|
|
|
|
-include .*.d
|
|
|
|
|
2017-03-22 15:02:09 +00:00
|
|
|
@@ -144,22 +144,22 @@ xt_connlabel_LIBADD = @libnetfilter_conn
|
2015-05-26 09:16:50 +00:00
|
|
|
# handling code in the Makefiles.
|
|
|
|
#
|
|
|
|
lib%.o: ${srcdir}/lib%.c
|
|
|
|
- ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -DNO_SHARED_LIBS=1 -D_INIT=lib$*_init ${CFLAGS} -o $@ -c $<;
|
|
|
|
+ ${AM_VERBOSE_CC} ${CC} ${AM_CPPFLAGS} ${AM_DEPFLAGS} ${AM_CFLAGS} -DNO_SHARED_LIBS=1 -D_INIT=lib$*_init -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
|
|
|
|
|
|
|
|
-libext.a: initext.o ${libext_objs}
|
|
|
|
- ${AM_VERBOSE_AR} ${AR} crs $@ $^;
|
|
|
|
+libiptext.so: initext.o ${libext_objs}
|
|
|
|
+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD};
|
|
|
|
|
2017-03-22 15:02:09 +00:00
|
|
|
-libext_ebt.a: initextb.o ${libext_ebt_objs}
|
|
|
|
- ${AM_VERBOSE_AR} ${AR} crs $@ $^;
|
2017-05-25 17:30:06 +00:00
|
|
|
+libiptext_ebt.so: initextb.o ${libext_ebt_objs}
|
2017-03-22 15:02:09 +00:00
|
|
|
+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD};
|
|
|
|
|
|
|
|
-libext_arpt.a: initexta.o ${libext_arpt_objs}
|
|
|
|
- ${AM_VERBOSE_AR} ${AR} crs $@ $^;
|
2017-05-25 17:30:06 +00:00
|
|
|
+libiptext_arpt.so: initexta.o ${libext_arpt_objs}
|
2017-03-22 15:02:09 +00:00
|
|
|
+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD};
|
|
|
|
|
2015-05-26 09:16:50 +00:00
|
|
|
-libext4.a: initext4.o ${libext4_objs}
|
|
|
|
- ${AM_VERBOSE_AR} ${AR} crs $@ $^;
|
|
|
|
+libiptext4.so: initext4.o ${libext4_objs}
|
|
|
|
+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD};
|
|
|
|
|
|
|
|
-libext6.a: initext6.o ${libext6_objs}
|
|
|
|
- ${AM_VERBOSE_AR} ${AR} crs $@ $^;
|
|
|
|
+libiptext6.so: initext6.o ${libext6_objs}
|
|
|
|
+ ${AM_VERBOSE_CCLD} ${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $^ -L../libxtables/.libs -lxtables ${$*_LIBADD};
|
|
|
|
|
|
|
|
initext_func := $(addprefix xt_,${pfx_build_static})
|
2017-03-22 15:02:09 +00:00
|
|
|
initextb_func := $(addprefix ebt_,${pfb_build_static})
|
|
|
|
--- a/iptables/Makefile.am
|
|
|
|
+++ b/iptables/Makefile.am
|
|
|
|
@@ -8,7 +8,8 @@ BUILT_SOURCES =
|
2015-05-26 09:16:50 +00:00
|
|
|
|
|
|
|
xtables_multi_SOURCES = xtables-multi.c iptables-xml.c
|
|
|
|
xtables_multi_CFLAGS = ${AM_CFLAGS}
|
|
|
|
-xtables_multi_LDADD = ../extensions/libext.a
|
|
|
|
+xtables_multi_LDADD =
|
|
|
|
+xtables_multi_LDFLAGS = -L../extensions/ -liptext
|
|
|
|
if ENABLE_STATIC
|
|
|
|
xtables_multi_CFLAGS += -DALL_INCLUSIVE
|
|
|
|
endif
|
2017-03-22 15:02:09 +00:00
|
|
|
@@ -16,13 +17,15 @@ if ENABLE_IPV4
|
2015-05-26 09:16:50 +00:00
|
|
|
xtables_multi_SOURCES += iptables-save.c iptables-restore.c \
|
|
|
|
iptables-standalone.c iptables.c
|
|
|
|
xtables_multi_CFLAGS += -DENABLE_IPV4
|
|
|
|
-xtables_multi_LDADD += ../libiptc/libip4tc.la ../extensions/libext4.a
|
|
|
|
+xtables_multi_LDADD += ../libiptc/libip4tc.la
|
|
|
|
+xtables_multi_LDFLAGS += -liptext4
|
|
|
|
endif
|
|
|
|
if ENABLE_IPV6
|
|
|
|
xtables_multi_SOURCES += ip6tables-save.c ip6tables-restore.c \
|
|
|
|
ip6tables-standalone.c ip6tables.c
|
|
|
|
xtables_multi_CFLAGS += -DENABLE_IPV6
|
|
|
|
-xtables_multi_LDADD += ../libiptc/libip6tc.la ../extensions/libext6.a
|
|
|
|
+xtables_multi_LDADD += ../libiptc/libip6tc.la
|
|
|
|
+xtables_multi_LDFLAGS += -liptext6
|
|
|
|
endif
|
|
|
|
xtables_multi_SOURCES += xshared.c
|
|
|
|
xtables_multi_LDADD += ../libxtables/libxtables.la -lm
|
2017-12-14 06:29:11 +00:00
|
|
|
@@ -32,7 +35,8 @@ if ENABLE_NFTABLES
|
|
|
|
BUILT_SOURCES += xtables-config-parser.h
|
|
|
|
xtables_compat_multi_SOURCES = xtables-compat-multi.c iptables-xml.c
|
|
|
|
xtables_compat_multi_CFLAGS = ${AM_CFLAGS}
|
|
|
|
-xtables_compat_multi_LDADD = ../extensions/libext.a ../extensions/libext_ebt.a
|
|
|
|
+xtables_compat_multi_LDADD =
|
|
|
|
+xtables_compat_multi_LDFLAGS = -L../extensions/ -liptext -liptext_ebt
|
|
|
|
if ENABLE_STATIC
|
|
|
|
xtables_compat_multi_CFLAGS += -DALL_INCLUSIVE
|
|
|
|
endif
|
|
|
|
@@ -45,7 +49,8 @@ xtables_compat_multi_SOURCES += xtables-
|
|
|
|
getethertype.c nft-bridge.c \
|
|
|
|
xtables-eb-standalone.c xtables-eb.c \
|
|
|
|
xtables-translate.c
|
|
|
|
-xtables_compat_multi_LDADD += ${libmnl_LIBS} ${libnftnl_LIBS} ${libnetfilter_conntrack_LIBS} ../extensions/libext4.a ../extensions/libext6.a ../extensions/libext_ebt.a ../extensions/libext_arpt.a
|
|
|
|
+xtables_compat_multi_LDADD += ${libmnl_LIBS} ${libnftnl_LIBS} ${libnetfilter_conntrack_LIBS}
|
|
|
|
+xtables_compat_multi_LDFLAGS += -liptext4 -liptext6 -liptext_arpt
|
|
|
|
# yacc and lex generate dirty code
|
|
|
|
xtables_compat_multi-xtables-config-parser.o xtables_compat_multi-xtables-config-syntax.o: AM_CFLAGS += -Wno-missing-prototypes -Wno-missing-declarations -Wno-implicit-function-declaration -Wno-nested-externs -Wno-undef -Wno-redundant-decls
|
|
|
|
xtables_compat_multi_SOURCES += xshared.c
|