#===============================================================================
#
# MPROC Libs
#
# GENERAL DESCRIPTION
#    build script
#
# Copyright (c) 2009-2014 by QUALCOMM Technologies, Incorporated.
# All Rights Reserved.
# QUALCOMM Proprietary/GTDR
#
#-------------------------------------------------------------------------------
#
#  $Header: //components/rel/core.slpi/1.0/mproc/glink/build/SConscript#3 $
#  $DateTime: 2015/07/10 09:31:08 $
#  $Author: pwbldsvc $
#  $Change: 8562913 $
#                      EDIT HISTORY FOR FILE
#
#  This section contains comments describing changes made to the module.
#  Notice that changes are listed in reverse chronological order.
#
# when       who     what, where, why
# --------   ---     ---------------------------------------------------------
# 06/10/15   bc      Define macro for secure processor integration
#===============================================================================
Import('env')
import os
env = env.Clone()

#-------------------------------------------------------------------------------
# Convert warnings to errors 
#-------------------------------------------------------------------------------
if env.has_key('CORE_RPM'):
        env.Append(CFLAGS = "-W ")
elif not os.environ.get('COMPILER','gcc').startswith('llvm'):
        env.Append(CFLAGS = "-Werror ")

#-------------------------------------------------------------------------------
# Publish Protected APIs
#-------------------------------------------------------------------------------
env.PublishProtectedApi('MPROC_GLINK', [
   "${INC_ROOT}/core/mproc/glink/core/inc",
])

# Images that will have full glink features
FULL_GLINK_FEAUTRE_IMAGES = ['CORE_SLPI_ROOT', 'CORE_ADSP_ROOT', 'CORE_MPSS_ROOT',
                             'CBSP_APPS_IMAGE', 'APPS_IMAGE']

if env.IsTargetEnable(FULL_GLINK_FEAUTRE_IMAGES):
  env.Append(CPPDEFINES=['FEATURE_TRACER_PACKET'])

#-------------------------------------------------------------------------------
# Load sub scripts
#-------------------------------------------------------------------------------
env.LoadSoftwareUnits()
env.LoadImageUnits()
