gitignore and adjusted makefile
This commit is contained in:
parent
dec956d17a
commit
f686c61ad3
2 changed files with 6 additions and 5 deletions
1
code/.gitignore
vendored
Normal file
1
code/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
*.o
|
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue