From 129b6a45f754f37f2d3b4ae0e17deca69beae65e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Mal=C3=BD?= Date: Wed, 23 Sep 2015 10:59:44 +0200 Subject: [PATCH] Split KLGD-FF plugin and the testing module --- buildall.sh | 9 +++++++++ Makefile => plugin/Makefile | 4 +--- klgd_ff_plugin.c => plugin/klgd_ff_plugin.c | 0 klgd_ff_plugin.h => plugin/klgd_ff_plugin.h | 2 +- .../klgd_ff_plugin_p.h | 0 testmod/Makefile | 19 +++++++++++++++++++ klgdff.c => testmod/klgdff.c | 2 +- 7 files changed, 31 insertions(+), 5 deletions(-) create mode 100755 buildall.sh rename Makefile => plugin/Makefile (78%) rename klgd_ff_plugin.c => plugin/klgd_ff_plugin.c (100%) rename klgd_ff_plugin.h => plugin/klgd_ff_plugin.h (99%) rename klgd_ff_plugin_p.h => plugin/klgd_ff_plugin_p.h (100%) create mode 100644 testmod/Makefile rename klgdff.c => testmod/klgdff.c (99%) 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 -- 2.43.5