blob: 2c65f53d94c0e051e30345be21410790c1d2b740 [file] [log] [blame]
#
# Copyright Statement:
# --------------------
# This software is protected by Copyright and the information contained
# herein is confidential. The software may not be copied and the information
# contained herein may not be used or disclosed except with the written
# permission of MediaTek Inc. (C) 2005
#
# BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
# THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
# RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
# AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
# NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
# SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
# SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
# THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
# NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
# SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
#
# BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
# LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
# AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
# OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
# MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE.
#
# THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
# WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
# LAWS PRINCIPLES. ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
# RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
# THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
#
#
# *************************************************************************
#
# MediaTek Inc GSM/GPRS Wireless Communicatin Project
# Build/Make Development Tools
#
# Author Date Description
# Sherman Wang 2004/04/29 Create version 1.0
#
# *************************************************************************
# COMP.MAK - Component build script
#
# DISCUSSION:
#
# This file is build script for component modules, and contains C source
# files (.c), and Assembly source files(.s).
#
# USAGE:
#
# IMPORTANT NOTES:
#
# *************************************************************************
#
# $Revision:$
# $Modtime:$
# $Log:$
#
# 10 14 2020 chi-chun.lu
# [MOLY00538735] [MakeFile][Modify Makefile Rules] incremental build enhancement
#
# .
#
# 09 09 2020 chi-chun.lu
# [MOLY00538735] [MakeFile][Modify Makefile Rules] incremental build enhancement
#
# (EWSP0000153449).
#
# 09 08 2020 chi-chun.lu
# [MOLY00566669] [MakeFile] [Modify Common Makefile Rules] add deterministic for ci service
# .
#
# 07 06 2020 chi-chun.lu
# [MOLY00538735] [MakeFile][Modify Makefile Rules] incremental build enhancement
#
# .
#
# 06 30 2020 chi-chun.lu
# [MOLY00538735] [MakeFile][Modify Makefile Rules] incremental build enhancement
#
# .
#
# 05 22 2020 chi-chun.lu
# [MOLY00525991] [MakeFile] [VMOLY] [Modify Makefile Rules] support smart new when verno change
# .
#
# 12 25 2019 chi-chun.lu
# [MOLY00467020] [MakeFile] [VMOLY] [Modify Makefile Rules] fix ccache potential problem
# .
#
# 12 09 2019 chi-chun.lu
# [MOLY00464738] [MakeFile] [VMOLY] [Modify Makefile Rules] smart new enhancement
#
# .
#
# 11 27 2019 chi-chun.lu
# [MOLY00461604] [MakeFile] [VMOLY] [Modify Makefile Rules] ccache enhancement
#
# .
#
# 11 15 2019 chi-chun.lu
# [MOLY00459055] [MakeFile] [VMOLY] [Modify Makefile Rules] fix potential smart new build flow problem
# .
#
# 11 11 2019 yuri.huang
# [MOLY00458426] [MakeFile] [VUMOLY] [Modify Makefile Rules] Modify build flow
#
# .
#
# 11 08 2019 chi-chun.lu
# [MOLY00456042] [MakeFile] [VMOLY] [Modify Makefile Rules] fix update_dsp flow
# .
#
# 11 05 2019 ray.lin-wang
# [MOLY00456042] [MakeFile] [VMOLY] [Modify Makefile Rules] fix update_dsp flow - comp.amk via dep
#
# .
#
# 11 04 2019 ray.lin-wang
# [MOLY00456042] [MakeFile] [VMOLY] [Modify Makefile Rules] fix update_dsp flow.
#
# 10 22 2019 ray.lin-wang
# [MOLY00452976] [MakeFile] [VMOLY] [Modify Makefile Rules] MoDIS/UESim support smart new
#
# .
#
# 10 09 2019 yuri.huang
# [MOLY00446346] [MakeFile] [UMOLYE] [Modify Makefile Rules] Modify build flow
# (Clean PCISB).
#
# 09 10 2019 yuri.huang
# [MOLY00439079] [MakeFile] [VMOLY] [Modify Makefile Rules] Remove Legacy RTOS references from access restricted make files - Part 2
# (Lari Manninen).
#
# 06 03 2019 yuri.huang
# [MOLY00381361] [MakeFile] [UMOLYE] [Modify Makefile Rules] Phase out auto_header.h mechanism
#
# .
#
# 05 10 2019 chi-chun.lu
# [MOLY00405345] [MakeFile] [UMOLYE] [Modify Makefile Rules] fix remake problem
#
# .
#
# 05 10 2019 chi-chun.lu
# [MOLY00405345] [MakeFile] [UMOLYE] [Modify Makefile Rules] fix remake problem
#
# .
#
# 04 16 2019 ray.lin-wang
# [MOLY00399667] [MakeFile] [VMOLY] [Modify Makefile Rules] MoDIS/UESim support generating dep and pcibt check
# .
#
# 04 01 2019 yuri.huang
# [MOLY00395916] [MakeFile] [UMOLYE] [Modify Makefile Rules] MPD 4g local build
#
# .
#
# 03 20 2019 gerry.liao
# [MOLY00392677] [6297] MERTOS phase-in
# .
#
# 12 26 2018 chi-chun.lu
# [MOLY00372655] [MakeFile] [UMOLYE] [Modify Makefile Rules] smart new enhancement
#
# .
#
# 10 16 2018 ray.lin-wang
# [MOLY00352266] [UESim on Linux] UESim built by Clang toolchain on Linux
# support -llvm-coverage (ShihYu Wang).
#
# 10 03 2018 chi-chun.lu
# [MOLY00356821] [MakeFile] [UMOLYE] [Modify Makefile Rules] refine build flow
#
# .
#
# 10 02 2018 chi-chun.lu
# [MOLY00355922] [MakeFile] [UMOLYE] [Modify Makefile Rules] fix smart new problem
#
# .
#
# 09 07 2018 chi-chun.lu
# [MOLY00350930] [MakeFile] [UMOLYE] [Modify Makefile Rules] check MPD folder path implement(temp)
#
# .
#
# 09 07 2018 chi-chun.lu
# [MOLY00350930] [MakeFile] [UMOLYE] [Modify Makefile Rules] check MPD folder path implement(temp)
#
# .
#
# 08 10 2018 ray.lin-wang
# [MOLY00344924] [VMOLY][BuildEnv] merge back from Gen97 Dev to VMOLY
# build flow makefile.
#
# 08 02 2018 ray.lin-wang
# [MOLY00342318] [MoDIS on Linux] MoDIS built by Clang toolchain on Linux
# 07 26 2018 chi-chun.lu
# [MOLY00342237] [MakeFile] [UMOLYE] [Modify Makefile Rules] fix debug mode of module makefile
#
# .
#
# *************************************************************************
# *************************************************************************
# Common macro definitions
# *************************************************************************
#$(call Upper,$(1)) ...... reference $(1) in upper-case letters
Upper = $(subst z,Z,$(subst y,Y,$(subst x,X,$(subst w,W,$(subst v,V,$(subst u,U,$(subst t,T,$(subst s,S,$(subst r,R,$(subst q,Q,$(subst p,P,$(subst o,O,$(subst n,N,$(subst m,M,$(subst l,L,$(subst k,K,$(subst j,J,$(subst i,I,$(subst h,H,$(subst g,G,$(subst f,F,$(subst e,E,$(subst d,D,$(subst c,C,$(subst b,B,$(subst a,A,$(1)))))))))))))))))))))))))))
Lower = $(subst Z,z,$(subst Y,y,$(subst X,x,$(subst W,w,$(subst V,v,$(subst U,u,$(subst T,t,$(subst S,s,$(subst R,r,$(subst Q,q,$(subst P,p,$(subst O,o,$(subst N,n,$(subst M,m,$(subst L,l,$(subst K,k,$(subst J,j,$(subst I,i,$(subst H,h,$(subst G,g,$(subst F,f,$(subst E,e,$(subst D,d,$(subst C,c,$(subst B,b,$(subst A,a,$(1)))))))))))))))))))))))))))
CUSTOM_FLD_MAPPING = $(if $($(subst /,_,$(patsubst %/,%,$(subst //,/,$(subst \,/,$(call lc, $(1))))))), \
$($(subst /,_,$(patsubst %/,%,$(subst //,/,$(subst \,/,$(call lc, $(1))))))),\
$(if $(wildcard $(subst //,/,$(subst \,/,$(call lc, $(1))))/$(BOARD_VER)/$(strip $(CUSTOM_FLAVOR))),\
$(subst //,/,$(subst \,/,$(call lc, $(1))))/$(BOARD_VER)/$(strip $(CUSTOM_FLAVOR)),\
$(wildcard $(subst //,/,$(subst \,/,$(call lc, $(1))))/$(BOARD_VER)/DEFAULT)))
AUTO_MERGE_FILE_CHECK = $(if $(shell $(LIST_DIR) "$(call CUSTOM_FLD_MAPPING,$(1))/$(2)" 2>$(DEV_NUL)), $(call CUSTOM_FLD_MAPPING,$(1))/$(2), \
$(if $(shell $(LIST_DIR) "$(1)/_Default_BB/$(strip $(PLATFORM))/$(2)" 2>$(DEV_NUL)), $(1)/_Default_BB/$(strip $(PLATFORM))/$(2),))
# *************************************************************************
# Project Variables
# *************************************************************************
include make/common/cmd_cfg.mak
include ./tools/GMSL/gmsl
include $(strip $(TMPDIR))/~compbld.tmp # Temporary build script created by build.mak
include $(strip $(PROJECT_MAKEFILE))
include make/common/buildconfig.mak
-include $(strip $(TARGDIR))/MMI_DRV_DEFS.mak
ifeq ($(filter $(strip $(COMPONENT)),$(COMPLIST)),)
NO_PCIBT := TRUE
endif
ifeq ($(strip $(COMPILER)),GCC)
ADEFTrans = $(strip -defsym $(1)=$(strip $(2)))
endif
NEED_CHECK_DEPEND_LIST :=
MODULE_DEFS := $(DEFINES) $(DRV_DEFS)
ifeq ($(strip $(MODIS_CONFIG)),TRUE)
MODULE_DEFS := $(filter-out __MTK_TARGET__,$(MODULE_DEFS))
include $(strip $(MAKE_COMMON))/modisconfig.mak
NEED_CHECK_DEPEND_LIST += $(strip $(MAKE_COMMON))/modisconfig.mak
endif
include $(strip $(TMPDIR))/~categorymapping.mak
MODULE_MAKEFILE := make/$($(call Upper,$(strip $(COMPONENT)))_MODULE_CATEGORY)/$(call Lower,$(strip $(COMPONENT))).mak
include $(MODULE_MAKEFILE)
NEED_CHECK_DEPEND_LIST += $(MODULE_MAKEFILE)
CATEGORY_CONFIG_MAKEFILE := make/module/$($(call Upper,$(strip $(COMPONENT)))_CATEGORY)/$($(call Upper,$(strip $(COMPONENT)))_CATEGORY)_config.mak
ifneq ($(strip $(NOT_USE_CATEGORY_INCLUDE)),TRUE)
include $(CATEGORY_CONFIG_MAKEFILE)
NEED_CHECK_DEPEND_LIST += $(CATEGORY_CONFIG_MAKEFILE)
endif
# *************************************************************************
# Set SUFFIXES
# *************************************************************************
.SUFFIXES:
.SUFFIXES: .obj .c .S .s .cpp .arm .ltp .det
# *************************************************************************
# Set PHONY
# *************************************************************************
.PHONY : update_lib update_dep
# *************************************************************************
# Set Shell
# *************************************************************************
#SHELL = $(ComSpec)
# *************************************************************************
# Construct $(COMPONENT) specific varible
# *************************************************************************
TARGLIB = $(subst \,/,$(strip $(COMPLIBDIR)))/lib$(strip $(COMPONENT)).a
COMPOBJS_DIR = $(subst \,/,$(OBJSDIR))/$(strip $(COMPONENT))
OBJ_ARCHIVE = $(OBJSDIR)/$(COMPONENT)/$(strip $(COMPONENT)).via
OBJ_ARCHIVE_SORT = $(OBJSDIR)/$(COMPONENT)/$(strip $(COMPONENT))_sort.via
TARGDEP = $(subst \,/,$(RULESDIR))/$(strip $(COMPONENT)).dep
COMPDETS_DIR = $(subst \,/,$(RULESDIR))/$(strip $(COMPONENT))
COMPVIA_DIR = $(TARGDIR)/via
TARGDEP_LIST :=
ifneq ($(strip $(MODIS_CONFIG)),TRUE)
MODULE_FOLDER = $(TARGDIR)/module
else
MODULE_FOLDER = $(strip $(BUILDDIR))/$(strip $(PROJECT_NAME))/$(strip $(FLAVOR))/$(strip $(MODIS_UESIM))/_BUILD_MODULE
endif
ifdef $($(COMPONENT))
COMPONENT_FOLDER = $(MODULE_FOLDER)/$(strip $($(call Lower,$(COMPONENT))))/$(call Lower,$(strip $(COMPONENT)))
else
COMPONENT_FOLDER = $(MODULE_FOLDER)/$(call Lower,$(strip $(COMPONENT)))
endif
COMPONENT_LOG = $(COMPONENT_FOLDER)/$(call Lower,$(strip $(COMPONENT)))
ifeq ($(strip $(MODIS_CONFIG)),TRUE)
COMPLOGDIR := $(MODISLOGDIR)
TARGLIB := $(MODISPROJDIR)/$(strip $(COMPONENT))/$(strip $(MODIS_MODE))/$(strip $(COMPONENT)).lib
COMPOBJS_DIR := $(MODISPROJDIR)/$(strip $(COMPONENT))/$(strip $(MODIS_MODE))
OBJ_ARCHIVE := $(COMPONENT_FOLDER)/$(call Lower,$(strip $(COMPONENT)))_lib.via
OBJ_ARCHIVE_SORT := $(COMPONENT_FOLDER)/$(call Lower,$(strip $(COMPONENT)))_lib_sort.via
TARGDEP := $(MODIS_RULESDIR)/$(call Lower,$(strip $(COMPONENT))).dep
COMPDETS_DIR := $(MODIS_RULESDIR)/$(call Lower,$(strip $(COMPONENT)))
COMPVIA_DIR := $(COMPONENT_FOLDER)
ifeq ($(strip $(MODIS_COMPILER)),MINGW)
ifeq ($(strip $(MODIS_MODE)),Debug)
DEBUG_MODULES := ALL
else ifeq ($(strip $(MODIS_MODE)),Release)
NON_DEBUG_MODULES := ALL
endif
endif
endif
# *************************************************************************
# Configure debug symbol compiler arguments
# *************************************************************************
ifndef CUSTOM_DEBUG_MODULES
CUSTOM_DEBUG_MODULES =
endif
ifndef CUSTOM_NON_DEBUG_MODULES
CUSTOM_NON_DEBUG_MODULES =
endif
ifneq ($(filter ALL,$(call Upper,$(CUSTOM_DEBUG_MODULES))),)
ifneq ($(strip $(MODIS_CONFIG)),TRUE)
ifeq ($(strip $(COMPILER)),GCC)
CFLAGS += $(DWARF_FLAGS)
CPLUSFLAGS += $(DWARF_FLAGS)
endif
endif
else
ifneq ($(filter $(call Upper,$(COMPONENT)),$(call Upper,$(CUSTOM_DEBUG_MODULES))),)
ifneq ($(strip $(MODIS_CONFIG)),TRUE)
ifeq ($(strip $(COMPILER)),GCC)
CFLAGS += $(DWARF_FLAGS)
CPLUSFLAGS += $(DWARF_FLAGS)
endif
endif
endif
endif
ifeq ($(filter $(call Upper,$(COMPONENT)),$(call Upper,$(DSP_ASE_MODULES))),)
ifneq ($(filter -mdsp -mdspr2,$(CFLAGS)),)
$(error Error: Cannot use -mdsp -mdspr2 in module makefile, please check !!)
endif
endif
ifneq ($(filter $(call Upper,$(COMPONENT)),$(call Upper,$(CUSTOM_NON_DEBUG_MODULES))),)
CFLAGS := $(filter-out -g -gtp -gdwarf-% -g1 -g2 -g3,$(strip $(CFLAGS)))
CPLUSFLAGS := $(filter-out -g -gtp -gdwarf-% -g1 -g2 -g3,$(strip $(CPLUSFLAGS)))
endif
ifneq ($(filter $(call Upper,$(COMPONENT)),$(call Upper,$(CUSTOM_NON_DEBUG_MODULES))),)
$(info Module $(COMPONENT) is in NON_DEBUG mode)
else
ifneq ($(filter ALL,$(call Upper,$(CUSTOM_DEBUG_MODULES))),)
$(info Module $(COMPONENT) is in DEBUG mode)
else
ifneq ($(filter $(call Upper,$(COMPONENT)),$(call Upper,$(CUSTOM_DEBUG_MODULES))),)
$(info Module $(COMPONENT) is in DEBUG mode)
else
$(info Module $(COMPONENT) is in DEFAULT mode)
endif
endif
endif
# *************************************************************************
# Construct the list of object dependencies
# *************************************************************************
# THUMB + Assembly
SRCLIST0 := $(sort $(SRC_LIST) $(filter-out %.c %.C %.cpp,$(SRC_LIST_ARM)))
# ARM
SRCLIST5 := $(sort $(filter %.c %.C %.cpp,$(SRC_LIST_ARM)))
# BOTH
SRC_LIST := $(SRCLIST0) $(SRCLIST5)
ifdef SRC_RULE_FLAG32
# SRC_RULE_FLAG32 means the asm file should be compiled by armasm using -32 flag
SRCLIST9 := $(foreach file,$(SRCLIST0),$(if $(filter $(notdir $(call Upper,$(file))) $(call Upper,$(file)),$(call Upper,$(SRC_RULE_FLAG32))),$(file),))
SRCLIST0 := $(foreach file,$(SRCLIST0),$(if $(filter $(notdir $(call Upper,$(file))) $(call Upper,$(file)),$(call Upper,$(SRC_RULE_FLAG32))),,$(file)))
endif
ifdef SRC_RULE_PREPROCESS
# SRC_RULE_PREPROCESS means the asm file needs to be preprocessed by armcc -E and then armasm
SRCLIST8 := $(foreach file,$(SRCLIST0),$(if $(filter $(notdir $(call Upper,$(file))) $(call Upper,$(file)),$(call Upper,$(SRC_RULE_PREPROCESS))),$(file),))
SRCLIST0 := $(foreach file,$(SRCLIST0),$(if $(filter $(notdir $(call Upper,$(file))) $(call Upper,$(file)),$(call Upper,$(SRC_RULE_PREPROCESS))),,$(file)))
endif
ifeq ($(filter __L1_KW_SCAN__,$(DEFINES)),)
ifdef SRC_RULE_AUTOTCM
# SRC_RULE_AUTOTCM means the c file needs to be preprocessed by armcc -E and then auto tcm and then compiled by armcc -c
ifeq ($(strip $(SRC_RULE_AUTOTCM)),ALL)
SRCLIST1 := $(filter %.c %.C %.cpp,$(SRCLIST0))
SRCLIST0 := $(filter-out %.c %.C %.cpp,$(SRCLIST0))
SRCLIST6 := $(filter %.c %.C %.cpp,$(SRCLIST5))
SRCLIST5 := $(filter-out %.c %.C %.cpp,$(SRCLIST5))
else
SRCLIST1 := $(foreach file,$(SRCLIST0),$(if $(filter $(notdir $(call Upper,$(file))) $(call Upper,$(file)),$(call Upper,$(SRC_RULE_AUTOTCM))),$(file),))
SRCLIST0 := $(foreach file,$(SRCLIST0),$(if $(filter $(notdir $(call Upper,$(file))) $(call Upper,$(file)),$(call Upper,$(SRC_RULE_AUTOTCM))),,$(file)))
SRCLIST6 := $(foreach file,$(SRCLIST5),$(if $(filter $(notdir $(call Upper,$(file))) $(call Upper,$(file)),$(call Upper,$(SRC_RULE_AUTOTCM))),$(file),))
SRCLIST5 := $(foreach file,$(SRCLIST5),$(if $(filter $(notdir $(call Upper,$(file))) $(call Upper,$(file)),$(call Upper,$(SRC_RULE_AUTOTCM))),,$(file)))
endif
endif
ifdef SRC_RULE_AUTOAMMS_DRDI
ifeq ($(strip $(SRC_RULE_AUTOAMMS_DRDI)),ALL)
SRCLIST_AMMS_DRDI := $(filter %.c %.C %.cpp,$(SRC_LIST))
SRCLIST0 := $(filter-out %.c %.C %.cpp,$(SRCLIST0))
SRCLIST5 := $(filter-out %.c %.C %.cpp,$(SRCLIST5))
else
SRCLIST_AMMS_DRDI := $(foreach file,$(SRC_LIST),$(if $(filter $(notdir $(call Upper,$(file))) $(call Upper,$(file)),$(call Upper,$(SRC_RULE_AUTOAMMS_DRDI))),$(file),))
SRCLIST0 := $(foreach file,$(SRCLIST0),$(if $(filter $(notdir $(call Upper,$(file))) $(call Upper,$(file)),$(call Upper,$(SRC_RULE_AUTOAMMS_DRDI))),,$(file)))
SRCLIST5 := $(foreach file,$(SRCLIST5),$(if $(filter $(notdir $(call Upper,$(file))) $(call Upper,$(file)),$(call Upper,$(SRC_RULE_AUTOAMMS_DRDI))),,$(file)))
endif
endif
endif
CSRCS := $(filter %.c %.C %.cpp, $(SRCLIST0))
CSRCS1 := $(filter %.c %.C %.cpp, $(SRCLIST1))
CSRCS5 := $(filter %.c %.C %.cpp, $(SRCLIST5))
CSRCS6 := $(filter %.c %.C %.cpp, $(SRCLIST6))
ASRCS := $(filter %.s %.S %.arm, $(SRCLIST0))
ASRCS1 := $(filter %.s %.S %.arm, $(SRCLIST9))
ASRCS2 := $(filter %.s %.S %.arm, $(SRCLIST8))
CSRCS_AMMS_DRDI := $(filter %.c %.C %.cpp, $(SRCLIST_AMMS_DRDI))
INC_DIR += $(CATEGORY_INCDIRS)
INCDIRS := $(INC_DIR) $(INCDIRS)
INCDIRS := $(call uniq,$(INCDIRS))
#CATEGORY_DEFS is from $category_config.mak
DEFINES += $(CATEGORY_DEFS)
#COMP_DEFS is from $module.mak
DEFINES += $(COMP_DEFS)
ifeq ($(strip $(MODIS_CONFIG)),TRUE)
ifdef MODIS_DIS_INC_PATH
INCDIRS := $(filter-out $(MODIS_DIS_INC_PATH),$(INCDIRS))
endif
ifdef MODIS_DIS_OPTION
DEFINES := $(filter-out $(MODIS_DIS_OPTION),$(DEFINES))
endif
endif
CINCDIRS = $(foreach inc, $(subst \,/,$(INCDIRS)),-I$(inc))
CDEFS = $(foreach def, $(DEFINES),-D$(def))
A_CDEFS = $(foreach def, $(strip $(DEFINES)),$(if $(findstring =,$(def)),-D$(def),-D$(def)=$(def)))
#*************************************************************************
# ccache excluding files
#*************************************************************************
CCACHE_EXCLUDE_FILE :=
#*************************************************************************
# folder path check
#*************************************************************************
ifneq ($(strip $(NO_PCIBT)),TRUE)
-include $(strip $(TMPDIR))/~buildinfo.tmp
-include $(strip $(MAKE_COMMON))/comp_pcibt.mak
endif
#check if non-4g module use the 4g src
ifeq ($(filter $(COMPONENT),$(FOURG_COMP) $(FIVEG_COMP)),)
ifneq ($(filter protocol/lte_sec% l1/lte_sec% protocol/lte_sec%, $(SRC_LIST) $(INC_DIR)),)
$(error Error: Can not use lte_sec in $(COMPONENT) module SRC_LIST/INC_DIR, please check !!)
endif
endif
ifneq ($(filter $(COMPONENT),$(FOURG_COMP) $(FIVEG_COMP)),)
CHK_LTE_COMP = TRUE
endif
# *************************************************************************
# Set View Path
# *************************************************************************
vpath
vpath %.obj $(COMPOBJS_DIR)
vpath %.det $(COMPDETS_DIR)
# XXX!!! To use predefine for assembler is a little difficult and
# usually can be replaced with C sources.
ADEFS = $(foreach def, $(COMP_DEFS),$(call ADEFTrans,$(def), TRUE))
ADEFS += $(foreach def, $(strip $(COM_DEFS_FOR_$(strip $(PLATFORM)))),$(call ADEFTrans,$(def), TRUE))
ifeq ($(strip $(COMPILER)),GCC)
ADEFS += --defsym __SRS_CPS_OPTIMIZE__=1
endif
ifneq ($(filter $(strip $(PLATFORM)),$(SV5_PLATFORM)),)
ADEFS += $(call ADEFTrans,__SV5_ENABLED__, TRUE)
endif
ifneq ($(filter __KAL_STACK_ISOLATION__,$(strip $(DEFINES))),)
ADEFS += $(call ADEFTrans,__KAL_STACK_ISOLATION__, TRUE)
endif
ifneq ($(filter __KAL_STACK_EXTENSIBLE__,$(strip $(DEFINES))),)
ADEFS += $(call ADEFTrans,__KAL_STACK_EXTENSIBLE__, TRUE)
endif
ifneq ($(filter __EVENT_BASED_TIMER__,$(strip $(DEFINES))),)
ADEFS += $(call ADEFTrans,__EVENT_BASED_TIMER__, TRUE)
endif
ifeq ($(PRODUCTION_RELEASE),TRUE)
ADEFS += $(call ADEFTrans,__PRODUCTION_RELEASE__, TRUE)
endif
ifeq ($(strip $(RTOS)),MERTOS)
ADEFS += $(call ADEFTrans,KAL_ON_MERTOS, TRUE)
endif
ifeq ($(strip $(CHIP_VERSION_CHECK)),TRUE)
ADEFS += $(call ADEFTrans,__CHIP_VERSION_CHECK__, TRUE)
endif
ifdef GADGET_SUPPORT
ifneq ($(strip $(GADGET_SUPPORT)),NONE)
ADEFS += $(call ADEFTrans,__GADGET_SUPPORT__, TRUE)
endif
endif
ifeq ($(strip $(KEYPAD_DEBUG_TRACE)),TRUE)
ADEFS += $(call ADEFTrans,__KEYPAD_DEBUG_TRACE__, TRUE)
endif
ifneq ($(filter $(strip $(PLATFORM)),$(ARM9_PLATFORM)),)
ADEFS += $(call ADEFTrans,ARM9_MMU, TRUE)
endif
ifneq ($(filter $(strip $(PLATFORM)),$(ARM11_PLATFORM)),)
ADEFS += $(call ADEFTrans,$(strip $(PLATFORM)), TRUE)
ADEFS += $(call ADEFTrans,ARM11_MMU, TRUE)
ADEFS += $(call ADEFTrans,__ARM1176__, TRUE)
endif
ifneq ($(filter $(strip $(PLATFORM)),$(CR4_PLATFORM)),)
ADEFS += $(call ADEFTrans,$(strip $(PLATFORM)), TRUE)
ADEFS += $(call ADEFTrans,CR4, TRUE)
endif
## end of ADEFS
# if any component needs to interwork with other ARM mode components, it should
# Compiler settings for specific components
#the following will be removed after *.def are updated
ifeq ($(strip $(COMPONENT)),dp_engine)
ifeq ($(strip $(COMPILER)),GCC)
CFLAGS += -O3
else
CFLAGS += -Otime -Ono_autoinline
endif
endif
ifeq ($(strip $(COMPILER)),GCC)
depend = -MMD -MP -MF
AS_depend = -MD
else
depend = --depend
AS_depend = --depend
endif
ifeq ($(strip $(MODIS_CONFIG)),TRUE)
ifeq ($(strip $(MODIS_COMPILER)),CLANG)
CFLAGS := $(CFLAGS_CLANG_MODIS)
ifeq ($(strip $(COMPONENT)),c2k_xsim_gw)
# One byte alignment is required for GKI send/receive signal operations.
# Only applies to c2k_xsim_gw because it is the only entry point for GKI operations for UESIM/Modis
CFLAGS += /Zp1
else
# Default alignment of 8 bytes
CFLAGS += /Zp8
endif
CPLUSFLAGS := $(CFLAGS)
LIB := $(LIB_MODIS)
else ifeq ($(strip $(MODIS_COMPILER)),MINGW)
CFLAGS := $(CFLAGS_MODIS)
CPLUSFLAGS := $(CFLAGS)
LIB := $(LIB_MODIS)
endif
endif
# Generate module information
ifeq ($(strip $(GEN_MODULE_INFO)),TRUE)
COMP_TEMP:=$(shell $(IF_NOT_EXIST) $(strip $(MODULE_FOLDER)) $(THEN) $(MKDIR) $(strip $(MODULE_FOLDER)) $(CMD_END))
COMP_TEMP:=$(shell $(IF_EXIST) $(COMPONENT_LOG).lis $(THEN) $(DEL_FILE) $(COMPONENT_LOG).lis $(CMD_END))
COMP_TEMP:=$(shell $(IF_EXIST) $(COMPONENT_LOG).ade $(THEN) $(DEL_FILE) $(COMPONENT_LOG).ade $(CMD_END))
COMP_TEMP:=$(shell $(IF_EXIST) $(COMPONENT_LOG).inc $(THEN) $(DEL_FILE) $(COMPONENT_LOG).inc $(CMD_END))
COMP_TEMP:=$(shell $(IF_NOT_EXIST) $(strip $(COMPONENT_FOLDER)) $(THEN) $(MKDIR) $(strip $(COMPONENT_FOLDER)) $(CMD_END))
ifneq ($(strip $(OS_VERSION)),MSWin32)
COMP_TEMP:=$(shell $(IF_EXIST) $(COMPONENT_LOG).def.bak $(THEN) $(DEL_FILE) $(COMPONENT_LOG).def.bak $(CMD_END))
COMP_TEMP:=$(shell $(IF_EXIST) $(COMPONENT_LOG).def $(THEN) mv $(COMPONENT_LOG).def $(COMPONENT_LOG).def.bak $(CMD_END))
endif
ifneq ($(words $(SRC_LIST)),0)
ifeq ($(call lte,$(call strlen,$(SRC_LIST)),32000),T)
COMP_TEMP:=$(shell perl ./tools/echoLongString4.pl $(COMPONENT_LOG).lis $(SRC_LIST))
COMP_TEMP:=$(shell perl ./tools/lnitem.pl $(COMPONENT_LOG).lis)
else
COMP_TEMP:=$(foreach com,$(SRC_LIST),$(shell echo $(com)>>$(COMPONENT_LOG).lis))
endif
else
COMP_TEMP:=$(shell $(ECHO) "" >$(COMPONENT_LOG).lis)
endif
#remove object files if not exist in SRC_LIST
ifneq ($(wildcard $(COMPOBJS_DIR)),)
LIST_OBJ_FINAL:=$(filter-out $(basename $(notdir $(SRC_LIST))),$(basename $(notdir $(shell $(LIST_DIR) -n "$(COMPOBJS_DIR)/*.obj"))))
ifneq ($(words $(LIST_OBJ_FINAL)),0)
COMP_TEMP:=$(shell $(IF_EXIST) $(TARGLIB) $(THEN) $(DEL_FILE) $(TARGLIB) $(CMD_END))
COMP_TEMP:=$(foreach com,$(LIST_OBJ_FINAL),$(shell $(IF_EXIST) $(COMPOBJS_DIR)/$(com).obj $(THEN) $(DEL_FILE) $(COMPOBJS_DIR)/$(com).obj $(CMD_END)))
COMP_TEMP:=$(foreach com,$(LIST_OBJ_FINAL),$(shell $(IF_EXIST) $(COMPDETS_DIR)/$(com).d $(THEN) $(DEL_FILE) $(COMPDETS_DIR)/$(com).d $(CMD_END)))
endif
endif
ifeq ($(strip $(MODIS_CONFIG)),TRUE)
ifneq ($(words $(INCDIRS)),0)
ifeq ($(call lte,$(call strlen,$(INCDIRS)),32000),T)
COMP_TEMP:=$(shell $(STRCMPEX) abc abc e $(COMPONENT_LOG).inc $(subst \,/,$(INCDIRS)))
COMP_TEMP:=$(shell perl ./tools/lnitem.pl $(COMPONENT_LOG).inc)
else
COMP_TEMP:=$(foreach com,$(INCDIRS),$(shell echo $(subst \,/,$(com)) >>$(COMPONENT_LOG).inc))
endif
else
COMP_TEMP:=$(shell $(ECHO) "" >$(COMPONENT_LOG).inc)
endif
else
ifneq ($(words $(INC_DIR)),0)
ifeq ($(call lte,$(call strlen,$(INC_DIR)),32000),T)
ifeq ($(strip $(COMPILER)),GCC)
COMP_TEMP:=$(shell $(STRCMPEX) abc abc e $(COMPONENT_LOG).inc $(subst \,/,$(INC_DIR)))
else
COMP_TEMP:=$(shell $(STRCMPEX) abc abc e $(COMPONENT_LOG).inc $(INC_DIR))
endif
COMP_TEMP:=$(shell perl ./tools/lnitem.pl $(COMPONENT_LOG).inc)
else
ifeq ($(strip $(COMPILER)),GCC)
COMP_TEMP:=$(foreach com,$(INC_DIR),$(shell echo $(subst \,/,$(com)) >>$(COMPONENT_LOG).inc))
else
COMP_TEMP:=$(foreach com,$(INC_DIR),$(shell echo $(com) >>$(COMPONENT_LOG).inc))
endif
endif
else
COMP_TEMP:=$(shell $(ECHO) "" >$(COMPONENT_LOG).inc)
endif
endif
ifeq ($(strip $(MODIS_CONFIG)),TRUE)
ifneq ($(words $(DEFINES)),0)
ifeq ($(call lte,$(call strlen,$(DEFINES)),32000),T)
COMP_TEMP:=$(shell perl ./tools/echoLongString4.pl $(COMPONENT_LOG).def $(DEFINES))
COMP_TEMP:=$(shell perl ./tools/lnitem.pl $(COMPONENT_LOG).def)
else
COMP_TEMP:=$(foreach def,$(DEFINES),$(shell echo $(def) >>$(COMPONENT_LOG).def))
endif
else
COMP_TEMP:=$(shell $(ECHO) "" >$(COMPONENT_LOG).def)
endif
else
ifneq ($(words $(COMP_DEFS)),0)
COMP_TEMP:=$(shell perl ./tools/echoLongString4.pl $(COMPONENT_LOG).def $(COMP_DEFS))
COMP_TEMP:=$(shell perl ./tools/lnitem.pl $(COMPONENT_LOG).def)
else
COMP_TEMP:=$(shell $(ECHO) "" >$(COMPONENT_LOG).def)
endif
endif
ifneq ($(strip $(MODIS_CONFIG)),TRUE)
COMP_TEMP:=$(shell perl ./tools/echoLongString5.pl $(COMPONENT_LOG).ade ADEFS $(ADEFS))
endif
else ifeq ($(filter $(MAKECMDGOALS),setup_env),)
SRC_LIST_OUT := $(filter-out %.rec %.ico %.rc %.bmp %.h,$(SRC_LIST))
SRC_LIST_TMP := $(foreach file,$(sort $(call Lower,$(SRC_LIST_OUT))),$(if $(filter $(basename $(notdir $(file))),$(basename $(notdir $(filter-out $(file),$(call Lower,$(SRC_LIST_OUT)))))),$(file),))
ifneq ($(strip $(SRC_LIST_TMP)),)
$(info The following files are conflicted in SRC_LIST from $(strip $(COMPONENT)).mak:)
$(info $(strip $(SRC_LIST_TMP)))
$(error SRC_LIST)
endif
endif
# end
# *************************************************************************
# Library Targets
# *************************************************************************
ifneq ($(strip $(DETERMINISTIC)),TRUE)
ARCHIVE_OPTION := -r
CLANG_FOR_DETERMINISTIC :=
else
ARCHIVE_OPTION := -rD
CLANG_FOR_DETERMINISTIC := /Brepro
endif
update_lib: $(TARGLIB)
# @$(IF_EXIST) $(COMPDETS_DIR) $(THEN) $(DEL_DIR) $(COMPDETS_DIR) $(CMD_END)
$(TARGLIB):
# If library for customer release exists.
# Copy and update it or create a new one
# mbis time probe
ifeq ($(strip $(MBIS_EN_OBJ_LOG)),TRUE)
@$(ECHO) -n -t "T_S,$@,L," >> $(COMPLOGDIR)/mbis/$(strip $(COMPONENT))/$(basename $(notdir $@))".mbis"
endif
@$(IF_EXIST) $(TARGLIB) $(THEN) ($(DEL_FILE) $(TARGLIB)) $(CMD_END)
@$(IF_EXIST) $(OBJ_ARCHIVE) $(THEN) ($(DEL_FILE) $(OBJ_ARCHIVE)) $(CMD_END)
@$(IF_EXIST) $(OBJ_ARCHIVE_SORT) $(THEN) ($(DEL_FILE) $(OBJ_ARCHIVE_SORT)) $(CMD_END)
@$(FOR) $(F_OPT) $(DECLARE_VAR)i $(IN) `$(LIST_DIR) -n "$(COMPOBJS_DIR)/*.obj"` \
$(DO) \
$(ECHO) -n $(PRE_VAR)i>>$(OBJ_ARCHIVE)\
$(DONE)
@perl ./tools/sortobj.pl $(OBJ_ARCHIVE) $(OBJ_ARCHIVE_SORT)
ifneq ($(strip $(MODIS_CONFIG)),TRUE)
ifeq ($(strip $(COMPILER)),GCC)
@$(strip $(LIB)) $(strip $(ARCHIVE_OPTION)) $(TARGLIB) $(VIA)$(OBJ_ARCHIVE_SORT)
else
@$(strip $(LIB)) -create $(TARGLIB) $(VIA)$(OBJ_ARCHIVE_SORT)
endif
else
ifeq ($(strip $(MODIS_COMPILER)),MINGW)
@$(strip $(LIB)) $(strip $(ARCHIVE_OPTION)) $(TARGLIB) $(VIA)$(OBJ_ARCHIVE_SORT)
endif
ifeq ($(strip $(MODIS_COMPILER)),CLANG)
@$(strip $(LIB)) /nologo /out:$(TARGLIB) $(VIA)$(OBJ_ARCHIVE_SORT)
endif
endif
@$(ECHO) -n "$(TARGLIB) is updated"
@$(IF_EXIST) $(OBJ_ARCHIVE) $(THEN) ($(DEL_FILE) $(OBJ_ARCHIVE)) $(CMD_END)
@$(IF_EXIST) $(OBJ_ARCHIVE_SORT) $(THEN) ($(DEL_FILE) $(OBJ_ARCHIVE_SORT)) $(CMD_END)
ifeq ($(filter remake remake_modis,$(strip $(ACTION))),)
ifneq ($(strip $(NO_DEP)),TRUE)
@$(IF_EXIST) $(COMPDETS_DIR) $(THEN) perl ./tools/pack_dep_gcc.pl $(TARGDEP) $(COMPDETS_DIR) $(HTOGETHER) $(strip $(HEADER_TEMP)) $(CMD_END)
endif
ifneq ($(PCIBT_ACTION_LIST),)
$(PCIBT_SCRIPT_CMD) $(CHK_LTE_COMP) $(MODULE_MAKEFILE) $(COMPDETS_DIR) $(PCIBT_ACTION_LIST)
endif
endif
# @$(IF_EXIST) $(COMPDETS_DIR) $(THEN)$(DEL_DIR) $(COMPDETS_DIR) $(CMD_END)
# mbis time probe
ifeq ($(strip $(MBIS_EN_OBJ_LOG)),TRUE)
@$(ECHO) -n -t "T_E,$@,L," >> $(COMPLOGDIR)/mbis/$(strip $(COMPONENT))/$(basename $(notdir $@))".mbis"
endif
RUN_SETUP_ENV := TRUE
ifeq ($(strip $(GEN_MODULE_INFO)),TRUE)
RUN_SETUP_ENV := FALSE
endif
ifeq ($(strip $(MODIS_CONFIG)),TRUE)
ifeq ($(strip $(MODIS_COMPILER)),VC2008)
RUN_SETUP_ENV := FALSE
endif
endif
setup_env: gen_setup_env
gen_setup_env:
ifeq ($(strip $(RUN_SETUP_ENV)),TRUE)
ifneq ($(strip $(OS_VERSION)),MSWin32)
@$(IF_EXIST) $(COMPVIA_DIR)/$(strip $(COMPONENT)).via $(THEN) mv $(COMPVIA_DIR)/$(strip $(COMPONENT)).via $(COMPVIA_DIR)/$(strip $(COMPONENT)).via_bak $(CMD_END)
@$(IF_EXIST) $(COMPVIA_DIR)/$(strip $(COMPONENT))_inc.via $(THEN) mv $(COMPVIA_DIR)/$(strip $(COMPONENT))_inc.via $(COMPVIA_DIR)/$(strip $(COMPONENT))_inc.via_bak $(CMD_END)
endif
@$(IF_NOT_EXIST) $(COMPVIA_DIR) $(THEN) $(MKDIR) $(COMPVIA_DIR)/$(strip $(COMPONENT)) $(CMD_END)
@$(STRCMPEX) abc abc e $(COMPVIA_DIR)/$(strip $(COMPONENT)).via $(CDEFS)
@$(STRCMPEX) abc abc e $(COMPVIA_DIR)/$(strip $(COMPONENT))_inc.via $(CINCDIRS)
ifneq ($(strip $(OS_VERSION)),MSWin32)
@$(IF_EXIST) $(COMPVIA_DIR)/$(strip $(COMPONENT)).via_bak $(THEN) \
(($(COMPARE) $(COMPVIA_DIR)/$(strip $(COMPONENT)).via_bak $(COMPVIA_DIR)/$(strip $(COMPONENT)).via >$(DEV_NUL) 2>&1) $(WITH) \
($(IF_ERR_FALSE) $(THEN) \
(touch -r $(COMPVIA_DIR)/$(strip $(COMPONENT)).via_bak $(COMPVIA_DIR)/$(strip $(COMPONENT)).via >$(DEV_NUL)) $(AND) \
(echo $(COMPVIA_DIR)/$(strip $(COMPONENT)).via timestampe is changed from $(COMPVIA_DIR)/$(strip $(COMPONENT)).via_bak!) \
$(CMD_END))) $(AND) \
($(DEL_FILE) $(COMPVIA_DIR)/$(strip $(COMPONENT)).via_bak) \
$(CMD_END)
@$(IF_EXIST) $(COMPVIA_DIR)/$(strip $(COMPONENT))_inc.via_bak $(THEN) \
(($(COMPARE) $(COMPVIA_DIR)/$(strip $(COMPONENT))_inc.via_bak $(COMPVIA_DIR)/$(strip $(COMPONENT))_inc.via >$(DEV_NUL) 2>&1) $(WITH) \
($(IF_ERR_FALSE) $(THEN) \
(touch -r $(COMPVIA_DIR)/$(strip $(COMPONENT))_inc.via_bak $(COMPVIA_DIR)/$(strip $(COMPONENT))_inc.via >$(DEV_NUL)) $(AND) \
(echo $(COMPVIA_DIR)/$(strip $(COMPONENT))_inc.via timestampe is changed from $(COMPVIA_DIR)/$(strip $(COMPONENT))_inc.via_bak!) \
$(CMD_END))) $(AND) \
($(DEL_FILE) $(COMPVIA_DIR)/$(strip $(COMPONENT))_inc.via_bak) \
$(CMD_END)
endif
ifeq ($(strip $(OS_VERSION)),MSWin32)
@tools\warp.exe $(subst /,\,$(COMPVIA_DIR))\$(strip $(COMPONENT)).via
@tools\warp.exe $(subst /,\,$(COMPVIA_DIR))\$(strip $(COMPONENT))_inc.via
endif
@$(IF_NOT_EXIST) $(COMPLOGDIR)/$(strip $(COMPONENT)) $(THEN) $(MKDIR) $(COMPLOGDIR)/$(strip $(COMPONENT)) $(CMD_END)
@$(IF_NOT_EXIST) $(COMPDETS_DIR) $(THEN) $(MKDIR) $(COMPDETS_DIR) $(CMD_END)
@$(IF_NOT_EXIST) $(COMPOBJS_DIR) $(THEN) $(MKDIR) $(COMPOBJS_DIR) $(CMD_END)
ifneq ($(strip $(MODIS_CONFIG)),TRUE)
ifeq ($(filter __L1_KW_SCAN__,$(DEFINES)),)
ifdef SRC_RULE_AUTOTCM
ifneq ($(strip $(SRC_RULE_AUTOTCM)),)
@$(IF_EXIST) $(strip $(COMPLOGDIR))/$(strip $(COMPONENT))_auto_tcm.log $(THEN) $(DEL_FILE) $(strip $(COMPLOGDIR))/$(strip $(COMPONENT))_auto_tcm.log $(CMD_END)
@$(IF_NOT_EXIST) $(PROJ_INTERNAL_DIR)/auto_tcm/$(strip $(COMPONENT)) $(THEN) $(MKDIR) $(PROJ_INTERNAL_DIR)/auto_tcm/$(strip $(COMPONENT)) $(CMD_END)
endif
endif
ifdef SRC_RULE_AUTOAMMS_DRDI
ifneq ($(strip $(SRC_RULE_AUTOAMMS_DRDI)),)
@$(IF_EXIST) $(strip $(COMPLOGDIR))/$(strip $(COMPONENT))_auto_amms_drdi.log $(THEN) $(DEL_FILE) $(strip $(COMPLOGDIR))/$(strip $(COMPONENT))_auto_amms_drdi.log $(CMD_END)
@$(IF_NOT_EXIST) $(PROJ_INTERNAL_DIR)/auto_amms/$(strip $(COMPONENT)) $(THEN) $(MKDIR) $(PROJ_INTERNAL_DIR)/auto_amms/$(strip $(COMPONENT)) $(CMD_END)
endif
endif
endif
endif
# generate vcxproj for modis/uesim.
ifeq ($(strip $(MODIS_CONFIG)),TRUE)
perl ./$(strip $(MODISDIR))/createMoDIS.pl "$(strip $(PROJECT_MAKEFILE))" $(MODIS_UESIM) "$(strip $(COMPONENT))"
endif
else
ifneq ($(strip $(MODIS_CONFIG)),TRUE)
@echo Generating $(COMPONENT) information is done.
else
@echo $(COMPONENT) MoDIS module setup is done.
endif
endif
ifneq ($(PCIBT_ACTION_LIST),)
ifeq ($(strip $(RUN_SETUP_ENV)),TRUE)
$(PCIBT_SCRIPT_CMD) $(CHK_LTE_COMP) $(MODULE_MAKEFILE) $(COMPONENT_LOG).lis,$(COMPVIA_DIR)/$(strip $(COMPONENT))_inc.via $(PCIBT_ACTION_LIST)
else
$(PCIBT_SCRIPT_CMD) $(CHK_LTE_COMP) $(MODULE_MAKEFILE) $(COMPONENT_LOG).lis,$(COMPONENT_LOG).inc $(PCIBT_ACTION_LIST)
endif
endif
# *************************************************************************
# Dependency Targets
# *************************************************************************
update_dep: $(TARGDEP)
#@$(IF_EXIST) $(COMPDETS_DIR) $(THEN) $(DEL_DIR) $(COMPDETS_DIR) $(CMD_END)
$(TARGDEP):
# mbis time probe
ifeq ($(strip $(MBIS_EN_OBJ_LOG)),TRUE)
@$(ECHO) -n -t "T_S,$@,D," >> $(COMPLOGDIR)/mbis/$(strip $(COMPONENT))/$(basename $(notdir $@))".mbis"
endif
@$(IF_EXIST) $(COMPDETS_DIR) $(THEN) perl ./tools/pack_dep_gcc.pl $(TARGDEP) $(COMPDETS_DIR) $(HTOGETHER) $(strip $(HEADER_TEMP)) $(CMD_END)
#@$(IF_EXIST) $(COMPDETS_DIR) $(THEN) $(DEL_DIR) $(COMPDETS_DIR) $(CMD_END)
ifneq ($(PCIBT_ACTION_LIST),)
$(PCIBT_SCRIPT_CMD) $(CHK_LTE_COMP) $(MODULE_MAKEFILE) $(TARGDEP) $(PCIBT_ACTION_LIST)
endif
# mbis time probe
ifeq ($(strip $(MBIS_EN_OBJ_LOG)),TRUE)
@$(ECHO) -n -t "T_E,$@,D," >> $(COMPLOGDIR)/mbis/$(strip $(COMPONENT))/$(basename $(notdir $@))".mbis"
endif
# *************************************************************************
# Component Targets
# *************************************************************************
# %.c: %.txt
define target_adt_codegen
$(2): $(1) $(3)
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Processing for ADT codegen $$< ... >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$(IF_NOT_EXIST) $$(strip $$(ADT_RULESDIR))/$$(strip $$(COMPONENT)) $(THEN) $(MKDIR) $$(strip $$(ADT_RULESDIR))/$$(strip $$(COMPONENT)) $(CMD_END)
@perl $(3) $(1) $$(strip $$(ADT_RULESDIR))/$$(strip $$(COMPONENT))/$(4).c $$(strip $$(ADT_RULESDIR))/$$(strip $$(COMPONENT))/$(4).h >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
# %.obj: %.c
# %.obj: %.cpp
define target_compile_c_obj
ifneq ($(filter update_lib,$(MAKECMDGOALS)),)
include $$(wildcard $$(COMPDETS_DIR)/$$(basename $$(notdir $(1))).d)
endif
ifeq ($$(strip $$(SMART_CHECK)),TRUE)
$(2): $$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via
endif
$(2): $(1)
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Compiling $$< ... >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
ifeq ($$(strip $$(SMART_CHECK)),TRUE)
@echo [SMART LOG] $$@ target is triggered by: $$?
endif
@perl ./tools/chk_dsp_ase.pl "$$(strip $$(COMPONENT))" "$$(strip $$(DSP_ASE_MODULES))" "$$($(4))"
@$$(IF_EXIST) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(THEN) $$(DEL_FILE) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(CMD_END)
ifeq ($$(strip $$(ACTION)),remake)
ifndef CCACHE_DIR
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -c $$($(4)) -o $$(COMPOBJS_DIR)/$$(notdir $$@) $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($(filter $(1),$(strip $(CCACHE_EXCLUDE_FILE))),)
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -c $$($(4)) -o $$(COMPOBJS_DIR)/$$(notdir $$@) $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($$(strip $$(CUSTOM_RELEASE)),FALSE)
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -c $$($(4)) -o $$(COMPOBJS_DIR)/$$(notdir $$@) $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
$(CCACHE) $(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -c $$($(4)) -o $$(COMPOBJS_DIR)/$$(notdir $$@) $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
endif
endif
endif
else
ifndef CCACHE_DIR
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -c $$($(4)) $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(notdir $$@) $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($(filter $(1),$(strip $(CCACHE_EXCLUDE_FILE))),)
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -c $$($(4)) $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(notdir $$@) $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($$(strip $$(CUSTOM_RELEASE)),FALSE)
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -c $$($(4)) $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(notdir $$@) $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
$(CCACHE) $(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -c $$($(4)) $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(notdir $$@) $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
endif
endif
endif
@$$(ECHO) "$(1):" >> "$$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d"
endif
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
# %.obj: %.c (tcm)
# %.obj: %.cpp (tcm)
define target_compile1_c_obj
ifneq ($(filter update_lib,$(MAKECMDGOALS)),)
include $$(wildcard $$(COMPDETS_DIR)/$$(basename $$(notdir $(1))).d)
endif
ifeq ($$(strip $$(SMART_CHECK)),TRUE)
$(2): $$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via
endif
$(2): $(1) $$(NEED_CHECK_DEPEND_LIST) ./tools/auto_tcm_attribute.pl $$(filter-out NO_LIST,$$(TARGET_AUTOTCM_LIST))
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Pre-compiling $$< ... >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(IF_EXIST) $$(PROJ_INTERNAL_DIR)/auto_tcm/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$(THEN) $$(DEL_FILE) $$(PROJ_INTERNAL_DIR)/auto_tcm/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$(CMD_END)
ifeq ($$(strip $$(ACTION)),remake)
ifndef CCACHE_DIR
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -o $$(PROJ_INTERNAL_DIR)/auto_tcm/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($(filter $(1),$(strip $(CCACHE_EXCLUDE_FILE))),)
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -o $$(PROJ_INTERNAL_DIR)/auto_tcm/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($$(strip $$(CUSTOM_RELEASE)),FALSE)
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -o $$(PROJ_INTERNAL_DIR)/auto_tcm/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
$(CCACHE) $(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -o $$(PROJ_INTERNAL_DIR)/auto_tcm/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
endif
endif
endif
else
ifndef CCACHE_DIR
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(PROJ_INTERNAL_DIR)/auto_tcm/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($(filter $(1),$(strip $(CCACHE_EXCLUDE_FILE))),)
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(PROJ_INTERNAL_DIR)/auto_tcm/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($$(strip $$(CUSTOM_RELEASE)),FALSE)
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(PROJ_INTERNAL_DIR)/auto_tcm/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
$(CCACHE) $(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(PROJ_INTERNAL_DIR)/auto_tcm/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
endif
endif
endif
@$$(ECHO) "$(1):" >> "$$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d"
endif
@$$(IF_EXIST) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(THEN) $$(DEL_FILE) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(CMD_END)
ifneq ($$(strip $$(MODIS_CONFIG)),TRUE)
ifneq ($$(filter-out NO_LIST,$$(TARGET_AUTOTCM_LIST)),)
# writing the same log at the same time is protected by OS
@perl ./tools/auto_tcm_attribute.pl $$(PROJ_INTERNAL_DIR)/auto_tcm/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$(TARGET_AUTOTCM_LIST) $$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))_auto_tcm.log >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log 2>&1
endif
endif
@echo $(3) -c $$($(4)) -o $$(COMPOBJS_DIR)/$$(notdir $$@) $$(PROJ_INTERNAL_DIR)/auto_tcm/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c
@$(3) -c $$($(4)) -o $$(COMPOBJS_DIR)/$$(notdir $$@) $$(PROJ_INTERNAL_DIR)/auto_tcm/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
# %.obj: %.c (amms_drdi)
# %.obj: %.cpp (amms_drdi)
define target_compile_c_obj_amms_drdi
ifneq ($(filter update_lib,$(MAKECMDGOALS)),)
include $$(wildcard $$(COMPDETS_DIR)/$$(basename $$(notdir $(1))).d)
endif
ifeq ($$(strip $$(SMART_CHECK)),TRUE)
$(2): $$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via
endif
$(2): $(1) $$(NEED_CHECK_DEPEND_LIST) ./tools/auto_amms_drdi_attribute.pl $$(filter-out NO_LIST,$$(TARGET_AMMS_DRDI_LIST))
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Pre-compiling $$< to $$(PROJ_INTERNAL_DIR)/auto_amms/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(IF_EXIST) $$(PROJ_INTERNAL_DIR)/auto_amms/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$(THEN) $$(DEL_FILE) $$(PROJ_INTERNAL_DIR)/auto_amms/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$(CMD_END)
ifeq ($$(strip $$(ACTION)),remake)
ifndef CCACHE_DIR
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -o $$(PROJ_INTERNAL_DIR)/auto_amms/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($(filter $(1),$(strip $(CCACHE_EXCLUDE_FILE))),)
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -o $$(PROJ_INTERNAL_DIR)/auto_amms/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($$(strip $$(CUSTOM_RELEASE)),FALSE)
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -o $$(PROJ_INTERNAL_DIR)/auto_amms/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
$(CCACHE) $(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -o $$(PROJ_INTERNAL_DIR)/auto_amms/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
endif
endif
endif
else
ifndef CCACHE_DIR
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(PROJ_INTERNAL_DIR)/auto_amms/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($(filter $(1),$(strip $(CCACHE_EXCLUDE_FILE))),)
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(PROJ_INTERNAL_DIR)/auto_amms/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($$(strip $$(CUSTOM_RELEASE)),FALSE)
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(PROJ_INTERNAL_DIR)/auto_amms/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
$(CCACHE) $(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -E -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(PROJ_INTERNAL_DIR)/auto_amms/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
endif
endif
endif
@$$(ECHO) "$(1):" >> "$$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d"
endif
@$$(IF_EXIST) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(THEN) $$(DEL_FILE) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(CMD_END)
ifneq ($$(strip $$(MODIS_CONFIG)),TRUE)
ifneq ($$(filter-out NO_LIST,$$(TARGET_AMMS_DRDI_LIST)),)
# writing the same log at the same time is protected by OS
@perl ./tools/auto_amms_drdi_attribute.pl $$(PROJ_INTERNAL_DIR)/auto_amms/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c $$(TARGET_AMMS_DRDI_LIST) $$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))_auto_amms_drdi.log >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log 2>&1
endif
endif
@echo $(3) -c $$($(4)) -o $$(COMPOBJS_DIR)/$$(notdir $$@) $$(PROJ_INTERNAL_DIR)/auto_amms/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c
@$(3) -c $$($(4)) -o $$(COMPOBJS_DIR)/$$(notdir $$@) $$(PROJ_INTERNAL_DIR)/auto_amms/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).c 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
# %.det: %.c
# %.det: %.cpp
define target_scan_c_det
$(2): $(1)
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Pre-compiling $$< ... >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -M $$< >$$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
# %.obj: %.s
define target_compile_asm_obj
ifneq ($(filter update_lib,$(MAKECMDGOALS)),)
include $$(wildcard $$(COMPDETS_DIR)/$$(basename $$(notdir $(1))).d)
endif
$(2): $(1)
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Compiling $$< ... >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(IF_EXIST) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(THEN) $$(DEL_FILE) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(CMD_END)
ifeq ($$(strip $$(ACTION)),remake)
$$(ASM) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(AFLAGS) $$(EXTRA_AFLAGS) $$(ADEFS) $$< -o $$(COMPOBJS_DIR)/$$(notdir $$@) 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
$$(ASM) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(AFLAGS) $$(EXTRA_AFLAGS) $$(ADEFS) $$< -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(AS_depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(notdir $$@) 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(ECHO) "$(1):" >> "$$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d"
endif
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
# %.det: %.s
define target_scan_asm_det
$(2): $(1)
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Pre-compiling $$< ... >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
# %.obj: %.s (-32)
define target_compile1_asm_obj
ifneq ($(filter update_lib,$(MAKECMDGOALS)),)
include $$(wildcard $$(COMPDETS_DIR)/$$(basename $$(notdir $(1))).d)
endif
$(2): $(1)
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Compiling $$< ... >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(IF_EXIST) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(THEN) $$(DEL_FILE) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(CMD_END)
ifeq ($$(strip $$(ACTION)),remake)
ifeq ($$(strip $$(COMPILER)),GCC)
$$(ASM) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(AFLAGS) $$(EXTRA_AFLAGS) $$(ADEFS) -mapcs-32 $$< -o $$(COMPOBJS_DIR)/$$(notdir $$@) 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
endif
else
ifeq ($$(strip $$(COMPILER)),GCC)
$$(ASM) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(AFLAGS) $$(EXTRA_AFLAGS) $$(ADEFS) -mapcs-32 $$< -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(AS_depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(notdir $$@) 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(ECHO) "$(1):" >> "$$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d"
endif
endif
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
# %.obj: %.s (preprocess)
define target_compile2_asm_obj
ifneq ($(filter update_lib,$(MAKECMDGOALS)),)
include $$(wildcard $$(COMPDETS_DIR)/$$(basename $$(notdir $(1))).d)
endif
$(2): $(1)
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Pre-compiling $$< ... >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(STRCMPEX) abc abc e $$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(A_CDEFS) -D$$(strip $$(PLATFORM))_$$(strip $$(CHIP_VER))=$$(strip $$(PLATFORM))_$$(strip $$(CHIP_VER))
ifeq ($$(strip $$(OS_VERSION)),MSWin32)
@tools\warp.exe $$(COMPVIA_DIR)\$$(basename $$(notdir $$@))_det.via
endif
@$$(IF_EXIST) $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s $$(THEN) $$(DEL_FILE) $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s $$(CMD_END)
ifeq ($$(strip $$(ACTION)),remake)
ifndef CCACHE_DIR
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($(filter $(1),$(strip $(CCACHE_EXCLUDE_FILE))),)
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($$(strip $$(CUSTOM_RELEASE)),FALSE)
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
$(CCACHE) $$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
endif
endif
endif
else
ifndef CCACHE_DIR
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($(filter $(1),$(strip $(CCACHE_EXCLUDE_FILE))),)
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($$(strip $$(CUSTOM_RELEASE)),FALSE)
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
$(CCACHE) $$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
endif
endif
endif
endif
@echo Compiling $$< ... >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(IF_EXIST) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(THEN) $$(DEL_FILE) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(CMD_END)
ifeq ($$(strip $$(ACTION)),remake)
$$(ASM) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(AFLAGS) $$(EXTRA_AFLAGS) $$(ADEFS) $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s -o $$(COMPOBJS_DIR)/$$(notdir $$@) 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
$$(ASM) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(AFLAGS) $$(EXTRA_AFLAGS) $$(ADEFS) $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s -o $$(COMPOBJS_DIR)/$$(notdir $$@) 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(ECHO) "$(1):" >> "$$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d"
endif
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
# %.det: %.s (preprocess)
define target_scan2_asm_det
$(2): $(1)
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Pre-compiling $$< ... >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(STRCMPEX) abc abc e $$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(A_CDEFS) -D$$(strip $$(PLATFORM))_$$(strip $$(CHIP_VER))=$$(strip $$(PLATFORM))_$$(strip $$(CHIP_VER)) $$(CINCDIRS)
ifeq ($$(strip $$(OS_VERSION)),MSWin32)
@tools\warp.exe $$(COMPVIA_DIR)\$$(basename $$(notdir $$@))_det.via
endif
@$$(IF_EXIST) $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s $$(THEN) $$(DEL_FILE) $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s $$(CMD_END)
ifndef CCACHE_DIR
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($(filter $(1),$(strip $(CCACHE_EXCLUDE_FILE))),)
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($$(strip $$(CUSTOM_RELEASE)),FALSE)
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
$(CCACHE) $$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
endif
endif
endif
@$$(IF_EXIST) $$(COMPDETS_DIR)/~$$(basename $$(notdir $$@)).d $$(THEN) \
$$(CAT) $$(COMPDETS_DIR)/~$$(basename $$(notdir $$@)).d | $$(GREP_V) "$$(basename $$(notdir $$@)).s" >>$$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d $$(WITH) (exit 0)\
$$(CMD_END)
@$$(IF_EXIST) $$(COMPDETS_DIR)/~$$(basename $$(notdir $$@)).d $$(THEN) $$(DEL_FILE) $$(COMPDETS_DIR)/~$$(basename $$(notdir $$@)).d $$(CMD_END)
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
# %.obj: %.s (preprocess and -32)
define target_compile3_asm_obj
ifneq ($(filter update_lib,$(MAKECMDGOALS)),)
include $$(wildcard $$(COMPDETS_DIR)/$$(basename $$(notdir $(1))).d)
endif
$(2): $(1)
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Pre-compiling $$< ... >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(STRCMPEX) abc abc e $$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(A_CDEFS) -D$$(strip $$(PLATFORM))_$$(strip $$(CHIP_VER))=$$(strip $$(PLATFORM))_$$(strip $$(CHIP_VER))
ifeq ($$(strip $$(OS_VERSION)),MSWin32)
@tools\warp.exe $$(COMPVIA_DIR)\$$(basename $$(notdir $$@))_det.via
endif
@$$(IF_EXIST) $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s $$(THEN) $$(DEL_FILE) $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s $$(CMD_END)
ifeq ($$(strip $$(ACTION)),remake)
ifndef CCACHE_DIR
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($(filter $(1),$(strip $(CCACHE_EXCLUDE_FILE))),)
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($$(strip $$(CUSTOM_RELEASE)),FALSE)
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
$(CCACHE) $$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
endif
endif
endif
else
ifndef CCACHE_DIR
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($(filter $(1),$(strip $(CCACHE_EXCLUDE_FILE))),)
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
ifneq ($$(strip $$(CUSTOM_RELEASE)),FALSE)
$$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
$(CCACHE) $$(CC) $$(VIA)$$(COMPVIA_DIR)/$$(basename $$(notdir $$@))_det.via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(ASM_CPPFLAGS) $$(AFLAGS) -E $$< -MT '$$(COMPOBJS_DIR)/$$(notdir $$@)' $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
endif
endif
endif
endif
@echo Compiling $$< ... >>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(IF_EXIST) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(THEN) $$(DEL_FILE) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(CMD_END)
ifeq ($$(strip $$(ACTION)),remake)
ifeq ($$(strip $$(COMPILER)),GCC)
$$(ASM) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(AFLAGS) $$(EXTRA_AFLAGS) $$(ADEFS) -mapcs-32 $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s -o $$(COMPOBJS_DIR)/$$(notdir $$@) 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
@$$(ASM) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(AFLAGS) $$(EXTRA_AFLAGS) $$(ADEFS) -32 $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s -o $$(COMPOBJS_DIR)/$$(notdir $$@) 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
endif
else
ifeq ($$(strip $$(COMPILER)),GCC)
$$(ASM) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(AFLAGS) $$(EXTRA_AFLAGS) $$(ADEFS) -mapcs-32 $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s -o $$(COMPOBJS_DIR)/$$(notdir $$@) 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
@$$(ASM) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via $$(AFLAGS) $$(EXTRA_AFLAGS) $$(ADEFS) -32 $$(COMPOBJS_DIR)/$$(basename $$(notdir $$@)).s -o $$(COMPOBJS_DIR)/$$(notdir $$@) 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
endif
@$$(ECHO) "$(1):" >> "$$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d"
endif
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
# %.obj: %.c (MoDIS Clang)
define modis_clang_compile_c_obj
ifneq ($(filter update_lib,$(MAKECMDGOALS)),)
include $$(wildcard $$(COMPDETS_DIR)/$$(basename $$(notdir $(1))).d)
endif
ifeq ($$(strip $$(SMART_CHECK)),TRUE)
$(2): $$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via
endif
$(2): $(1)
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Compiling $$< ... >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
ifeq ($$(strip $$(SMART_CHECK)),TRUE)
@echo [SMART LOG] $$@ target is triggered by: $$?
endif
@$$(IF_EXIST) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(THEN) $$(DEL_FILE) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(CMD_END)
ifeq ($$(filter remake_modis,$$(strip $$(ACTION))),)
@echo "$$(strip $$(ClangDir))/bin/clang $$(CFLAGS_CLANG_MODIS_DEP_OPTS) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -MM -MP -MT $$(COMPOBJS_DIR)/$$(notdir $$@) $$< -MF $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d"
@$$(strip $$(ClangDir))/bin/clang $$(CFLAGS_CLANG_MODIS_DEP_OPTS) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -MM -MP -MT $$(COMPOBJS_DIR)/$$(notdir $$@) $$< -MF $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d
@$$(ECHO) "$(1):" >> "$$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d"
endif
@if [[ "$$(LLVM_COVERAGE)" == "" || "$$<" == */ut/* || $$< == */it/* || $$< == */_BUILD_XGEN/* || $$< == *gtest* ]]; then \
echo "$(3) $$(strip $$(CLANG_FOR_DETERMINISTIC)) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via /c $$(CFLAGS) /Fo$$(COMPOBJS_DIR)/$$(notdir $$@) $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log" &&\
$(3) $$(strip $$(CLANG_FOR_DETERMINISTIC)) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via /c $$(CFLAGS) /Fo$$(COMPOBJS_DIR)/$$(notdir $$@) $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log; \
else \
echo "$(3) $$(strip $$(CLANG_FOR_DETERMINISTIC)) -fprofile-instr-generate -Xclang -fcoverage-mapping $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via /c $$(CFLAGS) /Fo$$(COMPOBJS_DIR)/$$(notdir $$@) $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log" &&\
$(3) $$(strip $$(CLANG_FOR_DETERMINISTIC)) -fprofile-instr-generate -Xclang -fcoverage-mapping $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via /c $$(CFLAGS) /Fo$$(COMPOBJS_DIR)/$$(notdir $$@) $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log; \
fi
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
# %.det: %.c (MoDIS Clang)
define modis_clang_scan_c_det
$(2): $(1)
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Pre-compiling $$< ... >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(IF_EXIST) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(THEN) $$(DEL_FILE) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(CMD_END)
@$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -M $$< >$$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
# %.obj: %.c (MoDIS)
define modis_compile_c_obj
include $$(wildcard $$(COMPDETS_DIR)/$$(basename $$(notdir $(1))).d)
$(2): $(1)
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Compiling $$< ... >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(IF_EXIST) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(THEN) $$(DEL_FILE) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(CMD_END)
ifeq ($$(strip $$(ACTION)),remake)
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -c $$(CFLAGS) -o $$(COMPOBJS_DIR)/$$(notdir $$@) $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
else
$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -c $$(CFLAGS) $$(depend) $$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d -o $$(COMPOBJS_DIR)/$$(notdir $$@) $$< 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(ECHO) "$(1):" >> "$$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d"
endif
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
# %.det: %.c (MoDIS)
define modis_scan_c_det
$(2): $(1)
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_S,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
@echo Pre-compiling $$< ... >$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
@$$(IF_EXIST) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(THEN) $$(DEL_FILE) $$(COMPOBJS_DIR)/$$(notdir $$@) $$(CMD_END)
@$(3) $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT)).via $$(VIA)$$(COMPVIA_DIR)/$$(strip $$(COMPONENT))_inc.via -M $$< >$$(COMPDETS_DIR)/$$(basename $$(notdir $$@)).d 2>>$$(strip $$(COMPLOGDIR))/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@)).log
# mbis time probe
ifeq ($$(strip $$(MBIS_EN_OBJ_LOG)),TRUE)
@$$(ECHO) -n -t "T_E,$$(@F),O," >> $$(strip $$(COMPLOGDIR))/mbis/$$(strip $$(COMPONENT))/$$(basename $$(notdir $$@))".mbis"
endif
endef
ifneq ($(strip $(MODIS_CONFIG)),TRUE)
ifeq ($(filter __L1_KW_SCAN__,$(DEFINES)),)
ifdef SRC_RULE_ADT_CODEGEN
$(foreach argu,$(SRC_RULE_ADT_CODEGEN), \
$(eval $(call target_adt_codegen,$(TARGET_ADT_CODEGEN_LIST), $(strip $(ADT_RULESDIR))/$(strip $(COMPONENT))/$(argu).c,$(SRC_PERL_ADT_CODEGEN),$(argu))) \
)
endif
endif
$(foreach argu,$(CSRCS_AMMS_DRDI), \
$(eval COBJ_AMMS_DRDI := $(patsubst %.C,%, $(patsubst %.c,%, $(patsubst %.cpp,%, $(notdir $(argu)))))) \
$(eval $(call target_compile_c_obj_amms_drdi,$(argu),$(strip $(COMPOBJS_DIR))/$(COBJ_AMMS_DRDI).obj,$(CC),$(if $(filter %.cpp,$(argu)),CPLUSFLAGS,CFLAGS))) \
$(eval $(TARGLIB): $(strip $(COMPOBJS_DIR))/$(COBJ_AMMS_DRDI).obj) \
)
$(foreach argu,$(CSRCS), \
$(eval COBJ := $(patsubst %.C,%, $(patsubst %.c,%, $(patsubst %.cpp,%, $(notdir $(argu)))))) \
$(eval $(call target_compile_c_obj,$(argu),$(strip $(COMPOBJS_DIR))/$(COBJ).obj,$(CC),$(if $(filter %.cpp,$(argu)),CPLUSFLAGS,CFLAGS))) \
$(eval $(TARGLIB): $(strip $(COMPOBJS_DIR))/$(COBJ).obj) \
)
$(foreach argu,$(CSRCS1), \
$(eval COBJ1 := $(patsubst %.C,%, $(patsubst %.c,%, $(patsubst %.cpp,%, $(notdir $(argu)))))) \
$(eval $(call target_compile1_c_obj,$(argu),$(strip $(COMPOBJS_DIR))/$(COBJ1).obj,$(CC),$(if $(filter %.cpp,$(argu)),CPLUSFLAGS,CFLAGS))) \
$(eval $(TARGLIB): $(strip $(COMPOBJS_DIR))/$(COBJ1).obj) \
)
$(foreach argu,$(CSRCS5), \
$(eval COBJ5 := $(patsubst %.C,%, $(patsubst %.c,%, $(patsubst %.cpp,%, $(notdir $(argu)))))) \
$(eval $(call target_compile_c_obj,$(argu),$(strip $(COMPOBJS_DIR))/$(COBJ5).obj,$(CC32),$(if $(filter %.cpp,$(argu)),CPLUSFLAGS,CFLAGS))) \
$(eval $(TARGLIB): $(strip $(COMPOBJS_DIR))/$(COBJ5).obj) \
)
$(foreach argu,$(CSRCS6), \
$(eval COBJ6 := $(patsubst %.C,%, $(patsubst %.c,%, $(patsubst %.cpp,%, $(notdir $(argu)))))) \
$(eval $(call target_compile1_c_obj,$(argu),$(strip $(COMPOBJS_DIR))/$(COBJ6).obj,$(CC32),$(if $(filter %.cpp,$(argu)),CPLUSFLAGS,CFLAGS))) \
$(eval $(TARGLIB): $(strip $(COMPOBJS_DIR))/$(COBJ6).obj) \
)
$(foreach argu,$(ASRCS), \
$(eval AOBJ := $(patsubst %.S,%, $(patsubst %.s,%, $(patsubst %.arm,%, $(notdir $(argu)))))) \
$(eval $(call target_compile2_asm_obj,$(argu),$(strip $(COMPOBJS_DIR))/$(AOBJ).obj)) \
$(eval $(TARGLIB): $(strip $(COMPOBJS_DIR))/$(AOBJ).obj) \
)
$(foreach argu,$(ASRCS1), \
$(eval AOBJ1 := $(patsubst %.S,%, $(patsubst %.s,%, $(notdir $(argu))))) \
$(eval $(call target_compile3_asm_obj,$(argu),$(strip $(COMPOBJS_DIR))/$(AOBJ1).obj)) \
$(eval $(TARGLIB): $(strip $(COMPOBJS_DIR))/$(AOBJ1).obj) \
)
$(foreach argu,$(ASRCS2), \
$(eval AOBJ2 := $(patsubst %.S,%, $(patsubst %.s,%, $(notdir $(argu))))) \
$(eval $(call target_compile2_asm_obj,$(argu),$(strip $(COMPOBJS_DIR))/$(AOBJ2).obj)) \
$(eval $(TARGLIB): $(strip $(COMPOBJS_DIR))/$(AOBJ2).obj) \
)
else
ifeq ($(strip $(MODIS_COMPILER)),CLANG)
$(foreach argu,$(filter %.c %.cpp,$(SRC_LIST)), \
$(eval COBJ := $(patsubst %.c,%, $(patsubst %.cpp,%, $(notdir $(argu))))) \
$(eval $(call modis_clang_compile_c_obj,$(argu),$(strip $(COMPOBJS_DIR))/$(COBJ).obj,$(CC_MODIS))) \
$(eval $(TARGLIB): $(strip $(COMPOBJS_DIR))/$(COBJ).obj) \
)
else
$(foreach argu,$(filter %.c %.cpp,$(SRC_LIST)), \
$(eval COBJ0 := $(patsubst %.c,%, $(patsubst %.cpp,%, $(notdir $(argu))))) \
$(eval $(call modis_compile_c_obj,$(argu),$(strip $(COMPOBJS_DIR))/$(COBJ0).obj,$(CC_MODIS))) \
$(eval $(TARGLIB): $(strip $(COMPOBJS_DIR))/$(COBJ0).obj) \
)
endif
endif