Skip to content

Commit

Permalink
Makefile: refactor somewhat to enable make arg propagation
Browse files Browse the repository at this point in the history
Signed-off-by: David Flemström <david.flemstrom@gmail.com>
  • Loading branch information
dflemstr committed Mar 29, 2024
1 parent f32f597 commit 6bb9bca
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@

# external KDIR specification is supported
KDIR ?= /lib/modules/$(shell uname -r)/build
PWD ?= $(shell pwd)

SOURCES := aquacomputer_d5next.c docs/aquacomputer_d5next.rst

.PHONY: all modules modules clean checkpatch dev

all: modules

install: modules_install

modules modules_install clean:
make -C $(KDIR) M=$$PWD $@
$(MAKE) -C $(KDIR) M=$(PWD) $@

checkpatch:
$(KDIR)/scripts/checkpatch.pl --strict --no-tree $(SOURCES)

dev:
make clean
make
$(MAKE) clean
$(MAKE)
sudo rmmod aquacomputer_d5next || true
sudo insmod aquacomputer_d5next.ko

0 comments on commit 6bb9bca

Please sign in to comment.