-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
47 lines (35 loc) · 852 Bytes
/
Makefile
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
37
38
39
40
41
42
43
44
45
#WARN := -W -Wall -Wstrict-prototypes -Wmissing-prototypes
#INCLUDE := -isystem /lib/modules/`uname -r`/build/include
#CFLAGS := -O2 -DMODULE -D__KERNEL__${WARN} ${INCLUDE}
#CC := gcc
KERNELDIR ?= /lib/modules/$(shell uname -r)/build
PWD := $(shell pwd)
obj-m := thunderfs.o
build:
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
%.o: %.c
echo $(obj-m)
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
.PHONY: %Clean
clean:
@rm -f modules.order; \
rm -f Module.symvers; \
rm -f thunderfs.ko; \
rm -f thunderfs.mod.c; \
rm -f thunderfs.mod.o; \
rm -f thunderfs.o; \
rm -f .thunderfs.ko.cmd; \
rm -f .thunderfs.mod.o.cmd; \
rm -f .thunderfs.o.cmd; \
rm -rf .tmp_versions;
.PHONY: %Clean
%Clean:
rm -f modules.order; \
rm -f Modules.symvers; \
rm -f $*.ko; \
rm -f $*.mod.c; \
rm -f $*.mod.o; \
rm -f $*.o; \
%Test:
@echo $@
@echo $*