-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (25 loc) · 749 Bytes
/
Makefile
File metadata and controls
37 lines (25 loc) · 749 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
CC:=gcc
AR:=ar
MCFLAGS:=-Wall -O2
OBJS:=ztrace test
all: kztrace.ko ztrace
ztrace.o: ztrace.c
$(CC) $(MCFLAGS) -o $@ -c $<
hashtable.o: hashtable.c hashtable.h
$(CC) $(MCFLAGS) -o $@ -c $<
ztrace: ztrace.o hashtable.o libpt_scan.a
$(CC) -L. -lpt_scan -o $@ ztrace.o hashtable.o -lpt_scan
obj-m+=kztrace.o
libpt_scan.a: pt_scan.o
$(AR) rv libpt_scan.a pt_scan.o
pt_scan.o: pt_scan.c pt_scan.h
$(CC) $(MCFLAGS) -static -c pt_scan.c
test: test.c
$(CC) -Wno-unused-but-set-variable -Wall -o $@ $<
test2: test2.c
$(CC) -Wno-unused-but-set-variable -Wall -o $@ $<
kztrace.ko: kztrace.c
$(MAKE) -C /lib/modules/`uname -r`/build M=$(PWD) modules
clean:
rm -f *.o *.ko $(OBJS)
$(MAKE) -C /lib/modules/`uname -r`/build M=$(PWD) clean