--- Makefile +++ Makefile @@ -11,15 +11,9 @@ # 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)/source" endif -ifndef KBUILD_OUTPUT -KBUILD_OUTPUT="/lib/modules/$(shell uname -r)/build" -endif IPTABLES_VERSION:=1.4.0 OLD_IPTABLES_VERSION:=1.4.0rc1 @@ -42,8 +36,8 @@ DO_SELINUX=0 endif -COPT_FLAGS:=-O2 -CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KBUILD_OUTPUT)/include -I$(KERNEL_DIR)/include -Iinclude/ -DIPTABLES_VERSION=\"$(IPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DIPTC_DEBUG +COPT_FLAGS:=$(CFLAGS) +CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -idirafter $(KERNEL_DIR)/include -Iinclude/ -DIPTABLES_VERSION=\"$(IPTABLES_VERSION)\" ifdef NO_SHARED_LIBS CFLAGS += -DNO_SHARED_LIBS=1