summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a26b6e8
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,19 @@
+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