X-Git-Url: https://bbs.cooldavid.org/git/?p=jme.git;a=blobdiff_plain;f=Makefile;h=8116d0439eb558155ca56519e698a30d52a0bf9c;hp=90b9b97312b3e70458fce3282bc2634afbf8b5c2;hb=e882564fc2e6086b3beb8aa1b899c20b58ab28bf;hpb=79ce639c9d90abc4d30d749af2d135c20a8c419e diff --git a/Makefile b/Makefile index 90b9b97..8116d04 100644 --- a/Makefile +++ b/Makefile @@ -2,14 +2,9 @@ MODNAME := jme TEMPFILES := $(MODNAME).o $(MODNAME).mod.c $(MODNAME).mod.o Module.symvers .$(MODNAME).*.cmd .tmp_versions modules.order -DEBUG_FLAGS += -DDEBUG -#DEBUG_FLAGS += -Wpointer-arith -Wbad-function-cast -Wsign-compare -#DEBUG_FLAGS += -DCSUM_DEBUG -#DEBUG_FLAGS += -DTX_DEBUG -#DEBUG_FLAGS += -DRX_DEBUG - EXTRA_CFLAGS += -Wall -O3 -#EXTRA_CFLAGS += $(DEBUG_FLAGS) +#EXTRA_CFLAGS += -DTX_DEBUG +#EXTRA_CFLAGS += -DREG_DEBUG obj-m := $(MODNAME).o @@ -17,12 +12,22 @@ ifeq (,$(BUILD_KERNEL)) BUILD_KERNEL=$(shell uname -r) endif -KSRC := /lib/modules/$(BUILD_KERNEL)/build +KSRC ?= /lib/modules/$(BUILD_KERNEL)/build all: @$(MAKE) -C $(KSRC) SUBDIRS=$(shell pwd) modules @rm -rf $(TEMPFILES) +checkstack: + $(MAKE) -C $(KSRC) SUBDIRS=$(shell pwd) modules + objdump -d $(obj-m) | perl $(KSRC)/scripts/checkstack.pl i386 + @rm -rf $(TEMPFILES) + +namespacecheck: + $(MAKE) -C $(KSRC) SUBDIRS=$(shell pwd) modules + perl $(KSRC)/scripts/namespace.pl + @rm -rf $(TEMPFILES) + clean: @rm -rf $(MODNAME).ko $(TEMPFILES)