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
|
|
|
#
|
2019-08-13 17:09:43 +02:00
|
|
|
# Copyright (C) 2007-2012, 2014, 2016-2019 Gregory Nutt. All rights
|
2017-11-18 17:19:34 +01:00
|
|
|
# reserved.
|
2014-08-30 17:57:44 +02:00
|
|
|
# Author: Gregory Nutt <gnutt@nuttx.org>
|
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
#
|
|
|
|
############################################################################
|
|
|
|
|
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
|
|
|
|
# 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 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 :=
|
|
|
|
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)
|
2014-08-30 17:57:44 +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
|
|
|
|
endif
|
|
|
|
|
2018-05-29 21:21:26 +02:00
|
|
|
ifeq ($(CONFIG_LIBCXX),y)
|
2018-09-25 22:46:02 +02:00
|
|
|
LIBXX=libcxx
|
2018-05-29 21:21:26 +02:00
|
|
|
else
|
|
|
|
LIBXX=libxx
|
|
|
|
endif
|
|
|
|
|
2019-09-30 15:11:26 +02:00
|
|
|
KERNDEPDIRS += sched drivers boards $(ARCH_SRC)
|
|
|
|
KERNDEPDIRS += fs binfmt
|
2019-08-05 14:04:14 +02:00
|
|
|
CONTEXTDIRS = boards $(APPDIR)
|
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
|
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
|
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
|
2019-09-30 15:11:26 +02:00
|
|
|
CLEANDIRS += syscall
|
2014-08-30 17:57:44 +02:00
|
|
|
endif
|
|
|
|
|
2016-07-01 00:20:43 +02:00
|
|
|
ifeq ($(CONFIG_LIB_ZONEINFO_ROMFS),y)
|
2018-05-29 21:21:26 +02:00
|
|
|
CONTEXTDIRS += libs$(DELIM)libc
|
2016-07-01 00:20:43 +02:00
|
|
|
endif
|
|
|
|
|
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
|
|
|
|
else
|
|
|
|
CLEANDIRS += openamp
|
|
|
|
endif
|
|
|
|
|
2019-09-30 15:11:26 +02:00
|
|
|
CLEANDIRS += $(KERNDEPDIRS) $(USERDEPDIRS)
|