-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
51 lines (39 loc) · 838 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
46
47
48
49
50
51
KERN_MODS=
APPS=
ifeq ($(WHITELIST),y)
ifeq ($(ATMEL_ISI),y)
KERN_MODS += atmel-isi2
endif
else
KERN_MODS = memtest atmel-isi2
endif
all: $(KERN_MODS)
install_headers:
cp -f atmel-isi.h $(HEADER_DIR)
.FORCE:
ifeq ($(KERNELRELEASE),)
include $(PWD)/PolysatKern.mk
endif
DRIVER = $(KERN_MODS:%.c=%.ko)
ifneq ($(KERNELRELEASE),)
obj-m := ${DRIVER:%=%.o}
else
PWD := $(shell pwd)
modules: $(KERN_MODS)
modules_install: $(KERN_MODS)
ifeq ($(strip $(KERNELDIR)),)
$(error "KERNELDIR is undefined!")
else
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules_install
endif
%.ko: %.c
$(KERN_MODS):
ifeq ($(strip $(KERNELDIR)),)
$(error "KERNELDIR is undefined!")
else
$(MAKE) -C $(KERNELDIR) M=$(PWD) modules
endif
clean:
rm -rf *~ *.ko *.o *.mod.c modules.order Module.symvers .tmp_versions $(APPS)
endif
.PHONY: modules modules_install