TARGET=net.o ifneq ($(KERNELRELEASE),) obj-m := ${TARGET} else KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) default: $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules endif clean: rm -f *~ ${TARGET}.o ${TARGET}.ko .${TARGET}* rm -f .built_in.o.cmd built_in.o rm -f .*.cmd *.ko *.mod.c *.mod.o *.o *.ko