mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-05 20:26:38 +02:00
build: use AM_CPPFLAGS
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
# -*- Makefile -*-
|
# -*- Makefile -*-
|
||||||
# AUTOMAKE
|
# AUTOMAKE
|
||||||
|
|
||||||
|
export AM_CPPFLAGS
|
||||||
export AM_CFLAGS
|
export AM_CFLAGS
|
||||||
XA_SRCDIR = ${srcdir}
|
XA_SRCDIR = ${srcdir}
|
||||||
XA_TOPSRCDIR = ${top_srcdir}
|
XA_TOPSRCDIR = ${top_srcdir}
|
||||||
|
@@ -59,4 +59,4 @@ lib%.so: lib%.oo
|
|||||||
${AM_V_CCLD}${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< ${libxtables_LIBS} ${LDLIBS};
|
${AM_V_CCLD}${CCLD} ${AM_LDFLAGS} -shared ${LDFLAGS} -o $@ $< ${libxtables_LIBS} ${LDLIBS};
|
||||||
|
|
||||||
%.oo: ${XA_SRCDIR}/%.c
|
%.oo: ${XA_SRCDIR}/%.c
|
||||||
${AM_V_CC}${CC} ${AM_DEPFLAGS} ${AM_CFLAGS} -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
|
${AM_V_CC}${CC} ${AM_DEPFLAGS} ${AM_CPPFLAGS} ${AM_CFLAGS} -DPIC -fPIC ${CPPFLAGS} ${CFLAGS} -o $@ -c $<;
|
||||||
|
@@ -33,11 +33,11 @@ AC_ARG_WITH([xtlibdir],
|
|||||||
AC_MSG_CHECKING([Xtables module directory])
|
AC_MSG_CHECKING([Xtables module directory])
|
||||||
AC_MSG_RESULT([$xtlibdir])
|
AC_MSG_RESULT([$xtlibdir])
|
||||||
|
|
||||||
regular_CFLAGS="-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
|
regular_CPPFLAGS="-D_LARGEFILE_SOURCE=1 -D_LARGE_FILES -D_FILE_OFFSET_BITS=64 \
|
||||||
-D_REENTRANT -Wall -Waggregate-return -Wmissing-declarations \
|
-D_REENTRANT -I\${XA_TOPSRCDIR}/include"
|
||||||
|
regular_CFLAGS="-Wall -Waggregate-return -Wmissing-declarations \
|
||||||
-Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
|
-Wmissing-prototypes -Wredundant-decls -Wshadow -Wstrict-prototypes \
|
||||||
-Winline -pipe \
|
-Winline -pipe";
|
||||||
-I\${XA_TOPSRCDIR}/include";
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# check kernel version
|
# check kernel version
|
||||||
@@ -80,6 +80,7 @@ else
|
|||||||
fi;
|
fi;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
AC_SUBST([regular_CPPFLAGS])
|
||||||
AC_SUBST([regular_CFLAGS])
|
AC_SUBST([regular_CFLAGS])
|
||||||
AC_SUBST([kbuilddir])
|
AC_SUBST([kbuilddir])
|
||||||
AC_SUBST([xtlibdir])
|
AC_SUBST([xtlibdir])
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
# -*- Makefile -*-
|
# -*- Makefile -*-
|
||||||
# AUTOMAKE
|
# AUTOMAKE
|
||||||
|
|
||||||
AM_CFLAGS = ${regular_CFLAGS} ${libxtables_CFLAGS} -I${abs_top_srcdir}/extensions
|
AM_CPPFLAGS = ${regular_CPPFLAGS} -I${abs_top_srcdir}/extensions
|
||||||
|
AM_CFLAGS = ${regular_CFLAGS} ${libxtables_CFLAGS}
|
||||||
|
|
||||||
# Not having Kbuild in Makefile.extra because it will already recurse
|
# Not having Kbuild in Makefile.extra because it will already recurse
|
||||||
.PHONY: modules modules_install clean_modules
|
.PHONY: modules modules_install clean_modules
|
||||||
|
@@ -1,7 +1,8 @@
|
|||||||
# -*- Makefile -*-
|
# -*- Makefile -*-
|
||||||
|
|
||||||
AM_CFLAGS = ${regular_CFLAGS} -DIPSET_LIB_DIR=\"${xtlibdir}\" \
|
AM_CPPFLAGS = ${regular_CPPFLAGS} -DIPSET_LIB_DIR=\"${xtlibdir}\" \
|
||||||
-DIP_NF_SET_HASHSIZE=1024
|
-DIP_NF_SET_HASHSIZE=1024
|
||||||
|
AM_CFLAGS = ${regular_CFLAGS}
|
||||||
|
|
||||||
include ../../Makefile.extra
|
include ../../Makefile.extra
|
||||||
|
|
||||||
|
@@ -4,4 +4,4 @@ obj-m += $(addprefix lib,$(patsubst %.c,%.so,$(notdir \
|
|||||||
$(wildcard ${XA_SRCDIR}/ipset_*.c))))
|
$(wildcard ${XA_SRCDIR}/ipset_*.c))))
|
||||||
|
|
||||||
libipset_%.oo: ${XA_SRCDIR}/ipset_%.c
|
libipset_%.oo: ${XA_SRCDIR}/ipset_%.c
|
||||||
${AM_V_CC}${CC} ${AM_DEPFLAGS} ${AM_CFLAGS} -DPIC -fPIC ${CFLAGS} -o $@ -c $<;
|
${AM_V_CC}${CC} ${AM_DEPFLAGS} ${AM_CPPFLAGS} ${AM_CFLAGS} -DPIC -fPIC ${CPPFLAGS} ${CFLAGS} -o $@ -c $<;
|
||||||
|
Reference in New Issue
Block a user