1 ## Process this file with automake to produce Makefile.in
3 ACLOCAL_AMFLAGS = -I m4
5 include $(top_srcdir)/Make_global.am
8 KBUILD_OUTPUT=/lib/modules/`uname -r`/build
10 KBUILD_OUTPUT=$(KBUILDDIR)
18 SUBDIRS = include/libipset lib src utils
22 $(MAKE) -C lib sparse-check
23 $(MAKE) -C src sparse-check
27 ${MAKE} -C $(KBUILD_OUTPUT) M=$$PWD/kernel/net \
28 V=$V W=1 C=2 CF="-D__CHECK_ENDIAN__ -Wsparse-all" \
29 KCFLAGS="-DPACKAGE_VERSION=$(PACKAGE_VERSION) -DCHECK_KCONFIG -Wextra" \
30 IP_SET_MAX=$(IP_SET_MAX) KDIR=$$PWD/kernel modules
32 @echo Skipping kernel modules due to --with-kmod=no
37 ${MAKE} -C $(KBUILD_OUTPUT) M=$$PWD/kernel/net V=$V \
38 KCFLAGS="-DPACKAGE_VERSION=$(PACKAGE_VERSION)" \
39 IP_SET_MAX=$(IP_SET_MAX) KDIR=$$PWD/kernel modules
41 @echo Skipping kernel modules due to --with-kmod=no
46 !!! WARNING !!! WARNING !!! WARNING !!!
48 Your distribution seems to ignore the /lib/modules/<kernelrelease>/extra/
49 subdirectory, where the ipset kernel modules are installed.
51 Add the 'extra' directory to the search definition of your depmod
52 configuration (/etc/depmod.conf or /etc/depmod.d/) and re-run
54 depmod <kernelrelease>
56 otherwise the ipset kernel modules in the extra subdir will be ignored.
63 !!! WARNING !!! WARNING !!! WARNING !!!
65 Your running system has got ipset related kernel modules loaded in.
66 You MUST rmmod the ip_set* kernel modules in order to make possible
67 for the system to load in the newly installed ones.
73 ${MAKE} -C $(KBUILD_OUTPUT) M=$$PWD/kernel/net \
74 KDIR=$$PWD/kernel modules_install
75 @modinfo -b ${INSTALL_MOD_PATH} ip_set_hash_ip | ${GREP} /extra/ >/dev/null || echo "$$DEPMOD_WARNING"
76 @lsmod | ${GREP} '^ip_set' >/dev/null && echo "$$MODULE_WARNING"
78 @echo Skipping kernel modules due to --with-kmod=no
83 ${MAKE} -C $(KBUILD_OUTPUT) M=$$PWD/kernel/net \
84 KDIR=$$PWD/kernel clean
86 @echo Skipping kernel modules due to --with-kmod=no
90 for x in ip_set.h ip_set_bitmap.h ip_set_hash.h ip_set_list.h; do \
91 sed -r -e 's@#(ifndef|define|endif[ \t]*/[*])[ \t]*_UAPI@#\1 @' \
92 -e 's@^#include <linux/netfilter/ipset/ip_set.h>@@' \
93 kernel/include/uapi/linux/netfilter/ipset/$$x \
94 > include/libipset/linux_$$x; \
98 wget -4 -O /tmp/ipset-bash-completion.tar.gz http://sourceforge.net/projects/ipset-bashcompl/files/latest/download
99 cd utils/ipset_bash_completion; tar xz --strip-components=1 -f /tmp/ipset-bash-completion.tar.gz
100 rm -f /tmp/ipset-bash-completion.tar.gz
101 wget -4 -O /tmp/ipset-list.tar.gz http://sourceforge.net/projects/ipset-list/files/latest/download
102 cd utils/ipset_list; tar xz --strip-components=1 -f /tmp/ipset-list.tar.gz
103 rm -f /tmp/ipset-list.tar.gz
109 cd tests; ./runtest.sh
111 cleanup_dirs := . include/libipset lib src tests
113 tidy: distclean modules_clean
114 rm -rf .deps $(foreach dir,$(cleanup_dirs),$(wildcard $(dir)/*~))
115 rm -rf aclocal.m4 autom4te.cache
116 rm -rf config.* configure compile depcomp install-sh libtool ltmain.sh
117 rm -rf Makefile Makefile.in lib/Makefile lib/Makefile.in src/Makefile src/Makefile.in
118 rm -rf missing stamp-h1 m4/libtool.m4 m4/lt*.m4
119 rm -rf lib/ipset_settype_check lib/types_init.c
120 find . -name '*~' -delete
123 rm -Rf /tmp/ipset-${PACKAGE_VERSION};
124 pushd ${top_srcdir} && git archive --prefix=ipset-${PACKAGE_VERSION}/ HEAD | tar -C /tmp -x && popd;
125 pushd /tmp/ipset-${PACKAGE_VERSION} && ./autogen.sh && popd;
126 tar -C /tmp -cjf ipset-${PACKAGE_VERSION}.tar.bz2 --owner=root --group=root ipset-${PACKAGE_VERSION}/;
127 rm -Rf /tmp/ipset-${PACKAGE_VERSION};
130 @echo ' <nothing> - Compile userspace'
131 @echo ' modules - Compile kernel modules'
132 @echo ' install - Install userspace'
133 @echo ' modules_install - Install kernel modules'
134 @echo ' clean - Remove generated userspace files'
135 @echo ' modules_clean - Remove generated kernelspace files'
136 @echo ' tidy - Tidy up the whole source tree'
137 @echo ' tests - Run testsuite'
138 @echo ' sparse - Check userspace with sparse'
139 @echo ' modules_sparse - Check kernelspace with sparse'
140 @echo ' update_includes - Update userspace include files'
141 @echo ' update_utils - Update bash utilities'
142 @echo ' check_libmap - Check libipset.map for missing symbols'
143 @echo ' tarball - Create a tarball for a new release'
145 .PHONY: modules modules_instal modules_clean update_includes tests tarball
147 DISTCHECK_CONFIGURE_FLAGS = --with-kmod=no