X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=kipfw%2FMakefile;h=9942499d5310ffeb9d5a1c9727f2b8087843d87c;hb=4123da8a54c132ad87656bbb989919f965dfbfca;hp=b80d9aeb5feef3bf5f6b276e4069bb4d7d3511d4;hpb=13fea6898392b2a2bc0d51ba795f8d49cce0eab3;p=ipfw-google.git diff --git a/kipfw/Makefile b/kipfw/Makefile index b80d9ae..9942499 100644 --- a/kipfw/Makefile +++ b/kipfw/Makefile @@ -42,6 +42,8 @@ TARGET = kipfw # lets default for 2.6 for planetlab builds VER ?= 2.6 +# $(warning ########## linux dir is $(LINUX_DIR) ###########) +# $(warning ########## KERNELPATH is $(KERNELPATH) ###########) #--- General values for all types of build --- # obj-m is the target module obj-m := ipfw_mod.o @@ -74,12 +76,12 @@ ipfw-cflags += -include $(M)/missing.h # headers $(warning ------ arch $(OSARCH) goals $(MAKECMDGOALS) -----------) ifeq ($(OSARCH),Windows) #--- { Windows block -ifeq ($(VER),win64) + ifeq ($(VER),win64) $(warning ---- building for 64-bit windows ---) win_arch= -DAMD64=1 -else + else win_arch= -Di386=1 -endif + endif M ?= $(shell pwd) WIN_SRCS += md_win.c WIN_SRCS += miniport.c protocol.c passthru.c debug.c @@ -120,7 +122,7 @@ endif OUR_PREPROC += -D__BSD_VISIBLE -DIPFIREWALL_DEFAULT_TO_ACCEPT OUR_PREPROC += -D__LITTLE_ENDIAN -DSYSCTL_NODE -DEMULATE_SYSCTL -ifeq ($(TCC),) # Microsoft C compiler + ifeq ($(TCC),) # Microsoft C compiler CC = $(DDK)/bin/x86/x86/cl.exe LD = $(DDK)/bin/x86/x86/link.exe # #complier options @@ -158,7 +160,7 @@ ifeq ($(TCC),) # Microsoft C compiler LIBS += $(DDK)/lib/wxp/i386/wmilib.lib LIBS += $(DDK)/lib/wxp/i386/ndis.lib LIBS += $(DDK)/lib/wxp/i386/sehupd.lib -else # use tcc. not working yet for the kernel module. + else # use tcc. not working yet for the kernel module. # TCC points to the root of tcc tree CC=$(TCC)/bin/wintcc EXTRA_CFLAGS += -DTCC -I.. @@ -168,7 +170,7 @@ else # use tcc. not working yet for the kernel module. CFLAGS += -include winmissing.h -include missing.h -include ../glue.h CFLAGS += -I../../inc/api -I../../inc/ddk -I../../inc/crt CFLAGS += -DRC_INVOKED -endif # use tcc + endif # use tcc #empty include directory to be built M ?= $(shell pwd) @@ -197,13 +199,12 @@ else # } { linux variables and targets grep LINUX_VERSION_CODE $(KERNELPATH)/include/$${G}/linux/version.h | \ awk '{printf "%03x%02x", $$3/256, $$3%256} ') - # awk '{printf "%d %03x%02d", $$3, $$3/256, $$3%256} ') - # $(warning version $(LINUX_VERSION_CODE)) - $(warning ------------- linux 2.6 and newer $(LIN_VER) ------------) + $(warning ------------- linux version $(LIN_VER) (hex) ------------) # We have three sections: OpenWrt, Linux 2.4 and Linux 2.6 ifeq ($(LIN_VER),openwrt) #--- { The Makefile section for openwrt --- - $(error ------ build on openwrt ---------- ) + # this was used on openwrt, but not anymore + $(error ------ build on openwrt ---------- ) # We do not include a dependency on include_e as it is called # by Makefile.openwrt in Build/Prepare M=. @@ -264,11 +265,11 @@ else # --- } { linux 2.6 and newer # This is the Makefile section for Linux 2.6.x including planetlab -ifeq ($(IPFW_PLANETLAB),1) - $(warning "---- Building for PlanetLab") - ipfw-cflags += -DIPFW_PLANETLAB # PlanetLab compilation -endif -# $(warning "---- Building Version 2.6 $(VER) in $(KERNELPATH)") + ifeq ($(IPFW_PLANETLAB),1) + $(warning "---- Building for PlanetLab") + ipfw-cflags += -DIPFW_PLANETLAB # PlanetLab compilation + endif + WARN := -O1 -Wall -Werror -DDEBUG_SPINLOCK -DDEBUG_MUTEXES # The main target @@ -281,7 +282,7 @@ endif endif # Required by kernel < 2.6.23, ccflags-y is used on newer version - ifeq ($(shell if [ "$(LIN_VER)" \< "20617" ] ; then echo "true"; fi),true) + ifeq ($(shell [ "$(LIN_VER)" \< "20617" ] && echo "true"),true) EXTRA_CFLAGS += $(ccflags-y) endif @@ -291,7 +292,8 @@ endif # $(warning make is $(MAKE) version is $(shell $(MAKE) -version | head -1) ) #--- openwrt ? - ifeq ($(_VER),openwrt) + ifeq ($(_VER),xx-openwrt) + $(warning ----------------------- compiling for openwrt -----) M=. obj-y := $(IPFW_SRCS:%.c=%.o) O_TARGET := $(obj-m)