#===============================================================================
#
# Storage Libs
#
# GENERAL DESCRIPTION
#    build script
#
# Copyright (c) 2009-2014 by QUALCOMM Technologies, Incorporated.
# All Rights Reserved.
# QUALCOMM Proprietary/GTDR
#
#-------------------------------------------------------------------------------
#
#  $Header: //source/qcom/qct/core/pkg/mpss/rel/1.0/modem_proc/core/storage/build/SConscript#1 $
#  $DateTime: 2011/07/12 11:42:57 $
#  $Author: cbirch $
#  $Change: 1831834 $
#                      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
# --------   ---     ---------------------------------------------------------
#
#===============================================================================
Import('env')
import os
env = env.Clone()

#-------------------------------------------------------------------------------
# Convert warnings to errors
#-------------------------------------------------------------------------------
env.Append(CFLAGS = "-Werror ")

#----------------------------------------------------------------------------
# Add Filesystem related build configuration flags to the environment
#----------------------------------------------------------------------------
cpp_flags = []

cpp_flags += ['FEATURE_FS_OS_FOR_POSIX']

if env.IsTargetEnable (['CORE_APPS']):
  cpp_flags += ['FEATURE_FS_OS_FOR_POSIX_ON_TN']

if env.IsTargetEnable ('CORE_MODEM'):
  cpp_flags += ['FS_OS_MPSS_BUILD']
  cpp_flags += ['FEATURE_FS_OS_EFS_FULL_LIB']
elif env.IsTargetEnable ('CORE_APPS'):
  cpp_flags += ['FS_OS_SPARROW_BUILD']
  cpp_flags += ['FEATURE_FS_OS_EFS_FULL_LIB']
elif env.IsTargetEnable (['CORE_QDSP6_SW','CORE_USER_PD','CORE_ADSP_ROOT']):
  cpp_flags += ['FS_OS_AUDIO_BUILD']
elif env.IsTargetEnable (['CORE_QDSP6_SENSOR_SW', 'CORE_SLPI_ROOT']):
  cpp_flags += ['FS_OS_SENSORS_BUILD']

env.Append (CPPDEFINES = cpp_flags);

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