version 1.1.1.2, 2012/05/29 12:55:57
|
version 1.1.1.3, 2013/07/22 00:32:35
|
Line 1
|
Line 1
|
# $Id$ |
# $Id$ |
CFLAGS?=-Wall -g -DDEBUG | CFLAGS?=-Wall -g -D_GNU_SOURCE -DDEBUG -Wstrict-prototypes -Wdeclaration-after-statement -ansi |
CC = gcc |
CC = gcc |
|
|
#LIBS = -liptc |
#LIBS = -liptc |
Line 26 LIBS = $(IPTABLESPATH)/libiptc/libiptc.a
|
Line 26 LIBS = $(IPTABLESPATH)/libiptc/libiptc.a
|
endif |
endif |
else |
else |
# check for system-wide iptables files. Test if iptables version >= 1.4.3 |
# 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) |
ifeq ($(TEST), 1) |
CFLAGS := $(CFLAGS) -DIPTABLES_143 |
CFLAGS := $(CFLAGS) -DIPTABLES_143 |
LIBS = -liptc |
LIBS = -liptc |
Line 34 TEST_LIB := $(shell test -f /usr/lib$(ARCH)/libiptc.a
|
Line 35 TEST_LIB := $(shell test -f /usr/lib$(ARCH)/libiptc.a
|
ifeq ($(TEST_LIB), 1) |
ifeq ($(TEST_LIB), 1) |
LIBS = -liptc /usr/lib$(ARCH)/libiptc.a |
LIBS = -liptc /usr/lib$(ARCH)/libiptc.a |
endif |
endif |
endif |
|
endif |
endif |
|
endif |
|
|
all: iptcrdr.o testiptcrdr | all: iptcrdr.o testiptcrdr iptpinhole.o testiptpinhole |
|
|
clean: |
clean: |
$(RM) *.o testiptcrdr | $(RM) *.o testiptcrdr testiptpinhole |
|
|
testiptcrdr: testiptcrdr.o iptcrdr.o upnpglobalvars.o $(LIBS) |
testiptcrdr: testiptcrdr.o iptcrdr.o upnpglobalvars.o $(LIBS) |
|
|
|
testiptpinhole: testiptpinhole.o iptpinhole.o upnpglobalvars.o $(LIBS) |
|
|
iptcrdr.o: iptcrdr.c iptcrdr.h |
iptcrdr.o: iptcrdr.c iptcrdr.h |
|
|
|
iptpinhole.o: iptpinhole.c iptpinhole.h |
|
|
upnpglobalvars.o: ../upnpglobalvars.c ../upnpglobalvars.h |
upnpglobalvars.o: ../upnpglobalvars.c ../upnpglobalvars.h |
$(CC) -c -o $@ $< |
$(CC) -c -o $@ $< |