Since UAPI headers are shipped since commit ebtables-2.0.10-4-8-gf4bdc80, "-Iinclude" must always be used ever since. Remove the KERNEL_INCLUDES make variable for good. Signed-off-by: Jan Engelhardt <jengelh@xxxxxxx> --- INSTALL | 4 ++-- Makefile | 34 ++++++++++++++++------------------ examples/ulog/test_ulog.c | 2 +- extensions/Makefile | 4 ++-- 4 files changed, 21 insertions(+), 23 deletions(-) diff --git a/INSTALL b/INSTALL index e90d5c1..b94beeb 100644 --- a/INSTALL +++ b/INSTALL @@ -8,7 +8,7 @@ Put the files in the right directories: If you are using the CVS code or need your own kernel includes, do this instead (change the include directory to the appropriate one): -%make install KERNEL_INCLUDES=/usr/src/linux/include +%make install If you want to make a static binary for ebtables, containing all the extensions, without shared libraries, do this (this will make a @@ -50,7 +50,7 @@ Contains an example to receive and parse netlink messages containing packets seen by the ebtables ulog watcher. Compile with: -%make test_ulog KERNEL_INCLUDES=/usr/src/linux/include +%make test_ulog Usage: %examples/ulog/test_ulog NETLINK_GROUP diff --git a/Makefile b/Makefile index c1106a4..f7680b6 100644 --- a/Makefile +++ b/Makefile @@ -32,8 +32,6 @@ useful_functions.o ebtables.o OBJECTS:=$(OBJECTS2) $(EXT_OBJS) $(EXT_LIBS) -KERNEL_INCLUDES?=include/ - ETHERTYPESPATH?=$(ETCDIR) ETHERTYPESFILE:=$(ETHERTYPESPATH)/ethertypes @@ -69,45 +67,45 @@ PROGSPECSD:=-DPROGVERSION=\"$(PROGVERSION)\" \ all: ebtables ebtables-restore communication.o: communication.c include/ebtables_u.h - $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) + $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -Iinclude/ libebtc.o: libebtc.c include/ebtables_u.h - $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) + $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -Iinclude/ useful_functions.o: useful_functions.c include/ebtables_u.h - $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) + $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -Iinclude/ getethertype.o: getethertype.c include/ethernetdb.h $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -Iinclude/ ebtables.o: ebtables.c include/ebtables_u.h - $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) + $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -Iinclude/ ebtables-standalone.o: ebtables-standalone.c include/ebtables_u.h - $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c $< -o $@ -I$(KERNEL_INCLUDES) + $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c $< -o $@ -Iinclude/ libebtc.so: $(OBJECTS2) $(CC) -shared $(LDFLAGS) -Wl,-soname,libebtc.so -o libebtc.so -lc $(OBJECTS2) ebtables: $(OBJECTS) ebtables-standalone.o libebtc.so - $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(LDFLAGS) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \ + $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(LDFLAGS) -o $@ ebtables-standalone.o -Iinclude/ -L. -Lextensions -lebtc $(EXT_LIBSI) \ -Wl,-rpath,$(LIBDIR) ebtablesu: ebtablesu.c $(CC) $(CFLAGS) $(PROGSPECSD) $< -o $@ ebtablesd.o: ebtablesd.c include/ebtables_u.h - $(CC) $(CFLAGS) $(PROGSPECSD) -c $< -o $@ -I$(KERNEL_INCLUDES) + $(CC) $(CFLAGS) $(PROGSPECSD) -c $< -o $@ -Iinclude/ ebtablesd: $(OBJECTS) ebtablesd.o libebtc.so - $(CC) $(CFLAGS) -o $@ ebtablesd.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \ + $(CC) $(CFLAGS) -o $@ ebtablesd.o -Iinclude/ -L. -Lextensions -lebtc $(EXT_LIBSI) \ -Wl,-rpath,$(LIBDIR) ebtables-restore.o: ebtables-restore.c include/ebtables_u.h - $(CC) $(CFLAGS) $(PROGSPECS) -c $< -o $@ -I$(KERNEL_INCLUDES) + $(CC) $(CFLAGS) $(PROGSPECS) -c $< -o $@ -Iinclude/ ebtables-restore: $(OBJECTS) ebtables-restore.o libebtc.so - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ebtables-restore.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \ + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ ebtables-restore.o -Iinclude/ -L. -Lextensions -lebtc $(EXT_LIBSI) \ -Wl,-rpath,$(LIBDIR) .PHONY: daemon @@ -136,7 +134,7 @@ static: extensions/ebt_*.c extensions/ebtable_*.c ebtables.c communication.c ebt printf "extern void %s();\n" _t_$${arg}_init >> include/ebtables_u.h ; \ done ; \ printf "\n\tpseudomain(argc, argv);\n\treturn 0;\n}\n" >> ebtables-standalone.c ;\ - $(CC) $(CFLAGS) $(LDFLAGS) $(PROGSPECS) -o $@ $^ -I$(KERNEL_INCLUDES) -Iinclude ; \ + $(CC) $(CFLAGS) $(LDFLAGS) $(PROGSPECS) -o $@ $^ -Iinclude/ -Iinclude ; \ for arg in $(EXT_FUNC) \ ; do \ sed "s/ .*_init/ _init/" extensions/ebt_$${arg}.c > extensions/ebt_$${arg}.c_ ; \ @@ -206,15 +204,15 @@ release: rm -rf $(CVSDIRS) mkdir -p include/linux/netfilter_bridge install -m 0644 -o root -g root \ - $(KERNEL_INCLUDES)/linux/netfilter_bridge.h include/linux/ + include/linux/netfilter_bridge.h include/linux/ # To keep possible compile error complaints about undefined ETH_P_8021Q # off my back install -m 0644 -o root -g root \ - $(KERNEL_INCLUDES)/linux/if_ether.h include/linux/ + include/linux/if_ether.h include/linux/ install -m 0644 -o root -g root \ - $(KERNEL_INCLUDES)/linux/types.h include/linux/ + include/linux/types.h include/linux/ install -m 0644 -o root -g root \ - $(KERNEL_INCLUDES)/linux/netfilter_bridge/*.h \ + include/linux/netfilter_bridge/*.h \ include/linux/netfilter_bridge/ install -m 0644 -o root -g root \ include/ebtables.h include/linux/netfilter_bridge/ @@ -238,7 +236,7 @@ rpmbuild: .PHONY: test_ulog test_ulog: examples/ulog/test_ulog.c getethertype.o - $(CC) $(CFLAGS) $< -o test_ulog -I$(KERNEL_INCLUDES) -lc \ + $(CC) $(CFLAGS) $< -o test_ulog -Iinclude/ -lc \ getethertype.o mv test_ulog examples/ulog/ diff --git a/examples/ulog/test_ulog.c b/examples/ulog/test_ulog.c index fbbd909..69fcc51 100644 --- a/examples/ulog/test_ulog.c +++ b/examples/ulog/test_ulog.c @@ -9,7 +9,7 @@ * Start this application somewhere: * test_ulog NLGROUP * - * compile with make test_ulog KERNEL_INCLUDES=<path_to_kernel_include_dir> + * compile with make test_ulog * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as diff --git a/extensions/Makefile b/extensions/Makefile index 60a70a2..fd98c7d 100644 --- a/extensions/Makefile +++ b/extensions/Makefile @@ -23,8 +23,8 @@ extensions/libebtable_%.so: extensions/ebtable_%.so mv $< $@ extensions/ebt_%.o: extensions/ebt_%.c include/ebtables_u.h - $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) + $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -Iinclude/ extensions/ebtable_%.o: extensions/ebtable_%.c - $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -I$(KERNEL_INCLUDES) + $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) $(PROGSPECS) -c -o $@ $< -Iinclude/ -- 2.17.1 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html