diff options
| author | Javier <dev.git@javispedro.com> | 2026-10-26 00:50:06 +0100 |
|---|---|---|
| committer | Javier <dev.git@javispedro.com> | 2026-10-26 00:50:06 +0100 |
| commit | 6b8a368c51082fdd010ef5e1b0be4eb9b5059d1a (patch) | |
| tree | e274d41a8dd5e912e20617a937a1fda5af91f8de /linux/makefile | |
| parent | 9b1cf601360fb194047e6dcc2af75c2f38c611ec (diff) | |
| download | chu-6b8a368c51082fdd010ef5e1b0be4eb9b5059d1a.tar.gz chu-6b8a368c51082fdd010ef5e1b0be4eb9b5059d1a.zip | |
refactor common parts into inc/ch375.h and add win9x, linux drivers
Diffstat (limited to 'linux/makefile')
| -rw-r--r-- | linux/makefile | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/linux/makefile b/linux/makefile new file mode 100644 index 0000000..f293cc1 --- /dev/null +++ b/linux/makefile @@ -0,0 +1,28 @@ +MODDIR := /lib/modules/$(shell uname -r) + +INCLUDE := -isystem $(MODDIR)/build/include -isystem ../inc +CFLAGS := -O2 -D__KERNEL__ -DMODULE -Wall $(INCLUDE) +ifneq (,$(wildcard $(MODDIR)/build/include/linux/modversions.h)) +CFLAGS += -DMODVERSIONS +endif + +CC ?= gcc + +chudisk.o: chudisk.c lnxabs.h ch375lnx.h + +.PHONY: clean install uninstall test +clean: + rm -rf *.o + +install: chudisk.o + install -m0644 chudisk.o $(MODDIR)/block + depmod -A + +uninstall: + rm -f $(MODDIR)/block/chudisk.o + +test: chudisk.o + if lsmod | grep chudisk; then rmmod chudisk; fi + dmesg -n 8 + dmesg -c > /dev/null + insmod chudisk.o force=1 |
