
# ------------------------------------------------------------------------------
# make files containing specialized file lists
# ------------------------------------------------------------------------------

FILES_SRC_GEN            =
FILES_SRC_HAL            =
FILES_SRC_CDD            =
FILES_SRC_SWC            =
FILES_SRC_MCAL           =
FILES_SRC_CUST           =

FILES_SRC_EXCLUDE        =

FILES_COMPILER_VARIANT_1 =
FILES_COMPILER_VARIANT_2 =
FILES_COMPILER_VARIANT_3 =
FILES_COMPILER_VARIANT_4 =

FILES_NOWARN_COMPILER    =
FILES_DEBUG              =
FILES_NOMISRA            =
FILES_COVER              =

ifneq ($(TYP_VAR),Test)
include $(ENV_MAKE_GEN)/Gen_050_Files.gmk
endif
include $(ENV_MAKE_HAL)/Hal_050_Files.gmk
include $(ENV_MAKE_CUST)/Cust_050_Files.gmk


FILES_SRC_ALL_FROM_MAKEFILES = $(FILES_SRC_GEN)                        \
                               $(FILES_SRC_HAL)                        \
                               $(FILES_SRC_CDD)                        \
                               $(FILES_SRC_SWC)                        \
                               $(FILES_SRC_MCAL)                       \
                               $(FILES_SRC_CUST)

# ------------------------------------------------------------------------------
# VPATH is required for the maker to find the C- and Assembler- Source files.
# Extract the directory/module names from the file list with the dir command
# and remove the duplicated directory names with the sort command.
# FILES_SRC_ALL_FROM_MAKEFILES is listed first to make sure that the source files
# in the project directories are compiled first.
# ------------------------------------------------------------------------------

VPATH     := $(sort $(dir $(FILES_SRC_ALL_FROM_MAKEFILES)) $(PATH_TMP_NAME_OBJ))

# ------------------------------------------------------------------------------
# file lists
# ------------------------------------------------------------------------------

FILES_TMP_OBJ   = $(addprefix $(PATH_TMP_NAME_OBJ)/,$(notdir $(addsuffix .$(SUFFIX_OBJ), $(FILES_SRC_ALL_FROM_MAKEFILES))))


# ------------------------------------------------------------------------------
# Include the dependency files for any build type other than rebuild.
# ------------------------------------------------------------------------------

ifneq ($(MAKECMDGOALS),rebuild)
  -include $(subst .$(SUFFIX_OBJ),.d,$(wordlist   1,  99, $(FILES_TMP_OBJ)))
  -include $(subst .$(SUFFIX_OBJ),.d,$(wordlist 100, 199, $(FILES_TMP_OBJ)))
  -include $(subst .$(SUFFIX_OBJ),.d,$(wordlist 200, 299, $(FILES_TMP_OBJ)))
  -include $(subst .$(SUFFIX_OBJ),.d,$(wordlist 300, 399, $(FILES_TMP_OBJ)))
  -include $(subst .$(SUFFIX_OBJ),.d,$(wordlist 400, 499, $(FILES_TMP_OBJ)))
  -include $(subst .$(SUFFIX_OBJ),.d,$(wordlist 500, 599, $(FILES_TMP_OBJ)))
  -include $(subst .$(SUFFIX_OBJ),.d,$(wordlist 600, 699, $(FILES_TMP_OBJ)))
  -include $(subst .$(SUFFIX_OBJ),.d,$(wordlist 700, 799, $(FILES_TMP_OBJ)))
  -include $(subst .$(SUFFIX_OBJ),.d,$(wordlist 800, 899, $(FILES_TMP_OBJ)))
  -include $(subst .$(SUFFIX_OBJ),.d,$(wordlist 900, 999, $(FILES_TMP_OBJ)))
endif
