diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3677112 --- /dev/null +++ b/Makefile @@ -0,0 +1,20 @@ +ifneq ($(KERNELRELEASE),) +kbench9000-y := $(sort $(patsubst %.c,%.o,$(filter-out %.mod.c,$(subst $(M)/,,$(wildcard $(M)/*.c))))) +obj-m := kbench9000.o +ccflags-y += -O3 +ccflags-y += -D'pr_fmt(fmt)=KBUILD_MODNAME ": " fmt' +else +KERNELDIR ?= /lib/modules/$(shell uname -r)/build +PWD := $(shell pwd) + +default: build + +run: build + sudo ./run.sh +build: + $(MAKE) -C $(KERNELDIR) M=$(PWD) +clean: + $(MAKE) -C $(KERNELDIR) M=$(PWD) clean +.PHONY: default run build clean +endif + |