mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-09 14:14:58 +02:00
build: use automake in ipset/
This commit is contained in:
@@ -103,5 +103,5 @@ AC_SUBST([kinclude_CFLAGS])
|
|||||||
AC_SUBST([kbuilddir])
|
AC_SUBST([kbuilddir])
|
||||||
AC_SUBST([ksourcedir])
|
AC_SUBST([ksourcedir])
|
||||||
AC_SUBST([xtlibdir])
|
AC_SUBST([xtlibdir])
|
||||||
AC_CONFIG_FILES([Makefile extensions/GNUmakefile extensions/ipset/GNUmakefile])
|
AC_CONFIG_FILES([Makefile extensions/GNUmakefile extensions/ipset/Makefile])
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
@@ -1,85 +0,0 @@
|
|||||||
# -*- Makefile -*-
|
|
||||||
|
|
||||||
top_srcdir := @top_srcdir@
|
|
||||||
srcdir := @srcdir@
|
|
||||||
datarootdir := @datarootdir@
|
|
||||||
abstop_srcdir := $(shell readlink -f ${top_srcdir})
|
|
||||||
abssrcdir := $(shell readlink -f ${srcdir})
|
|
||||||
|
|
||||||
ifeq (${abstop_srcdir},)
|
|
||||||
$(error Path resolution of ${top_srcdir} failed)
|
|
||||||
endif
|
|
||||||
ifeq (${abssrcdir},)
|
|
||||||
$(error Path resolution of ${srcdir} failed)
|
|
||||||
endif
|
|
||||||
|
|
||||||
prefix := @prefix@
|
|
||||||
exec_prefix := @exec_prefix@
|
|
||||||
sbindir := @sbindir@
|
|
||||||
libdir := @libdir@
|
|
||||||
libexecdir := @libexecdir@
|
|
||||||
xtlibdir := @xtlibdir@
|
|
||||||
kbuilddir := @kbuilddir@
|
|
||||||
man8dir := @mandir@/man8
|
|
||||||
|
|
||||||
CC := @CC@
|
|
||||||
CCLD := ${CC}
|
|
||||||
CFLAGS := @CFLAGS@
|
|
||||||
LDFLAGS := @LDFLAGS@
|
|
||||||
regular_CFLAGS := @regular_CFLAGS@
|
|
||||||
kinclude_CFLAGS := @kinclude_CFLAGS@
|
|
||||||
xtables_CFLAGS := @xtables_CFLAGS@
|
|
||||||
|
|
||||||
AM_CFLAGS := ${regular_CFLAGS} -I${top_srcdir}/include ${xtables_CFLAGS} ${kinclude_CFLAGS} -DIPSET_LIB_DIR=\"${xtlibdir}\"
|
|
||||||
AM_DEPFLAGS = -Wp,-MMD,$(@D)/.$(@F).d,-MT,$@
|
|
||||||
|
|
||||||
VU := 0
|
|
||||||
am__1verbose_CC_0 = @echo " CC " $@;
|
|
||||||
am__1verbose_CCLD_0 = @echo " CCLD " $@;
|
|
||||||
am__1verbose_CC_1 = @echo " CC " $@ "<-" $<;
|
|
||||||
am__1verbose_CCLD_1 = @echo " CCLD " $@ "<-" $^;
|
|
||||||
am__verbose_CC = ${am__1verbose_CC_${VU}}
|
|
||||||
am__verbose_CCLD = ${am__1verbose_CCLD_${VU}}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Building blocks
|
|
||||||
#
|
|
||||||
targets := $(addsuffix .so,$(addprefix libipset_, \
|
|
||||||
iphash ipmap ipporthash ipportiphash ipportnethash iptree \
|
|
||||||
iptreemap macipmap nethash portmap setlist))
|
|
||||||
|
|
||||||
.SECONDARY:
|
|
||||||
|
|
||||||
.PHONY: all install clean distclean FORCE
|
|
||||||
|
|
||||||
all: ipset ${targets}
|
|
||||||
|
|
||||||
install: all
|
|
||||||
@mkdir -p "${DESTDIR}${sbindir}" "${DESTDIR}${xtlibdir}" "${DESTDIR}${man8dir}";
|
|
||||||
install -pm0755 ipset "${DESTDIR}${sbindir}/";
|
|
||||||
install -pm0755 ${targets} "${DESTDIR}${xtlibdir}/";
|
|
||||||
install -pm0644 ipset.8 "${DESTDIR}${man8dir}/";
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -f *.oo *.so *.o ipset;
|
|
||||||
|
|
||||||
distclean: clean
|
|
||||||
rm -f .*.d;
|
|
||||||
|
|
||||||
-include .*.d
|
|
||||||
|
|
||||||
|
|
||||||
ipset: ipset.o
|
|
||||||
${am__verbose_CCLD}${CCLD} ${AM_LDFLAGS} ${LDFLAGS} -o $@ $< -ldl -rdynamic;
|
|
||||||
|
|
||||||
#
|
|
||||||
# Shared libraries
|
|
||||||
#
|
|
||||||
lib%.so: lib%.oo
|
|
||||||
${am__verbose_CCLD}${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $<;
|
|
||||||
|
|
||||||
libipset_%.oo: ${srcdir}/ipset_%.c
|
|
||||||
${am__verbose_CC}${CC} ${AM_DEPFLAGS} ${AM_CFLAGS} -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
|
|
||||||
|
|
||||||
%.o: %.c
|
|
||||||
${am__verbose_CC}${CC} ${AM_DEPFLAGS} ${AM_CFLAGS} ${CFLAGS} -o $@ -c $<;
|
|
45
extensions/ipset/Makefile.am
Normal file
45
extensions/ipset/Makefile.am
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
# -*- Makefile -*-
|
||||||
|
|
||||||
|
AM_CFLAGS = ${regular_CFLAGS} -DIPSET_LIB_DIR=\"${xtlibdir}\"
|
||||||
|
|
||||||
|
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}
|
Reference in New Issue
Block a user