From eab00d2e359265d1b892fecd0174ea7f37e80c0a Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Fri, 17 Feb 2023 11:02:10 -0500 Subject: [PATCH] Makefile: cleanup from 2022-04-13 --- Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 635acf7..3a4b792 100644 --- a/Makefile +++ b/Makefile @@ -2,17 +2,19 @@ obj-m += mod_hello.o all: build info -build: mod_hello.ko helloctl/helloctl +build: modules helloctl/helloctl helloctl/helloctl: ./helloctl/helloctl.c $(CC) -o $@ $< mod_hello.ko: mod_hello.c - $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules + +modules: mod_hello.ko + $(MAKE) -C $(shell realpath /lib/modules/$(shell uname -r)/build) M=$(PWD) modules info: mod_hello.ko modinfo $< clean: - $(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean + $(MAKE) -C $(shell realpath /lib/modules/$(shell uname -r)/build) M=$(PWD) clean rm -f helloctl/helloctl *~