summaryrefslogtreecommitdiff
path: root/package/ipset
diff options
context:
space:
mode:
Diffstat (limited to 'package/ipset')
-rw-r--r--package/ipset/Makefile5
-rw-r--r--package/ipset/patches/patch-Makefile36
2 files changed, 37 insertions, 4 deletions
diff --git a/package/ipset/Makefile b/package/ipset/Makefile
index 01ba6a8ee..571020304 100644
--- a/package/ipset/Makefile
+++ b/package/ipset/Makefile
@@ -29,10 +29,7 @@ ALL_TARGET:= binaries
INSTALL_TARGET:= binaries_install
pre-build:
- V=1 ARCH=${ARCH} KERNEL_DIR=${LINUX_DIR} \
- PREFIX=/usr CROSS_COMPILE="${TARGET_CROSS}" \
- LD=$(TARGET_CROSS)gcc LDFLAGS="" \
- $(MAKE) -C ${WRKBUILD} modules
+ $(MAKE) -C ${WRKBUILD} $(KERNEL_MODULE_FLAGS) modules
post-install:
${INSTALL_DIR} ${IDIR_IPSET}/usr/sbin ${IDIR_IPSET}/usr/lib/ipset
diff --git a/package/ipset/patches/patch-Makefile b/package/ipset/patches/patch-Makefile
new file mode 100644
index 000000000..e97a5b6a0
--- /dev/null
+++ b/package/ipset/patches/patch-Makefile
@@ -0,0 +1,36 @@
+--- ipset-4.1.orig/Makefile 2009-11-11 20:22:42.000000000 +0100
++++ ipset-4.1/Makefile 2011-01-21 13:30:47.148658311 +0100
+@@ -64,9 +64,13 @@ ifndef NO_EXTRA_WARN_FLAGS
+ endif
+
+ ABI_FLAGS:=
+-CFLAGS:=$(ABI_FLAGS) $(COPT_FLAGS) $(WARN_FLAGS) -Ikernel/include -I. # -g -DIPSET_DEBUG
++CPPFLAGS?=
++CPPFLAGS+=-Ikernel/include -I.
++CFLAGS?=$(ABI_FLAGS) $(COPT_FLAGS) $(WARN_FLAGS)
+ SH_CFLAGS:=$(CFLAGS) -fPIC
+-LDFLAGS:=$(ABI_FLAGS)
++LDFLAGS?=$(ABI_FLAGS)
++LIBS?=
++LIBS+=-ldl
+ SETTYPES:=ipmap portmap macipmap
+ SETTYPES+=iptree iptreemap
+ SETTYPES+=iphash nethash ipporthash ipportiphash ipportnethash
+@@ -114,14 +118,14 @@ release: clean
+
+ #The ipset(8) self
+ ipset.o: ipset.c ipset.h
+- $(CC) $(CFLAGS) -DIPSET_VERSION=\"$(IPSET_VERSION)\" -DIPSET_LIB_DIR=\"$(IPSET_LIB_DIR)\" -c -o $@ $<
++ $(CC) $(CPPFLAGS) $(CFLAGS) -DIPSET_VERSION=\"$(IPSET_VERSION)\" -DIPSET_LIB_DIR=\"$(IPSET_LIB_DIR)\" -c -o $@ $<
+
+ ipset: ipset.o
+- $(CC) $(CFLAGS) $(LDFLAGS) -rdynamic -o $@ $^ -ldl
++ $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
+
+ #Pooltypes
+ ipset_%.o: ipset_%.c ipset.h
+- $(CC) $(SH_CFLAGS) -o $@ -c $<
++ $(CC) $(CPPFLAGS) $(SH_CFLAGS) -o $@ -c $<
+
+ libipset_%.so: ipset_%.o
+ $(CC) -shared $(LDFLAGS) -o $@ $<