mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-21 03:54:59 +02:00
build: enable automake for extensions/ directory
Because we are likely to be having more userspace programs soon, and reproducing manual makefiles is a bad idea, make extensions/ ready for automake traversal. The build pattern now is: 1. toplevel Makefile.am starts off with extensions/Makefile.am 2. Makefile.am a. builds programs in current directory b. runs Kbuild - only from extensions/Makefile.am (so it does not get reinvoked from case 2cII) - Kbuild recurses on its own c. runs Mbuild I. builds iptables shared libraries in current directory II. runs Makefile.am in each subdir (goto step 2.)
This commit is contained in:
@@ -1,45 +1,9 @@
|
||||
# -*- Makefile -*-
|
||||
|
||||
AM_CFLAGS = ${regular_CFLAGS} -DIPSET_LIB_DIR=\"${xtlibdir}\"
|
||||
AM_CFLAGS = ${regular_CFLAGS} -DIPSET_LIB_DIR=\"${xtlibdir}\"
|
||||
|
||||
include ../../Makefile.extra
|
||||
|
||||
sbin_PROGRAMS = ipset
|
||||
pkglibexec_LTLIBRARIES = \
|
||||
libipset_iphash.la \
|
||||
libipset_ipmap.la \
|
||||
libipset_ipporthash.la \
|
||||
libipset_ipportiphash.la \
|
||||
libipset_ipportnethash.la \
|
||||
libipset_iptree.la \
|
||||
libipset_iptreemap.la \
|
||||
libipset_macipmap.la \
|
||||
libipset_nethash.la \
|
||||
libipset_portmap.la \
|
||||
libipset_setlist.la
|
||||
|
||||
ipset_LDADD = -ldl
|
||||
ipset_LDFLAGS = -rdynamic
|
||||
|
||||
module_flags = -avoid-version -module
|
||||
|
||||
libipset_iphash_la_SOURCES = ipset_iphash.c
|
||||
libipset_iphash_la_LDFLAGS = ${module_flags}
|
||||
libipset_ipmap_la_SOURCES = ipset_ipmap.c
|
||||
libipset_ipmap_la_LDFLAGS = ${module_flags}
|
||||
libipset_ipporthash_la_SOURCES = ipset_ipporthash.c
|
||||
libipset_ipporthash_la_LDFLAGS = ${module_flags}
|
||||
libipset_ipportiphash_la_SOURCES = ipset_ipportiphash.c
|
||||
libipset_ipportiphash_la_LDFLAGS = ${module_flags}
|
||||
libipset_ipportnethash_la_SOURCES = ipset_ipportnethash.c
|
||||
libipset_ipportnethash_la_LDFLAGS = ${module_flags}
|
||||
libipset_iptree_la_SOURCES = ipset_iptree.c
|
||||
libipset_iptree_la_LDFLAGS = ${module_flags}
|
||||
libipset_iptreemap_la_SOURCES = ipset_iptreemap.c
|
||||
libipset_iptreemap_la_LDFLAGS = ${module_flags}
|
||||
libipset_macipmap_la_SOURCES = ipset_macipmap.c
|
||||
libipset_macipmap_la_LDFLAGS = ${module_flags}
|
||||
libipset_nethash_la_SOURCES = ipset_nethash.c
|
||||
libipset_nethash_la_LDFLAGS = ${module_flags}
|
||||
libipset_portmap_la_SOURCES = ipset_portmap.c
|
||||
libipset_portmap_la_LDFLAGS = ${module_flags}
|
||||
libipset_setlist_la_SOURCES = ipset_setlist.c
|
||||
libipset_setlist_la_LDFLAGS = ${module_flags}
|
||||
|
7
extensions/ipset/Mbuild
Normal file
7
extensions/ipset/Mbuild
Normal file
@@ -0,0 +1,7 @@
|
||||
# -*- Makefile -*-
|
||||
|
||||
obj-m += $(addprefix lib,$(patsubst %.c,%.so,$(notdir \
|
||||
$(wildcard ${XA_SRCDIR}/ipset_*.c))))
|
||||
|
||||
libipset_%.oo: ${XA_SRCDIR}/ipset_%.c
|
||||
${AM_V_CC}${CC} ${AM_DEPFLAGS} ${AM_CFLAGS} -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
|
Reference in New Issue
Block a user