diff options
author | /C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net> | 2007-07-15 17:13:24 +0000 |
---|---|---|
committer | /C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net </C=EU/ST=EU/CN=Patrick McHardy/emailAddress=kaber@trash.net> | 2007-07-15 17:13:24 +0000 |
commit | aede6eb85ba5b8ffb61ea7cdef9799c10539e483 (patch) | |
tree | 73f4cae90487dd61665007ed575769d7f2d052ea | |
parent | 7c2e8b52cd46c83d404e212a8de39c8aa516c027 (diff) |
[PATCH] Change default KERNEL_DIR location and add KBUILD_OUTPUT (Sven Wegener <sven.wegener@stealer.net>)
-rw-r--r-- | Makefile | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -11,8 +11,14 @@ # Standard part of Makefile for topdir. TOPLEVEL_INCLUDED=YES +# For recent kernels we only need the source in KERNEL_DIR to build. Older +# kernels have a bug, where linux/netfilter_ipv4.h includes linux/config.h, +# which includes linux/autoconf.h, which is placed into KBUILD_OUTPUT. ifndef KERNEL_DIR -KERNEL_DIR="/lib/modules/$(shell uname -r)/build" +KERNEL_DIR="/lib/modules/$(shell uname -r)/source" +endif +ifndef KBUILD_OUTPUT +KBUILD_OUTPUT="/lib/modules/$(shell uname -r)/build" endif IPTABLES_VERSION:=1.3.8 OLD_IPTABLES_VERSION:=1.3.7 @@ -37,7 +43,7 @@ DO_SELINUX=0 endif COPT_FLAGS:=-O2 -CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include -Iinclude/ -DIPTABLES_VERSION=\"$(IPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DIPTC_DEBUG +CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KBUILD_OUTPUT)/include -I$(KERNEL_DIR)/include -Iinclude/ -DIPTABLES_VERSION=\"$(IPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DIPTC_DEBUG ifdef NO_SHARED_LIBS CFLAGS += -DNO_SHARED_LIBS=1 |