hello1 handles all required operations while hello2 triggers them at load and unload
15 lines
254 B
Makefile
15 lines
254 B
Makefile
|
|
ifneq ($(KERNELRELEASE),)
|
|
# kbuild part of makefile
|
|
obj-m := hello1.o hello2.o
|
|
ccflags-y := -I$(obj)/inc
|
|
else
|
|
# normal makefile
|
|
KDIR ?= /lib/modules/`uname -r`/build
|
|
|
|
default:
|
|
$(MAKE) -C $(KDIR) M=$$PWD
|
|
clean:
|
|
$(MAKE) -C $(KDIR) M=$$PWD clean
|
|
endif
|