2014-08-30 17:57:44 +02:00
|
|
|
############################################################################
|
2018-05-29 20:14:55 +02:00
|
|
|
# tools/Directories.mk
|
2014-08-30 17:57:44 +02:00
|
|
|
#
|
2021-02-18 13:48:10 +01: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 17:57:44 +02:00
|
|
|
#
|
2021-02-18 13:48:10 +01:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2014-08-30 17:57:44 +02:00
|
|
|
#
|
2021-02-18 13:48:10 +01: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 17:57:44 +02:00
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
2019-09-30 15:11:26 +02:00
|
|
|
# Lists of build directories.
|
2014-08-30 17:57:44 +02:00
|
|
|
#
|
2019-09-30 15:11:26 +02: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 13:38:53 +01: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 15:11:26 +02: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 17:57:44 +02:00
|
|
|
|
2019-09-30 15:11:26 +02:00
|
|
|
CLEANDIRS :=
|
2021-07-21 18:48:05 +02:00
|
|
|
CCLEANDIRS := boards $(APPDIR) graphics
|
2019-09-30 15:11:26 +02:00
|
|
|
KERNDEPDIRS :=
|
|
|
|
USERDEPDIRS :=
|
2014-08-30 17:57:44 +02:00
|
|
|
|
|
|
|
# In the protected build, the applications in the apps/ directory will be
|
2019-09-30 15:11:26 +02:00
|
|
|
# into the userspace; in the flat build, the applications will be built into
|
2014-08-30 17:57:44 +02: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 15:11:26 +02:00
|
|
|
USERDEPDIRS += $(APPDIR)
|
2020-04-29 21:21:23 +02:00
|
|
|
else ifneq ($(CONFIG_BUILD_KERNEL),y)
|
2019-09-30 15:11:26 +02:00
|
|
|
KERNDEPDIRS += $(APPDIR)
|
|
|
|
else
|
|
|
|
CLEANDIRS += $(APPDIR)
|
2014-08-30 17:57:44 +02:00
|
|
|
endif
|
|
|
|
|
2019-09-30 15:11:26 +02:00
|
|
|
KERNDEPDIRS += sched drivers boards $(ARCH_SRC)
|
|
|
|
KERNDEPDIRS += fs binfmt
|
2020-09-14 21:51:31 +02:00
|
|
|
|
|
|
|
ifeq ($(EXTERNALDIR),external)
|
|
|
|
KERNDEPDIRS += external
|
|
|
|
endif
|
|
|
|
|
2022-01-26 15:34:47 +01:00
|
|
|
CONTEXTDIRS = boards drivers fs $(APPDIR) $(ARCH_SRC)
|
2019-09-30 15:11:26 +02:00
|
|
|
CLEANDIRS += pass1
|
2014-08-30 17:57:44 +02:00
|
|
|
|
2019-09-30 15:11:26 +02:00
|
|
|
ifeq ($(CONFIG_BUILD_FLAT),y)
|
2014-08-30 17:57:44 +02:00
|
|
|
|
2019-09-30 15:11:26 +02:00
|
|
|
KERNDEPDIRS += libs$(DELIM)libc mm
|
2023-02-17 22:21:13 +01:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_LIBM_TOOLCHAIN)$(CONFIG_LIBM_NONE),)
|
|
|
|
KERNDEPDIRS += libs$(DELIM)libm
|
|
|
|
else
|
|
|
|
CLEANDIRS += libs$(DELIM)libm
|
|
|
|
endif
|
|
|
|
|
2014-08-30 17:57:44 +02:00
|
|
|
ifeq ($(CONFIG_HAVE_CXX),y)
|
2019-09-30 15:11:26 +02:00
|
|
|
KERNDEPDIRS += libs$(DELIM)libxx
|
2014-08-30 17:57:44 +02:00
|
|
|
else
|
2019-09-30 15:11:26 +02:00
|
|
|
CLEANDIRS += libs$(DELIM)libxx
|
2014-08-30 17:57:44 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
else
|
|
|
|
|
2019-09-30 15:11:26 +02:00
|
|
|
USERDEPDIRS += libs$(DELIM)libc mm
|
2023-02-17 22:21:13 +01:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_LIBM_TOOLCHAIN)$(CONFIG_LIBM_NONE),)
|
|
|
|
USERDEPDIRS += libs$(DELIM)libm
|
|
|
|
else
|
|
|
|
CLEANDIRS += libs$(DELIM)libm
|
|
|
|
endif
|
|
|
|
|
2014-08-30 17:57:44 +02:00
|
|
|
ifeq ($(CONFIG_HAVE_CXX),y)
|
2019-09-30 15:11:26 +02:00
|
|
|
USERDEPDIRS += libs$(DELIM)libxx
|
2014-08-30 17:57:44 +02:00
|
|
|
else
|
2019-09-30 15:11:26 +02:00
|
|
|
CLEANDIRS += libs$(DELIM)libxx
|
2014-08-30 17:57:44 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_LIB_SYSCALL),y)
|
|
|
|
CONTEXTDIRS += syscall
|
2019-09-30 15:11:26 +02:00
|
|
|
USERDEPDIRS += syscall
|
2014-08-30 17:57:44 +02:00
|
|
|
else
|
2020-07-22 15:21:42 +02:00
|
|
|
ifeq ($(CONFIG_SCHED_INSTRUMENTATION_SYSCALL),y)
|
|
|
|
CONTEXTDIRS += syscall
|
|
|
|
USERDEPDIRS += syscall
|
|
|
|
else
|
2019-09-30 15:11:26 +02:00
|
|
|
CLEANDIRS += syscall
|
2014-08-30 17:57:44 +02:00
|
|
|
endif
|
2020-07-22 15:21:42 +02:00
|
|
|
endif
|
2014-08-30 17:57:44 +02:00
|
|
|
|
2018-05-29 21:21:26 +02:00
|
|
|
CONTEXTDIRS += libs$(DELIM)libc
|
2023-02-17 22:21:13 +01:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_LIBM_TOOLCHAIN)$(CONFIG_LIBM_NONE),)
|
|
|
|
CONTEXTDIRS += libs$(DELIM)libm
|
|
|
|
endif
|
|
|
|
|
2021-08-18 19:31:06 +02:00
|
|
|
ifeq ($(CONFIG_HAVE_CXX),y)
|
|
|
|
CONTEXTDIRS += libs$(DELIM)libxx
|
|
|
|
endif
|
2016-07-01 00:20:43 +02:00
|
|
|
|
2014-08-30 17:57:44 +02:00
|
|
|
ifeq ($(CONFIG_NX),y)
|
2019-09-30 15:11:26 +02: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-29 21:21:26 +02:00
|
|
|
CONTEXTDIRS += libs$(DELIM)libnx
|
2014-08-30 17:57:44 +02:00
|
|
|
else
|
2019-09-30 15:11:26 +02:00
|
|
|
CLEANDIRS += libs$(DELIM)libnx
|
2014-08-30 17:57:44 +02:00
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_AUDIO),y)
|
2019-09-30 15:11:26 +02:00
|
|
|
KERNDEPDIRS += audio
|
2014-08-30 17:57:44 +02:00
|
|
|
else
|
2019-09-30 15:11:26 +02:00
|
|
|
CLEANDIRS += audio
|
2014-08-30 17:57:44 +02:00
|
|
|
endif
|
|
|
|
|
2019-07-08 00:40:24 +02:00
|
|
|
ifeq ($(CONFIG_VIDEO),y)
|
2019-09-30 15:11:26 +02:00
|
|
|
KERNDEPDIRS += video
|
2019-07-08 00:40:24 +02:00
|
|
|
else
|
2019-09-30 15:11:26 +02:00
|
|
|
CLEANDIRS += video
|
2019-07-08 00:40:24 +02:00
|
|
|
endif
|
|
|
|
|
2017-10-31 01:04:28 +01:00
|
|
|
ifeq ($(CONFIG_WIRELESS),y)
|
2019-09-30 15:11:26 +02:00
|
|
|
KERNDEPDIRS += wireless
|
2016-02-26 23:50:26 +01:00
|
|
|
else
|
2019-09-30 15:11:26 +02:00
|
|
|
CLEANDIRS += wireless
|
2016-02-26 23:50:26 +01:00
|
|
|
endif
|
|
|
|
|
2018-05-30 14:36:06 +02:00
|
|
|
ifeq ($(CONFIG_LIBDSP),y)
|
2019-09-30 15:11:26 +02:00
|
|
|
KERNDEPDIRS += libs$(DELIM)libdsp
|
2018-05-30 14:36:06 +02:00
|
|
|
else
|
2019-09-30 15:11:26 +02:00
|
|
|
CLEANDIRS += libs$(DELIM)libdsp
|
2018-05-30 14:36:06 +02:00
|
|
|
endif
|
|
|
|
|
2014-08-30 17:57:44 +02:00
|
|
|
# Add networking directories to KERNDEPDIRS and CLEANDIRS
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_NET),y)
|
|
|
|
KERNDEPDIRS += net
|
2019-09-30 15:11:26 +02:00
|
|
|
else
|
2014-08-30 17:57:44 +02:00
|
|
|
CLEANDIRS += net
|
2019-09-30 15:11:26 +02:00
|
|
|
endif
|
2014-08-30 17:57:44 +02:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_CRYPTO),y)
|
|
|
|
KERNDEPDIRS += crypto
|
2019-09-30 15:11:26 +02:00
|
|
|
else
|
2014-08-30 17:57:44 +02:00
|
|
|
CLEANDIRS += crypto
|
2019-09-30 15:11:26 +02:00
|
|
|
endif
|
|
|
|
|
2019-11-02 18:30:33 +01:00
|
|
|
ifeq ($(CONFIG_OPENAMP),y)
|
|
|
|
KERNDEPDIRS += openamp
|
2021-08-29 16:32:27 +02:00
|
|
|
CONTEXTDIRS += openamp
|
2019-11-02 18:30:33 +01:00
|
|
|
else
|
|
|
|
CLEANDIRS += openamp
|
|
|
|
endif
|
|
|
|
|
2021-03-08 10:21:23 +01:00
|
|
|
ifeq ($(CONFIG_MM_TLSF_MANAGER),y)
|
|
|
|
CONTEXTDIRS += mm
|
|
|
|
endif
|
|
|
|
|
2019-09-30 15:11:26 +02:00
|
|
|
CLEANDIRS += $(KERNDEPDIRS) $(USERDEPDIRS)
|