X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=ipfw%2FMakefile;h=807f2d1a9fe84656f6ad4226d023542d6e08c050;hb=31b969263c34f46f398eec33c0b0e95947842cda;hp=a8a4f474a1492544f0c17840eeb1363186c37e26;hpb=5f337135c613b2ee3cb24ade7617ecaae0a74681;p=ipfw.git diff --git a/ipfw/Makefile b/ipfw/Makefile index a8a4f47..807f2d1 100644 --- a/ipfw/Makefile +++ b/ipfw/Makefile @@ -6,12 +6,9 @@ # enable extra debugging information # Do not set with = or := so we can inherit from the caller $(warning Building userland ipfw for $(VER)) -EXTRA_CFLAGS += EXTRA_CFLAGS += -O1 +EXTRA_CFLAGS += -Wall -Werror EXTRA_CFLAGS += -include ../glue.h - -LDFLAGS= - EXTRA_CFLAGS += -I ./include ifneq ($(VER),openwrt) @@ -25,8 +22,13 @@ endif endif # !openwrt CFLAGS += $(EXTRA_CFLAGS) +# Location of OS headers and libraries. After our stuff. +USRDIR?= /usr +CFLAGS += -I$(USRDIR)/include +LDFLAGS += -L$(USRDIR)/lib -OBJS = ipfw2.o dummynet.o main.o ipv6.o altq.o +OBJS = ipfw2.o dummynet.o main.o ipv6.o altq.o qsort_r.o +OBJS += expand_number.o humanize_number.o ifneq ($(HAVE_NAT),) OBJS += nat.o EXTRA_CFLAGS += -DHAVE_NAT @@ -39,7 +41,15 @@ all: ipfw ipfw: $(OBJS) $(CC) $(LDFLAGS) -o $@ $^ -$(OBJS) : ipfw2.h ../glue.h +$(OBJS) : ipfw2.h ../glue.h include/netinet + +include/netinet: + -@rm -rf include/netinet + -@mkdir -p include/netinet + -(cd include/netinet; \ + for i in ip_fw.h ip_dummynet.h tcp.h; do \ + ln -s ../../../dummynet/include/netinet/$$i; done; ) clean distclean: -rm -f $(OBJS) ipfw + -rm -rf include/netinet/