Skip to content

Commit 5bdf8e3

Browse files
authored
rtmouse.cの分割(リファクタリング) (#92)
1 parent 43532e9 commit 5bdf8e3

File tree

10 files changed

+2048
-1831
lines changed

10 files changed

+2048
-1831
lines changed

.test/lint.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ SRC_DIR=$(cd $(dirname ${BASH_SOURCE:-$0}); cd ../; pwd)
66

77
lint_driver () {
88
pushd $SRC_DIR/src/drivers
9-
python3 $SRC_DIR/.test/bin/run-clang-format.py rtmouse.c
9+
python3 $SRC_DIR/.test/bin/run-clang-format.py rtmouse_main.c
10+
python3 $SRC_DIR/.test/bin/run-clang-format.py rtmouse_dev.c
11+
python3 $SRC_DIR/.test/bin/run-clang-format.py rtmouse_spi.c
12+
python3 $SRC_DIR/.test/bin/run-clang-format.py rtmouse_i2c.c
13+
python3 $SRC_DIR/.test/bin/run-clang-format.py rtmouse_gpio.c
1014
python3 $SRC_DIR/.test/bin/run-clang-format.py rtmouse.h
1115
popd
1216
}

src/drivers/Makefile.header_from_apt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
MODULE:= rtmouse
22
obj-m:= $(MODULE).o
3+
$(MODULE)-y:= $(MODULE)_main.o $(MODULE)_dev.o $(MODULE)_spi.o $(MODULE)_i2c.o $(MODULE)_gpio.o
34
clean-files:= *.o *.ko *.mod.[co] *~
45

56
LINUX_SRC_DIR:=/usr/src/linux-headers-$(shell uname -r)
67
VERBOSE:=0
78

8-
rtmouse.ko: rtmouse.c rtmouse.h
9+
$(MODULE).ko: $(MODULE)_main.c $(MODULE)_dev.c $(MODULE)_spi.c $(MODULE)_i2c.c $(MODULE)_gpio.c $(MODULE).h
910
make -C $(LINUX_SRC_DIR) M=$(shell pwd) V=$(VERBOSE) modules
1011

1112
clean:
1213
make -C $(LINUX_SRC_DIR) M=$(shell pwd) V=$(VERBOSE) clean
1314

14-
install: rtmouse.ko
15+
install: $(MODULE).ko
1516
cp ../../50-rtmouse.rules /etc/udev/rules.d/
1617

1718
uninstall:

src/drivers/Makefile.header_from_source

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
MODULE:= rtmouse
22
obj-m:= $(MODULE).o
3+
$(MODULE)-y:= $(MODULE)_main.o $(MODULE)_dev.o $(MODULE)_spi.o $(MODULE)_i2c.o $(MODULE)_gpio.o
34
clean-files:= *.o *.ko *.mod.[co] *~
45

56
LINUX_SRC_DIR:=/usr/src/linux
67
VERBOSE:=0
78

8-
rtmouse.ko: rtmouse.c rtmouse.h
9+
$(MODULE).ko: $(MODULE)_main.c $(MODULE)_dev.c $(MODULE)_spi.c $(MODULE)_i2c.c $(MODULE)_gpio.c $(MODULE).h
910
make -C $(LINUX_SRC_DIR) M=$(shell pwd) V=$(VERBOSE) modules
1011

1112
clean:

0 commit comments

Comments
 (0)