2014-08-30 23:57:44 +08:00
|
|
|
############################################################################
|
2018-05-30 02:14:55 +08:00
|
|
|
# tools/Directories.mk
|
2014-08-30 23:57:44 +08:00
|
|
|
#
|
2021-02-18 20:48:10 +08:00
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
# contributor license agreements. See the NOTICE file distributed with
|
|
|
|
# this work for additional information regarding copyright ownership. The
|
|
|
|
# ASF licenses this file to you 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
|
2014-08-30 23:57:44 +08:00
|
|
|
#
|
2021-02-18 20:48:10 +08:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2014-08-30 23:57:44 +08:00
|
|
|
#
|
2021-02-18 20:48:10 +08:00
|
|
|
# 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.
|
2014-08-30 23:57:44 +08:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2019-09-30 21:11:26 +08:00
|
|
|
# Lists of build directories.
|
2014-08-30 23:57:44 +08:00
|
|
|
#
|
2019-09-30 21:11:26 +08:00
|
|
|
# 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
|
2019-12-03 20:38:53 +08:00
|
|
|
# CLEANDIRS are the directories that the clean target will executed in.
|
|
|
|
# These are all directories that we know about.
|
|
|
|
# CCLEANDIRS are directories that the clean_context target will execute in.
|
|
|
|
# The clean_context target "undoes" the actions of the context target.
|
|
|
|
# Only directories known to require cleaning are included.
|
2019-09-30 21:11:26 +08:00
|
|
|
# KERNDEPDIRS are the directories in which we will build target dependencies.
|
|
|
|
# If NuttX and applications are built separately (CONFIG_BUILD_PROTECTED or
|
|
|
|
# CONFIG_BUILD_KERNEL), then this holds only the directories containing
|
|
|
|
# kernel files.
|
|
|
|
# USERDEPDIRS. If NuttX 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.
|
2014-08-30 23:57:44 +08:00
|
|
|
|
2019-09-30 21:11:26 +08:00
|
|
|
CLEANDIRS :=
|
2021-07-22 00:48:05 +08:00
|
|
|
CCLEANDIRS := boards $(APPDIR) graphics
|
2019-09-30 21:11:26 +08:00
|
|
|
KERNDEPDIRS :=
|
|
|
|
USERDEPDIRS :=
|
2014-08-30 23:57:44 +08:00
|
|
|
|
|
|
|
# In the protected build, the applications in the apps/ directory will be
|
2019-09-30 21:11:26 +08:00
|
|
|
# into the userspace; in the flat build, the applications will be built into
|
2014-08-30 23:57:44 +08:00
|
|
|
# the kernel space. But in the kernel build, the applications will not be
|
|
|
|
# built at all by this Makefile.
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_BUILD_PROTECTED),y)
|
2019-09-30 21:11:26 +08:00
|
|
|
USERDEPDIRS += $(APPDIR)
|
2020-04-30 03:21:23 +08:00
|
|
|
else ifneq ($(CONFIG_BUILD_KERNEL),y)
|
2019-09-30 21:11:26 +08:00
|
|
|
KERNDEPDIRS += $(APPDIR)
|
|
|
|
else
|
|
|
|
CLEANDIRS += $(APPDIR)
|
2014-08-30 23:57:44 +08:00
|
|
|
endif
|
|
|
|
|
2019-09-30 21:11:26 +08:00
|
|
|
KERNDEPDIRS += sched drivers boards $(ARCH_SRC)
|
|
|
|
KERNDEPDIRS += fs binfmt
|
2020-09-15 03:51:31 +08:00
|
|
|
|
|
|
|
ifeq ($(EXTERNALDIR),external)
|
|
|
|
KERNDEPDIRS += external
|
|
|
|
endif
|
|
|
|
|
2022-01-26 22:34:47 +08:00
|
|
|
CONTEXTDIRS = boards drivers fs $(APPDIR) $(ARCH_SRC)
|
2019-09-30 21:11:26 +08:00
|
|
|
CLEANDIRS += pass1
|
2014-08-30 23:57:44 +08:00
|
|
|
|
2019-09-30 21:11:26 +08:00
|
|
|
ifeq ($(CONFIG_BUILD_FLAT),y)
|
2014-08-30 23:57:44 +08:00
|
|
|
|
2019-09-30 21:11:26 +08:00
|
|
|
KERNDEPDIRS += libs$(DELIM)libc mm
|
2023-02-18 05:21:13 +08:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_LIBM_TOOLCHAIN)$(CONFIG_LIBM_NONE),)
|
|
|
|
KERNDEPDIRS += libs$(DELIM)libm
|
|
|
|
else
|
|
|
|
CLEANDIRS += libs$(DELIM)libm
|
|
|
|
endif
|
|
|
|
|
2014-08-30 23:57:44 +08:00
|
|
|
ifeq ($(CONFIG_HAVE_CXX),y)
|
2019-09-30 21:11:26 +08:00
|
|
|
KERNDEPDIRS += libs$(DELIM)libxx
|
2014-08-30 23:57:44 +08:00
|
|
|
else
|
2019-09-30 21:11:26 +08:00
|
|
|
CLEANDIRS += libs$(DELIM)libxx
|
2014-08-30 23:57:44 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
else
|
|
|
|
|
2019-09-30 21:11:26 +08:00
|
|
|
USERDEPDIRS += libs$(DELIM)libc mm
|
2023-02-18 05:21:13 +08:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_LIBM_TOOLCHAIN)$(CONFIG_LIBM_NONE),)
|
|
|
|
USERDEPDIRS += libs$(DELIM)libm
|
|
|
|
else
|
|
|
|
CLEANDIRS += libs$(DELIM)libm
|
|
|
|
endif
|
|
|
|
|
2014-08-30 23:57:44 +08:00
|
|
|
ifeq ($(CONFIG_HAVE_CXX),y)
|
2019-09-30 21:11:26 +08:00
|
|
|
USERDEPDIRS += libs$(DELIM)libxx
|
2014-08-30 23:57:44 +08:00
|
|
|
else
|
2019-09-30 21:11:26 +08:00
|
|
|
CLEANDIRS += libs$(DELIM)libxx
|
2014-08-30 23:57:44 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_LIB_SYSCALL),y)
|
|
|
|
CONTEXTDIRS += syscall
|
2019-09-30 21:11:26 +08:00
|
|
|
USERDEPDIRS += syscall
|
2014-08-30 23:57:44 +08:00
|
|
|
else
|
2020-07-22 21:21:42 +08:00
|
|
|
ifeq ($(CONFIG_SCHED_INSTRUMENTATION_SYSCALL),y)
|
|
|
|
CONTEXTDIRS += syscall
|
|
|
|
USERDEPDIRS += syscall
|
|
|
|
else
|
2019-09-30 21:11:26 +08:00
|
|
|
CLEANDIRS += syscall
|
2014-08-30 23:57:44 +08:00
|
|
|
endif
|
2020-07-22 21:21:42 +08:00
|
|
|
endif
|
2014-08-30 23:57:44 +08:00
|
|
|
|
2018-05-30 03:21:26 +08:00
|
|
|
CONTEXTDIRS += libs$(DELIM)libc
|
2023-02-18 05:21:13 +08:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_LIBM_TOOLCHAIN)$(CONFIG_LIBM_NONE),)
|
|
|
|
CONTEXTDIRS += libs$(DELIM)libm
|
|
|
|
endif
|
|
|
|
|
2021-08-19 01:31:06 +08:00
|
|
|
ifeq ($(CONFIG_HAVE_CXX),y)
|
|
|
|
CONTEXTDIRS += libs$(DELIM)libxx
|
|
|
|
endif
|
2016-07-01 06:20:43 +08:00
|
|
|
|
2014-08-30 23:57:44 +08:00
|
|
|
ifeq ($(CONFIG_NX),y)
|
2019-09-30 21:11:26 +08:00
|
|
|
KERNDEPDIRS += graphics
|
|
|
|
CONTEXTDIRS += graphics
|
|
|
|
else
|
|
|
|
CLEANDIRS += graphics
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_NXFONTS),y)
|
|
|
|
ifeq ($(CONFIG_BUILD_FLAT),y)
|
|
|
|
KERNDEPDIRS += libs$(DELIM)libnx
|
|
|
|
else
|
|
|
|
USERDEPDIRS += libs$(DELIM)libnx
|
|
|
|
endif
|
2018-05-30 03:21:26 +08:00
|
|
|
CONTEXTDIRS += libs$(DELIM)libnx
|
2014-08-30 23:57:44 +08:00
|
|
|
else
|
2019-09-30 21:11:26 +08:00
|
|
|
CLEANDIRS += libs$(DELIM)libnx
|
2014-08-30 23:57:44 +08:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_AUDIO),y)
|
2019-09-30 21:11:26 +08:00
|
|
|
KERNDEPDIRS += audio
|
2014-08-30 23:57:44 +08:00
|
|
|
else
|
2019-09-30 21:11:26 +08:00
|
|
|
CLEANDIRS += audio
|
2014-08-30 23:57:44 +08:00
|
|
|
endif
|
|
|
|
|
2019-07-08 06:40:24 +08:00
|
|
|
ifeq ($(CONFIG_VIDEO),y)
|
2019-09-30 21:11:26 +08:00
|
|
|
KERNDEPDIRS += video
|
2019-07-08 06:40:24 +08:00
|
|
|
else
|
2019-09-30 21:11:26 +08:00
|
|
|
CLEANDIRS += video
|
2019-07-08 06:40:24 +08:00
|
|
|
endif
|
|
|
|
|
2017-10-31 08:04:28 +08:00
|
|
|
ifeq ($(CONFIG_WIRELESS),y)
|
2019-09-30 21:11:26 +08:00
|
|
|
KERNDEPDIRS += wireless
|
2016-02-27 06:50:26 +08:00
|
|
|
else
|
2019-09-30 21:11:26 +08:00
|
|
|
CLEANDIRS += wireless
|
2016-02-27 06:50:26 +08:00
|
|
|
endif
|
|
|
|
|
2018-05-30 20:36:06 +08:00
|
|
|
ifeq ($(CONFIG_LIBDSP),y)
|
2019-09-30 21:11:26 +08:00
|
|
|
KERNDEPDIRS += libs$(DELIM)libdsp
|
2018-05-30 20:36:06 +08:00
|
|
|
else
|
2019-09-30 21:11:26 +08:00
|
|
|
CLEANDIRS += libs$(DELIM)libdsp
|
2018-05-30 20:36:06 +08:00
|
|
|
endif
|
|
|
|
|
2014-08-30 23:57:44 +08:00
|
|
|
# Add networking directories to KERNDEPDIRS and CLEANDIRS
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_NET),y)
|
|
|
|
KERNDEPDIRS += net
|
2019-09-30 21:11:26 +08:00
|
|
|
else
|
2014-08-30 23:57:44 +08:00
|
|
|
CLEANDIRS += net
|
2019-09-30 21:11:26 +08:00
|
|
|
endif
|
2014-08-30 23:57:44 +08:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_CRYPTO),y)
|
|
|
|
KERNDEPDIRS += crypto
|
2019-09-30 21:11:26 +08:00
|
|
|
else
|
2014-08-30 23:57:44 +08:00
|
|
|
CLEANDIRS += crypto
|
2019-09-30 21:11:26 +08:00
|
|
|
endif
|
|
|
|
|
2019-11-03 01:30:33 +08:00
|
|
|
ifeq ($(CONFIG_OPENAMP),y)
|
|
|
|
KERNDEPDIRS += openamp
|
2021-08-29 22:32:27 +08:00
|
|
|
CONTEXTDIRS += openamp
|
2019-11-03 01:30:33 +08:00
|
|
|
else
|
|
|
|
CLEANDIRS += openamp
|
|
|
|
endif
|
|
|
|
|
2021-03-08 17:21:23 +08:00
|
|
|
ifeq ($(CONFIG_MM_TLSF_MANAGER),y)
|
|
|
|
CONTEXTDIRS += mm
|
|
|
|
endif
|
|
|
|
|
2019-09-30 21:11:26 +08:00
|
|
|
CLEANDIRS += $(KERNDEPDIRS) $(USERDEPDIRS)
|