summaryrefslogtreecommitdiff
blob: 758bc3a0a228111084eb9756d903a19adda31af3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
let the toolchain figure out the default header location

http://bugs.gentoo.org/172209

--- Makefile
+++ Makefile
@@ -37,7 +37,10 @@
 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 -Iinclude/ -DIPTABLES_VERSION=\"$(IPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DIPTC_DEBUG
+ifneq ($(KERNEL_DIR),)
+CFLAGS += -I$(KERNEL_DIR)/include
+endif
 
 ifdef NO_SHARED_LIBS
 CFLAGS += -DNO_SHARED_LIBS=1