Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/hakchi2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'clovercon/Makefile')
-rw-r--r--clovercon/Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/clovercon/Makefile b/clovercon/Makefile
new file mode 100644
index 00000000..ad69f539
--- /dev/null
+++ b/clovercon/Makefile
@@ -0,0 +1,27 @@
+CURRENT = $(shell uname -r)
+TARGET = clovercon
+OBJS = clovercon.o
+KDIR = linux-nesmini
+#KDIR = ~/linux
+PWD = $(shell pwd)
+DEST = .
+
+obj-m := $(TARGET).o
+
+default:
+ make -C $(KDIR) SUBDIRS=$(PWD) ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
+ modinfo $(TARGET).ko
+ arm-linux-gnueabihf-strip --strip-unneeded $(TARGET).ko
+
+$(TARGET).o: $(OBJS)
+ $(LD) $(LD_RFLAG) ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -r -o $@ $(OBJS)
+
+install:
+ su -c "cp -v $(TARGET).ko $(DEST) && /sbin/depmod -a"
+
+clean:
+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean
+
+.PHONY: modules clean
+
+-include $(KDIR)/Rules.make