-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
37 lines (29 loc) · 797 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
# optimize module with O2
ccflags-y += -O2
# seperate the two parts of the Makefile (kbuild and normal)
# see https://www.kernel.org/doc/Documentation/kbuild/modules.txt
ifneq ($(KERNELRELEASE),)
# kbuild part of makefile
obj-m := hid-retrobit.o
else
# normal makefile
KDIR ?= /lib/modules/`uname -r`/build
all:
$(MAKE) -C $(KDIR) M=$$PWD modules
install:
$(MAKE) -C $(KDIR) M=$$PWD modules_install
clean:
$(MAKE) -C $(KDIR) M=$$PWD clean
help:
@echo ""
@echo " all - default target, build the module"
@echo " install - install the module (requires root privileges)"
@echo " clean - remove generated files"
@echo " help - display this text"
@echo ""
endif
depend .depend dep:
$(CC) $(CFLAGS) -M *.c > .depend
ifeq (.depend,$(wildcard .depend))
include .depend
endif