From 6b8a368c51082fdd010ef5e1b0be4eb9b5059d1a Mon Sep 17 00:00:00 2001 From: Javier Date: Mon, 26 Oct 2026 00:50:06 +0100 Subject: refactor common parts into inc/ch375.h and add win9x, linux drivers --- linux/makefile | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 linux/makefile (limited to 'linux/makefile') 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 -- cgit v1.2.3