gitignore and adjusted makefile

This commit is contained in:
twoneis 2025-04-04 00:13:47 +02:00
parent dec956d17a
commit f686c61ad3
2 changed files with 6 additions and 5 deletions

1
code/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
*.o

View file

@ -1,16 +1,16 @@
obj-m += lkm.o obj-m += lkm.o
all: module leak SOURCES := $(wildcard *.c)
TARGETS := $(SOURCES:.c=.o)
all: $(TARGETS)
run: leak run: leak
./leak.o ./leak.o
module: lkm:
make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules
leak:
gcc leak.c -o leak.o
clean: clean:
make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) clean make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) clean
rm -f *.o rm -f *.o