mod_hello/Makefile

21 lines
414 B
Makefile
Raw Permalink Normal View History

2014-09-17 20:51:24 +00:00
obj-m += mod_hello.o
2017-11-05 14:50:18 +00:00
all: build info
2023-02-17 16:02:10 +00:00
build: modules helloctl/helloctl
2017-11-05 14:33:39 +00:00
helloctl/helloctl: ./helloctl/helloctl.c
$(CC) -o $@ $<
2017-11-05 14:50:18 +00:00
mod_hello.ko: mod_hello.c
2023-02-17 16:02:10 +00:00
modules: mod_hello.ko
$(MAKE) -C $(shell realpath /lib/modules/$(shell uname -r)/build) M=$(PWD) modules
2014-09-17 20:51:24 +00:00
2017-11-05 14:50:18 +00:00
info: mod_hello.ko
modinfo $<
2014-09-17 20:51:24 +00:00
clean:
2023-02-17 16:02:10 +00:00
$(MAKE) -C $(shell realpath /lib/modules/$(shell uname -r)/build) M=$(PWD) clean
2017-11-05 14:33:39 +00:00
rm -f helloctl/helloctl *~