forked from Samsung/TizenRT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDirectories.mk
279 lines (235 loc) · 7.82 KB
/
Directories.mk
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
###########################################################################
#
# Copyright 2016 Samsung Electronics All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
# either express or implied. See the License for the specific
# language governing permissions and limitations under the License.
#
###########################################################################
############################################################################
# Directories.mk
#
# Copyright (C) 2007-2012, 2014 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <[email protected]>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
# 3. Neither the name NuttX nor the names of its contributors may be
# used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
# COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
############################################################################
# All add-on directories.
#
# TINYARA_ADDONS is the list of directories built into the TinyAra kernel.
# USER_ADDONS is the list of directories that will be built into the user
# application
TINYARA_ADDONS :=
USER_ADDONS :=
# In the protected build, the applications in the apps/ directory will be
# into the userspace; in the flat build, the applications will b built into
# the kernel space. But in the kernel build, the applications will not be
# built at all by this Makefile.
ifeq ($(CONFIG_BUILD_PROTECTED),y)
USER_ADDONS += $(APPDIR)
else
ifneq ($(CONFIG_BUILD_KERNEL),y)
TINYARA_ADDONS += $(APPDIR)
endif
endif
# Add external directories
ifeq ($(CONFIG_BUILD_PROTECTED),y)
USER_ADDONS += $(EXTDIR)
ifeq ($(CONFIG_HAVE_CXX),y)
# libc++ library is added in external directory as an add-on.
USER_ADDONS += $(EXTDIR)$(DELIM)libcxx
endif
ifeq ($(CONFIG_ENABLE_IOTIVITY),y)
USER_ADDONS += $(EXTDIR)$(DELIM)iotivity
endif
ifeq ($(CONFIG_ENABLE_IOTJS),y)
USER_ADDONS += $(EXTDIR)$(DELIM)iotjs$(DELIM)config$(DELIM)tizenrt
endif
else
ifneq ($(CONFIG_BUILD_KERNEL),y)
TINYARA_ADDONS += $(EXTDIR)
ifeq ($(CONFIG_HAVE_CXX),y)
# libc++ library is added in external directory as an add-on.
TINYARA_ADDONS += $(EXTDIR)$(DELIM)libcxx
endif
ifeq ($(CONFIG_ENABLE_IOTIVITY),y)
TINYARA_ADDONS += $(EXTDIR)$(DELIM)iotivity
endif
ifeq ($(CONFIG_ENABLE_IOTJS),y)
TINYARA_ADDONS += $(EXTDIR)$(DELIM)iotjs$(DELIM)config$(DELIM)tizenrt
endif
endif # CONFIG_BUILD_KERNEL
endif
# Add Framework directories
ifeq ($(CONFIG_BUILD_PROTECTED),y)
USER_ADDONS += $(FRAMEWORK_LIB_DIR)
else
ifneq ($(CONFIG_BUILD_KERNEL),y)
TINYARA_ADDONS += $(FRAMEWORK_LIB_DIR)
endif
endif
# Add tools directories
ifeq ($(CONFIG_BUILD_PROTECTED),y)
USER_ADDONS += $(TOOLSDIR)
else
ifneq ($(CONFIG_BUILD_KERNEL),y)
TINYARA_ADDONS += $(TOOLSDIR)
endif
endif
# Lists of build directories.
#
# FSDIRS depend on file descriptor support; NONFSDIRS do not (except for parts
# of FSDIRS). We will exclude FSDIRS from the build if file descriptor
# support is disabled
# CONTEXTDIRS include directories that have special, one-time pre-build
# requirements. Normally this includes things like auto-generation of
# configuration specific files or creation of configurable symbolic links
# USERDIRS - When TinyAra is build is a monolithic kernel, this provides the
# list of directories that must be built
# OTHERDIRS - These are directories that are not built but probably should
# be cleaned to prevent garbage from collecting in them when changing
# configurations.
NONFSDIRS = kernel $(ARCH_SRC) $(TINYARA_ADDONS)
FSDIRS = fs drivers
ifeq ($(CONFIG_BINFMT_ENABLE),y)
FSDIRS += binfmt
endif
CONTEXTDIRS = $(APPDIR)
CONTEXTDIRS += $(TOOLSDIR)
CONTEXTDIRS += mm
CONTEXTDIRS += wqueue
#ifeq ($(CONFIG_ENABLE_IOTIVITY),y)
#CONTEXTDIRS += $(EXTDIR)$(DELIM)iotivity
#endif
ifeq ($(CONFIG_STDK_IOT_CORE),y)
CONTEXTDIRS += $(EXTDIR)$(DELIM)stdk
endif
USERDIRS =
OTHERDIRS = $(LIBRARIES_DIR)
ifeq ($(CONFIG_BUILD_PROTECTED),y)
USERDIRS += $(LIB_DIR)$(DELIM)libc mm wqueue$(USER_ADDONS)
ifeq ($(CONFIG_HAVE_CXX),y)
USERDIRS += $(LIB_DIR)$(DELIM)libxx
endif
else
ifeq ($(CONFIG_BUILD_KERNEL),y)
USERDIRS += $(LIB_DIR)$(DELIM)libc mm wqueue
ifeq ($(CONFIG_HAVE_CXX),y)
USERDIRS += $(LIB_DIR)$(DELIM)libxx
endif
else
NONFSDIRS += $(LIB_DIR)$(DELIM)libc mm wqueue
OTHERDIRS += $(USER_ADDONS)
ifeq ($(CONFIG_HAVE_CXX),y)
NONFSDIRS += $(LIB_DIR)$(DELIM)libxx
else
OTHERDIRS += $(LIB_DIR)$(DELIM)libxx
endif
endif
endif
ifeq ($(CONFIG_LIB_SYSCALL),y)
NONFSDIRS += syscall
CONTEXTDIRS += syscall
USERDIRS += syscall
else
OTHERDIRS += syscall
endif
ifeq ($(CONFIG_LIBC_DOWNLOAD_ZONEINFO),y)
CONTEXTDIRS += $(LIB_DIR)$(DELIM)libc
endif
USERDIRS += $(TOPDIR)$(DELIM)..$(DELIM)loadable_apps
# CLEANDIRS are the directories that will clean in. These are
# all directories that we know about.
# KERNDEPDIRS are the directories in which we will build target dependencies.
# If TinyAra and applications are built separately (CONFIG_BUILD_PROTECTED or
# CONFIG_BUILD_KERNEL), then this holds only the directories containing
# kernel files.
# USERDEPDIRS. If TinyAra and applications are built separately (CONFIG_BUILD_PROTECTED),
# then this holds only the directories containing user files. If
# CONFIG_BUILD_KERNEL is selected, then applications are not build at all.
CLEANDIRS = $(NONFSDIRS) $(FSDIRS) $(USERDIRS) $(OTHERDIRS)
KERNDEPDIRS = $(NONFSDIRS)
USERDEPDIRS = $(USERDIRS)
# Add file system directories to KERNDEPDIRS (they are already in CLEANDIRS)
ifeq ($(CONFIG_NFILE_DESCRIPTORS),0)
ifeq ($(CONFIG_NET),y)
ifneq ($(CONFIG_NSOCKET_DESCRIPTORS),0)
KERNDEPDIRS += fs
endif
KERNDEPDIRS += drivers
endif
else
KERNDEPDIRS += $(FSDIRS)
endif
# Add Audio Module
ifeq ($(CONFIG_AUDIO),y)
KERNDEPDIRS += audio
endif
CLEANDIRS += audio
# Add Compression Module
ifeq ($(CONFIG_COMPRESSED_BINARY),y)
KERNDEPDIRS += compression
endif
CLEANDIRS += compression tools/compression
# Add Crypto Module
ifeq ($(CONFIG_CRYPTO),y)
KERNDEPDIRS += crypto
endif
CLEANDIRS += crypto
# Add networking directories to KERNDEPDIRS and CLEANDIRS
ifeq ($(CONFIG_NET),y)
KERNDEPDIRS += net
endif
CLEANDIRS += net
# Add Power Managment Module
ifeq ($(CONFIG_PM),y)
KERNDEPDIRS += pm
endif
CLEANDIRS += pm
# Add Logger Module
ifeq ($(CONFIG_LOGM),y)
KERNDEPDIRS += logm
endif
CLEANDIRS += logm
ifeq ($(CONFIG_SE),y)
KERNDEPDIRS += se
endif
CLEANDIRS += se
ifeq ($(CONFIG_NDP120),y)
CONTEXTDIRS += drivers
endif