]> Devoid-pointer.net GitWeb - KLGD_FF_plugin.git/commitdiff
Split KLGD-FF plugin and the testing module
authorMichal Malý <madcatxster@devoid-pointer.net>
Wed, 23 Sep 2015 08:59:44 +0000 (10:59 +0200)
committerMichal Malý <madcatxster@devoid-pointer.net>
Wed, 23 Sep 2015 08:59:44 +0000 (10:59 +0200)
buildall.sh [new file with mode: 0755]
plugin/Makefile [moved from Makefile with 78% similarity]
plugin/klgd_ff_plugin.c [moved from klgd_ff_plugin.c with 100% similarity]
plugin/klgd_ff_plugin.h [moved from klgd_ff_plugin.h with 99% similarity]
plugin/klgd_ff_plugin_p.h [moved from klgd_ff_plugin_p.h with 100% similarity]
testmod/Makefile [new file with mode: 0644]
testmod/klgdff.c [moved from klgdff.c with 99% similarity]

diff --git a/buildall.sh b/buildall.sh
new file mode 100755 (executable)
index 0000000..0fbaa08
--- /dev/null
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+echo "Building KLGD-FF..."
+cd ./plugin
+make || exit 1
+
+echo "Building KLGD Testing module"
+cd ../testmod
+make
similarity index 78%
rename from Makefile
rename to plugin/Makefile
index 21fae5451cbe4dfe912a631a23632cbf0b758e4d..2097578acba12f22df946aa5f668cd48df60304d 100644 (file)
--- a/Makefile
@@ -3,9 +3,7 @@ KBUILD_EXTRA_SYMBOLS := /home/madcat/Devel/KLGD/Module.symvers
 KBUILD_CFLAGS += -g3
 
 ifneq ($(KERNELRELEASE),)
-       klgdffm-y := klgd_ff_plugin.o
-       klgdffm-y += klgdff.o
-       obj-m += klgd_ff_plugin.o klgdffm.o
+       obj-m += klgd_ff_plugin.o
 
 else
        KERNELDIR ?= /lib/modules/$(shell uname -r)/build
similarity index 100%
rename from klgd_ff_plugin.c
rename to plugin/klgd_ff_plugin.c
similarity index 99%
rename from klgd_ff_plugin.h
rename to plugin/klgd_ff_plugin.h
index ef82fbcb40951a66de8e58cf4b2bc98f40e567bf..546b2ea57f270f3eb2c718d77b638e2c806eea2a 100644 (file)
@@ -1,5 +1,5 @@
 #include <linux/input.h>
-#include "../KLGD/klgd.h"
+#include "../../KLGD/klgd.h"
 
 #define FFPL_EFBIT(x) BIT(x - FF_EFFECT_MIN)
 
similarity index 100%
rename from klgd_ff_plugin_p.h
rename to plugin/klgd_ff_plugin_p.h
diff --git a/testmod/Makefile b/testmod/Makefile
new file mode 100644 (file)
index 0000000..d1ef1ef
--- /dev/null
@@ -0,0 +1,19 @@
+# You will want to fix this line
+KBUILD_EXTRA_SYMBOLS := /home/madcat/Devel/KLGD/Module.symvers
+KBUILD_EXTRA_SYMBOLS += /home/madcat/Devel/KLGD_FFModule/plugin/Module.symvers
+KBUILD_CFLAGS += -g3
+
+ifneq ($(KERNELRELEASE),)
+       obj-m += klgdff.o
+
+else
+       KERNELDIR ?= /lib/modules/$(shell uname -r)/build
+       PWD := $(shell pwd)
+
+default:
+       $(MAKE) -C $(KERNELDIR) M=$(PWD)
+
+clean:
+       $(MAKE) -C $(KERNELDIR) M=$(PWD) clean
+
+endif
similarity index 99%
rename from klgdff.c
rename to testmod/klgdff.c
index cc5a14261c880576d7317bc0102b355061bef628..390a24d51f84952318204fa8f02d3f8fa97da84e 100644 (file)
--- a/klgdff.c
@@ -3,7 +3,7 @@
 #include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/sysfs.h>
-#include "klgd_ff_plugin.h"
+#include "../plugin/klgd_ff_plugin.h"
 
 #define EFFECT_COUNT 8