]> oss.titaniummirror.com Git - cp210x.git/blobdiff - Makefile
This source works with dkms manually.
[cp210x.git] / Makefile
old mode 100644 (file)
new mode 100755 (executable)
index 5d5dbb8..6488d65
--- a/Makefile
+++ b/Makefile
@@ -1,10 +1,18 @@
-# CP2101 Makefile
+#!/usr/bin/make -f
 
-ifeq ("$(src)", "")
-       include Makefile.config
-       include Makefile$(KVER1)$(KVER2)
-else
-       include $(src)/Makefile.config
-       include $(src)/Makefile$(KVER1)$(KVER2)
-endif
+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