Makefile: cleanup from 2022-04-13

This commit is contained in:
Vincent Batts 2023-02-17 11:02:10 -05:00
parent c09db4c943
commit eab00d2e35

View file

@ -2,17 +2,19 @@ obj-m += mod_hello.o
all: build info all: build info
build: mod_hello.ko helloctl/helloctl build: modules helloctl/helloctl
helloctl/helloctl: ./helloctl/helloctl.c helloctl/helloctl: ./helloctl/helloctl.c
$(CC) -o $@ $< $(CC) -o $@ $<
mod_hello.ko: mod_hello.c 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 info: mod_hello.ko
modinfo $< modinfo $<
clean: 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 *~ rm -f helloctl/helloctl *~