4 # GNUMakefile to build the userland part of ipfw on Linux
6 # enable extra debugging information
7 # Do not set with = or := so we can inherit from the caller
8 $(warning Building userland ipfw for $(VER))
11 EXTRA_CFLAGS += -include ../glue.h
15 EXTRA_CFLAGS += -I ./include
17 ifneq ($(VER),openwrt)
18 OSARCH := $(shell uname)
19 ifeq ($(OSARCH),Linux)
20 EXTRA_CFLAGS += -D__BSD_VISIBLE
22 HAVE_NAT := $(shell grep O_NAT /usr/include/netinet/ip_fw.h)
27 CFLAGS += $(EXTRA_CFLAGS)
29 OBJS = ipfw2.o dummynet.o main.o ipv6.o altq.o
32 EXTRA_CFLAGS += -DHAVE_NAT
40 $(CC) $(LDFLAGS) -o $@ $^
42 $(OBJS) : ipfw2.h ../glue.h