# File: nandflash_component.mk
#       This file is component include make file of NANDFLASH library.
# List of variables set in this file and their purpose:
# <mod>_RELPATH        - This is the relative path of the module, typically from
#                        top-level directory of the package
# <mod>_PATH           - This is the absolute path of the module. It derives from
#                        absolute path of the top-level directory (set in env.mk)
#                        and relative path set above
# <mod>_INCLUDE        - This is the path that has interface header files of the
#                        module. This can be multiple directories (space separated)
# <mod>_PKG_LIST       - Names of the modules (and sub-modules) that are a part
#                        part of this module, including itself.
# <mod>_BOARD_DEPENDENCY - "yes": means the code for this module depends on
#                             platform and the compiled obj/lib has to be kept
#                             under <platform> directory
#                             "no" or "" or if this variable is not defined: means
#                             this module has no platform dependent code and hence
#                             the obj/libs are not kept under <platform> dir.
# <mod>_CORE_DEPENDENCY     - "yes": means the code for this module depends on
#                             core and the compiled obj/lib has to be kept
#                             under <core> directory
#                             "no" or "" or if this variable is not defined: means
#                             this module has no core dependent code and hence
#                             the obj/libs are not kept under <core> dir.
# <mod>_APP_STAGE_FILES     - List of source files that belongs to the module
#                             <mod>, but that needs to be compiled at application
#                             build stage (in the context of the app). This is
#                             primarily for link time configurations or if the
#                             source file is dependent on options/defines that are
#                             application dependent. This can be left blank or
#                             not defined at all, in which case, it means there
#                             no source files in the module <mod> that are required
#                             to be compiled in the application build stage.
#
ifeq ($(nandflash_component_make_include), )

nandflash_SOCLIST = tda2xx tda2ex tda3xx dra72x dra75x dra78x
nandflash_tda2xx_CORELIST = a15_0 ipu1_0
nandflash_tda2ex_CORELIST = a15_0 ipu1_0
nandflash_tda3xx_CORELIST = ipu1_0
nandflash_dra72x_CORELIST = a15_0 ipu1_0
nandflash_dra75x_CORELIST = a15_0 ipu1_0
nandflash_dra78x_CORELIST = ipu1_0
nandflash_BOARDLIST = tda2xx-evm tda2ex-evm tda3xx-evm evmDRA72x evmDRA75x evmDRA78x tda3xx-evm-radar tda2xx-evm-radar tda3xx-ar12-booster tda3xx-ar12-alps tda3xx-ar12-rvp tda3xx-alEagle4L

############################
# nandflash package
# List of components included under nandflash
# The components included here are built and will be part of nandflash
############################
nandflash_LIB_LIST = nandflash_lib

############################
# nandflash examples
# List of examples under nandflash (+= is used at each example definition)
# All the tests mentioned in list are built when test target is called
# List below all examples for allowed values
############################
nandflash_EXAMPLE_LIST = nand_flash_writer

#
# NANDFLASH Modules
#

# NANDFLASH LIB
nandflash_lib_COMP_LIST = nandflash_lib
nandflash_lib_RELPATH = ti/boot/sbl_auto/nandflash
nandflash_lib_PATH = $(PDK_NANDFLASH_COMP_PATH)
nandflash_lib_LIBNAME = nandflash_lib
nandflash_lib_LIBPATH = $(PDK_NANDFLASH_COMP_PATH)/lib
nandflash_lib_MAKEFILE = -fsrc/makefile
export nandflash_lib_MAKEFILE
export nandflash_lib_LIBNAME
export nandflash_lib_LIBPATH
nandflash_lib_BOARD_DEPENDENCY = no
nandflash_lib_CORE_DEPENDENCY = no
export nandflash_lib_COMP_LIST
export nandflash_lib_BOARD_DEPENDENCY
export nandflash_lib_CORE_DEPENDENCY
nandflash_lib_PKG_LIST = nandflash_lib
nandflash_lib_INCLUDE = $(nandflash_lib_PATH)
nandflash_lib_SOCLIST = $(nandflash_SOCLIST)
export nandflash_lib_SOCLIST
nandflash_lib_$(SOC)_CORELIST = $(nandflash_$(SOC)_CORELIST)
export nandflash_lib_$(SOC)_CORELIST

#
# NANDFLASH Examples
#

# nand_flash_writer example
nand_flash_writer_COMP_LIST = nand_flash_writer
nand_flash_writer_RELPATH = ti/boot/sbl_auto/nandflash/examples/nand_flash_writer/
nand_flash_writer_PATH = $(PDK_NANDFLASH_COMP_PATH)/examples/nand_flash_writer/
nand_flash_writer_BOARD_DEPENDENCY = yes
nand_flash_writer_CORE_DEPENDENCY = no
export nand_flash_writer_COMP_LIST
export nand_flash_writer_BOARD_DEPENDENCY
export nand_flash_writer_CORE_DEPENDENCY
nand_flash_writer_PKG_LIST = nand_flash_writer
nand_flash_writer_INCLUDE = $(nand_flash_writer_PATH)
nand_flash_writer_BOARDLIST = $(nandflash_BOARDLIST)
export nand_flash_writer_BOARDLIST
nand_flash_writer_$(SOC)_CORELIST = ipu1_0
export nand_flash_writer_$(SOC)_CORELIST

export nandflash_LIB_LIST
export nandflash_EXAMPLE_LIST

nandflash_component_make_include := 1
endif
