ifneq ($(KERNELRELEASE),) obj-m := quicktun.o else KDIR := /lib/modules/$(shell uname -r)/build PWD := $(shell pwd) all: qtctl $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules qtctl: qtctl.c quicktun.h cc -o qtctl qtctl.c -lnl endif .PHONY: clean clean: rm -rf *.o *~ core .depend .*.cmd *.ko *.mod.c *.markers *.symvers *.order qtctl