1obj-m += one_of_each.o 2 3# Overwrite to an actual kernel dir when using this: 4# 5# $ make KDIR=/path/to/actual/kernel/source/dir 6# 7KDIR := /tmp/some/kernel/source/dir 8 9PWD := $(shell pwd) 10default: 11 make -C $(KDIR) tinyconfig 12 cd $(KDIR) && ./scripts/config -e 64BIT -e MODULES -e MODVERSIONS -e CONFIG_DEBUG_INFO 13 $(MAKE) -C $(KDIR) olddefconfig 14 $(MAKE) -C $(KDIR) 15 $(MAKE) -C $(KDIR) M=$(PWD) modules 16 rm -rf *.mod.c *.o .*.cmd .*.d *.mod modules.order Module.symvers .tmp_versions 17 18clean: 19 rm -f *.ko 20