forked from frederickproctor/gomotion
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile.local
More file actions
97 lines (63 loc) · 1.84 KB
/
Makefile.local
File metadata and controls
97 lines (63 loc) · 1.84 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# all, KERNEL_SOURCE_DIR are in here, plus many other symbols
include Makefile
UTS = $(shell uname -a)
UTS_OS = $(shell uname -s)
UTS_RELEASE = $(shell uname -r | cut -f 1,2 -d .)
ifeq ($(UTS_OS), Linux)
ifeq ($(UTS_RELEASE), 2.4)
ifeq (x$(RTAI_DIR), x)
# can't make modules
modules :
@ echo Can\'t make modules on $(UTS)
modules_clean :
@ echo Can\'t make modules_clean on $(UTS)
modules_install :
@ echo Can\'t make modules_install on $(UTS)
else
# here's how we make Linux kernel modules
modules :
(cd rtlib && ./SETUP)
$(MAKE) ULAPI_DIR=$(ULAPI_DIR) -C $(KERNEL_SOURCE_DIR) SUBDIRS=$(shell pwd)/rtlib modules
modules_clean :
(cd rtlib && rm -f *.o)
modules_install :
$(MAKE) ULAPI_DIR=$(ULAPI_DIR) -C $(KERNEL_SOURCE_DIR) SUBDIRS=$(shell pwd)/rtlib modules_install
endif
else
ifeq ($(UTS_RELEASE), 2.6)
ifeq (x$(RTAI_DIR), x)
# can't make modules
modules :
@ echo Can\'t make modules on $(UTS)
modules_clean :
@ echo Can\'t make modules_clean on $(UTS)
modules_install :
@ echo Can\'t make modules_install on $(UTS)
else
# here's how we make Linux kernel modules
modules :
(cd rtlib && ./SETUP)
$(MAKE) ULAPI_DIR=$(ULAPI_DIR) -C /lib/modules/`uname -r`/build SUBDIRS=$(shell pwd)/rtlib modules
modules_clean :
(cd rtlib && rm -f *.o *.ko)
modules_install :
$(MAKE) ULAPI_DIR=$(ULAPI_DIR) -C $(KERNEL_SOURCE_DIR) SUBDIRS=$(shell pwd)/rtlib modules_install
endif
else
# can't make modules
modules :
@ echo Can\'t make modules on $(UTS)
modules_clean :
@ echo Can\'t make modules_clean on $(UTS)
modules_install :
@ echo Can\'t make modules_install on $(UTS)
endif
endif
else
# not Linux, ignore
modules modules_clean modules_install :
@ echo ignoring modules for $(UTS_OS)
endif
# add this dependency to the Autotools built-in clean rule
clean : modules_clean
.PHONY : modules modules_clean modules_install all clean install