--- embedaddon/miniupnpd/netfilter/Makefile 2012/05/29 12:55:57 1.1.1.2 +++ embedaddon/miniupnpd/netfilter/Makefile 2013/07/22 00:32:35 1.1.1.3 @@ -1,5 +1,5 @@ -# $Id: Makefile,v 1.1.1.2 2012/05/29 12:55:57 misho Exp $ -CFLAGS?=-Wall -g -DDEBUG +# $Id: Makefile,v 1.1.1.3 2013/07/22 00:32:35 misho Exp $ +CFLAGS?=-Wall -g -D_GNU_SOURCE -DDEBUG -Wstrict-prototypes -Wdeclaration-after-statement -ansi CC = gcc #LIBS = -liptc @@ -26,7 +26,8 @@ LIBS = $(IPTABLESPATH)/libiptc/libiptc.a endif else # check for system-wide iptables files. Test if iptables version >= 1.4.3 -TEST := $(shell test -f /usr/include/iptables/internal.h && grep -q "\#define IPTABLES_VERSION" /usr/include/iptables/internal.h && echo 1) +#TEST := $(shell test -f /usr/include/iptables/internal.h && grep -q "\#define IPTABLES_VERSION" /usr/include/iptables/internal.h && echo 1) +TEST := $(shell test -f /usr/include/xtables.h && grep -q "XTABLES_VERSION_CODE" /usr/include/xtables.h && echo 1) ifeq ($(TEST), 1) CFLAGS := $(CFLAGS) -DIPTABLES_143 LIBS = -liptc @@ -34,17 +35,21 @@ TEST_LIB := $(shell test -f /usr/lib$(ARCH)/libiptc.a ifeq ($(TEST_LIB), 1) LIBS = -liptc /usr/lib$(ARCH)/libiptc.a endif -endif endif +endif -all: iptcrdr.o testiptcrdr +all: iptcrdr.o testiptcrdr iptpinhole.o testiptpinhole clean: - $(RM) *.o testiptcrdr + $(RM) *.o testiptcrdr testiptpinhole testiptcrdr: testiptcrdr.o iptcrdr.o upnpglobalvars.o $(LIBS) +testiptpinhole: testiptpinhole.o iptpinhole.o upnpglobalvars.o $(LIBS) + iptcrdr.o: iptcrdr.c iptcrdr.h + +iptpinhole.o: iptpinhole.c iptpinhole.h upnpglobalvars.o: ../upnpglobalvars.c ../upnpglobalvars.h $(CC) -c -o $@ $<