From: Michal MalĂ˝ Date: Wed, 23 Sep 2015 08:59:44 +0000 (+0200) Subject: Split KLGD-FF plugin and the testing module X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=129b6a45f754f37f2d3b4ae0e17deca69beae65e;p=KLGD_FF_plugin.git Split KLGD-FF plugin and the testing module --- diff --git a/buildall.sh b/buildall.sh new file mode 100755 index 0000000..0fbaa08 --- /dev/null +++ b/buildall.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +echo "Building KLGD-FF..." +cd ./plugin +make || exit 1 + +echo "Building KLGD Testing module" +cd ../testmod +make diff --git a/Makefile b/plugin/Makefile similarity index 78% rename from Makefile rename to plugin/Makefile index 21fae54..2097578 100644 --- a/Makefile +++ b/plugin/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 diff --git a/klgd_ff_plugin.c b/plugin/klgd_ff_plugin.c similarity index 100% rename from klgd_ff_plugin.c rename to plugin/klgd_ff_plugin.c diff --git a/klgd_ff_plugin.h b/plugin/klgd_ff_plugin.h similarity index 99% rename from klgd_ff_plugin.h rename to plugin/klgd_ff_plugin.h index ef82fbc..546b2ea 100644 --- a/klgd_ff_plugin.h +++ b/plugin/klgd_ff_plugin.h @@ -1,5 +1,5 @@ #include -#include "../KLGD/klgd.h" +#include "../../KLGD/klgd.h" #define FFPL_EFBIT(x) BIT(x - FF_EFFECT_MIN) diff --git a/klgd_ff_plugin_p.h b/plugin/klgd_ff_plugin_p.h 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 index 0000000..d1ef1ef --- /dev/null +++ b/testmod/Makefile @@ -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 diff --git a/klgdff.c b/testmod/klgdff.c similarity index 99% rename from klgdff.c rename to testmod/klgdff.c index cc5a142..390a24d 100644 --- a/klgdff.c +++ b/testmod/klgdff.c @@ -3,7 +3,7 @@ #include #include #include -#include "klgd_ff_plugin.h" +#include "../plugin/klgd_ff_plugin.h" #define EFFECT_COUNT 8