From f686c61ad396e0b83653274554b55da38cbf7608 Mon Sep 17 00:00:00 2001 From: twoneis Date: Fri, 4 Apr 2025 00:13:47 +0200 Subject: [PATCH] gitignore and adjusted makefile --- code/.gitignore | 1 + code/Makefile | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 code/.gitignore diff --git a/code/.gitignore b/code/.gitignore new file mode 100644 index 000000000..5761abcfd --- /dev/null +++ b/code/.gitignore @@ -0,0 +1 @@ +*.o diff --git a/code/Makefile b/code/Makefile index 9b1b8fa60..5f0e7ecf1 100644 --- a/code/Makefile +++ b/code/Makefile @@ -1,16 +1,16 @@ obj-m += lkm.o -all: module leak +SOURCES := $(wildcard *.c) +TARGETS := $(SOURCES:.c=.o) + +all: $(TARGETS) run: leak ./leak.o -module: +lkm: make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) modules -leak: - gcc leak.c -o leak.o - clean: make -C /lib/modules/$(shell uname -r)/build M=$(shell pwd) clean rm -f *.o