summaryrefslogtreecommitdiff
path: root/Makefile
blob: 2815b946540e7df68d16b3aeacf80edf52704a35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
CC = gcc
CFLAGS = -Wall
PROG = helloworld
HPTEST = hptest
KMOD = variable_monitor
obj-m := $(KMOD).o
$(KMOD)-objs := monitor_kernel.o

all: $(PROG) $(HPTEST) module

$(PROG): helloworld.c
	$(CC) $(CFLAGS) -o $(PROG) helloworld.c monitor_user.c

$(HPTEST): hptest.c
	$(CC) $(CFLAGS) -o $(HPTEST) hptest.c monitor_user.c

module:
	make -C linux-5.17.15 M=$(PWD) modules

clean:
	rm -f $(PROG)
	rm -f $(HPTEST)
	make -C linux-5.17.15 M=$(PWD) clean