blob: dbb8fb36df798a7026ff3186e0c3f04e7ef07fdb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
CC = gcc
CFLAGS = -Wall
PROG = helloworld
KMOD = variable_monitor
obj-m := $(KMOD).o
$(KMOD)-objs := monitor_kernel.o
all: $(PROG) module
$(PROG): helloworld.c
$(CC) $(CFLAGS) -o $(PROG) helloworld.c monitor_user.c
module:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules
clean:
rm -f $(PROG)
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean
|