]> oss.titaniummirror.com Git - cp210x.git/blobdiff - Makefile.dkms
First pass at building a dkms package.
[cp210x.git] / Makefile.dkms
diff --git a/Makefile.dkms b/Makefile.dkms
new file mode 100755 (executable)
index 0000000..6488d65
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/make -f
+
+STRIP  = strip --strip-unneeded --remove-section=.comment --remove-section=.note
+
+all:
+       -rm -rf builddir
+       cp -a src builddir
+       cd builddir && ./configure -kver $(KVER)
+       test -f builddir/Makefile.go
+       $(MAKE) -C builddir -f Makefile.go
+       cp builddir/cp2101.ko cp210x.ko
+       $(STRIP) cp210x.ko
+
+clean:
+       -rm -rf builddir cp210x.ko
+
+
+.PHONY: all clean