#'"~.,.~"'"~.,.~"'"~.,.~"'"~.,.~"'"~.,.~"'"~.,.~"'"~.,.~"#
#~		CC6 Project Defines Makefile		~#
#'"~.,.~"'"~.,.~"'"~.,.~"'"~.,.~"'"~.,.~"'"~.,.~"'"~.,.~"#

#project defines
#this is the project, its name will be part part of the output object
PROJECT=ALL

#defines of the general project
GEN_CCFLAGS = $(CC_PLATFORM_FLAGS) $(CCFLAG_OPTIMIZE) \
	-DLITTLE__ENDIAN \
	-DCRYS_NO_C2_SUPPORT \
	-DCRYS_NO_OTF_SUPPORT \
	-DCRYS_NO_CMLA_SUPPORT \
	-DLLF_HASH_SHA384_SHA512_NOT_SUPPORTED \
	-DCRYS_NO_AES_XTS_MODE_SUPPORT \
	-DDX_NVS_SUPPORT \
	-DDX_CC5_SEP_PLAT \
	-DCRYS_NO_EXT_IF_MODE_SUPPORT \
	-DDX_OTP_BURN_NOT_SUPPORTED \
	-DTLK_SCLK_ON_SEP \
	-DCRYS_NO_OTF_MC_SUPPORT \
	-DDX_NO_TLK_ODRM_SUPPORT \
        -DDX_NO_MNG_SUPPORT


GEN_ARFLAGS = $(AR_PLATFORM_FLAGS) 
GEN_LDFLAGS = $(LD_PLATFORM_FLAGS) --scatter=../../scatter_Host_Native.sct



#flag for CRYS_ATP.mak to include required objects in build
CRYS_ATP_USE_FLOW =

#flag for MNG_ATP.mak to include required objects in build
MNG_ATP_SPEC_LCS = true

#DEV flag effects
ifeq ($(DEV),true)
	GEN_CCFLAGS += -DDX_ARM_INTEGRATOR_DEBUG
endif

#COMPILE_ARM11_NO_UNALIGNED_ACCESS flag effects
ifeq ($(COMPILE_ARM11_NO_UNALIGNED_ACCESS),true)
	GEN_CCFLAGS += --no_unaligned_access
endif

#NVS_TYPE flag effects
ifeq ($(NVS_TYPE),RAM)
	GEN_CCFLAGS += -DDX_NVS_RAM
endif

#MNG_ATP_SPEC_LCS flag effects
ifeq ($(MNG_ATP_SPEC_LCS),true)
	MNG_ATP_SPECIFIC_CCFLAGS += -DDX_SUPPORT_SPEC_LCS
endif

#the components turned on will be included in lib/atp projects
#each component should have a corresponding makefile in MF_PATH
CC6_GEN_ID = CC6_GEN
VOS_ID = VOS
FVOS_ID = FVOS
NVS_ID = NVS
INIT_ID = INIT
CRYS_ID = CRYS
FLOW_ID = FLOW
SST_ID = SST
KMNG_ID = KMNG
CRYS_SST_ID = CRYS_SST
CRYS_KMNG_ID = CRYS_KMNG
TLK_SCLK_ID = TLK_SCLK
TLK_ODRM_ID = TLK_ODRM
TLK_CERT_ID = TLK_CERT
MNG_ID = MNG
EXTAPP_ID = EXTAPP
WMDRM_ID = WMDRM
SEC_BOOT_ID = SEC_BOOT

SHARED_ATP_ID = SHARED_ATP
CRYS_ATP_ID = CRYS_ATP
SST_ATP_ID = SST_ATP
KMNG_ATP_ID = KMNG_ATP
TLK_ODRM_ATP_ID = TLK_ODRM_ATP
TLK_CERT_ATP_ID = TLK_CERT_ATP
TLK_SCLK_ATP_ID = TLK_SCLK_ATP
MNG_ATP_ID = MNG_ATP
MW_ATP_ID = MW_ATP
WMDRM_TST_ID = WMDRM_TST
EXTAPP_ATP_ID = EXTAPP_ATP

ifeq ($(CRYS_ATP_USE_FLOW),)
		GEN_CCFLAGS += -DCRYS_NO_FLOW_SUPPORT
endif

ifneq ($(WMDRM_ID),)
	GEN_CCFLAGS += \
		-DDRM_SUPPORT_DLA=1 \
		-DDRM_SUPPORT_LICENSE_SYNC=1 \
		-DDRM_SUPPORT_METERING=1 \
		-DDRM_SUPPORT_ANTIROLLBACK_CLOCK=1 \
		-DDRM_SUPPORT_ENCRYPTION=1 \
		-DDRM_SUPPORT_CERTIFICATE_CACHING=1 \
		-DDRM_SUPPORT_SYMMETRIC_OPTIMIZATIONS=1 \
		-DDRM_SUPPORT_OPT_CRYPTO \
		-DDX_WMDRM_USE_CRYS
endif

ifeq ($(TLK_ODRM_ATP_ID),)
		GEN_CCFLAGS += -DX_NO_TLK_SEC_RO_HANDLING_SUPPORT
endif

ifeq ($(TLK_CERT_ATP_ID),)
		GEN_CCFLAGS += -DDX_NO_TLK_CERT_SUPPORT
endif

ifeq ($(TLK_SCLK_ATP_ID),)
		GEN_CCFLAGS += -DDX_NO_TLK_SCLK_SUPPORT
endif

ifeq ($(EXTAPP_ATP_ID),)
		GEN_CCFLAGS += -DDX_NO_ExtAPP_SUPPORT
endif
ifneq ($(SEC_BOOT_ID),)
	GEN_CCFLAGS += \
		-DNOR_TEST
endif

ifneq ($(WMDRM_TST_ID),)
	GEN_CCFLAGS += \
		-DPK_TEST
endif
