from building import *
import os

Import('esconfig')
root=str(Dir('#'))
cwd=os.getcwd()

portable_name=''
if esconfig.CROSS_TOOL=='keil':
    portable_name='RVDS'
elif esconfig.CROSS_TOOL=='iar':
    portable_name='IAR'
else:
    portable_name='GCC'

arch_name=''
if esconfig.ARCH == 'arm':
    if esconfig.CPU == 'cortex-m3':
        arch_name='ARM_CM3'
elif esconfig.ARCH == 'risc-v':
    arch_name = 'RISC-V'
objs=[]
objs += SConscript(os.path.join(portable_name,arch_name,'SConscript'),duplicate=0)
objs += SConscript(os.path.join('MemMang','SConscript'),duplicate=0)
include_path = [os.path.join(cwd,'Source','include')]

Return('objs')
