SConscript revision 2086
112837Sgabeblack@google.com# -*- mode:python -*- 212837Sgabeblack@google.com 312837Sgabeblack@google.com# Copyright (c) 2004-2005 The Regents of The University of Michigan 412837Sgabeblack@google.com# All rights reserved. 512837Sgabeblack@google.com# 612837Sgabeblack@google.com# Redistribution and use in source and binary forms, with or without 712837Sgabeblack@google.com# modification, are permitted provided that the following conditions are 812837Sgabeblack@google.com# met: redistributions of source code must retain the above copyright 912837Sgabeblack@google.com# notice, this list of conditions and the following disclaimer; 1012837Sgabeblack@google.com# redistributions in binary form must reproduce the above copyright 1112837Sgabeblack@google.com# notice, this list of conditions and the following disclaimer in the 1212837Sgabeblack@google.com# documentation and/or other materials provided with the distribution; 1312837Sgabeblack@google.com# neither the name of the copyright holders nor the names of its 1412837Sgabeblack@google.com# contributors may be used to endorse or promote products derived from 1512837Sgabeblack@google.com# this software without specific prior written permission. 1612837Sgabeblack@google.com# 1712837Sgabeblack@google.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1812837Sgabeblack@google.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1912837Sgabeblack@google.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2012837Sgabeblack@google.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2112837Sgabeblack@google.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2212837Sgabeblack@google.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2312837Sgabeblack@google.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2412837Sgabeblack@google.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2512837Sgabeblack@google.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2612837Sgabeblack@google.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2712837Sgabeblack@google.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2812837Sgabeblack@google.com 2912837Sgabeblack@google.comimport os 3013177Sgabeblack@google.comimport sys 3113039Sgabeblack@google.comfrom os.path import isdir 3213039Sgabeblack@google.com 3312837Sgabeblack@google.com# Import build environment variable from SConstruct. 3412989Sgabeblack@google.comImport('env') 3512986Sgabeblack@google.com 3613039Sgabeblack@google.com################################################### 3713149Sgabeblack@google.com# 3812837Sgabeblack@google.com# Define needed sources. 3913149Sgabeblack@google.com# 4012837Sgabeblack@google.com################################################### 4112837Sgabeblack@google.com 4212837Sgabeblack@google.com# Base sources used by all configurations. 4312837Sgabeblack@google.comarch_base_sources = Split(''' 4412983Sgabeblack@google.com arch/sparc/decoder.cc 4512837Sgabeblack@google.com arch/sparc/alpha_o3_exec.cc 4612983Sgabeblack@google.com arch/sparc/fast_cpu_exec.cc 4712983Sgabeblack@google.com arch/sparc/simple_cpu_exec.cc 4812983Sgabeblack@google.com arch/sparc/full_cpu_exec.cc 4912983Sgabeblack@google.com arch/sparc/faults.cc 5012983Sgabeblack@google.com arch/sparc/isa_traits.cc 5112983Sgabeblack@google.com ''') 5212983Sgabeblack@google.com 5312983Sgabeblack@google.com# Full-system sources 5412983Sgabeblack@google.comarch_full_system_sources = Split(''' 5512983Sgabeblack@google.com arch/sparc/alpha_memory.cc 5612983Sgabeblack@google.com arch/sparc/arguments.cc 5712983Sgabeblack@google.com arch/sparc/ev5.cc 5812983Sgabeblack@google.com arch/sparc/osfpal.cc 5912983Sgabeblack@google.com arch/sparc/stacktrace.cc 6012983Sgabeblack@google.com arch/sparc/vtophys.cc 6112983Sgabeblack@google.com ''') 6212983Sgabeblack@google.com 6312983Sgabeblack@google.com# Syscall emulation (non-full-system) sources 6412983Sgabeblack@google.comarch_syscall_emulation_sources = Split(''' 6513039Sgabeblack@google.com arch/sparc/alpha_common_syscall_emul.cc 6613039Sgabeblack@google.com arch/sparc/alpha_linux_process.cc 6713039Sgabeblack@google.com arch/sparc/alpha_tru64_process.cc 6813039Sgabeblack@google.com ''') 6913039Sgabeblack@google.com 7013039Sgabeblack@google.comsources = arch_base_sources 7113039Sgabeblack@google.com 7213039Sgabeblack@google.comif env['FULL_SYSTEM']: 7313039Sgabeblack@google.com sources += arch_full_system_sources 7413039Sgabeblack@google.com if env['ALPHA_TLASER']: 7513039Sgabeblack@google.com sources += arch_turbolaser_sources 7613039Sgabeblack@google.comelse: 7713039Sgabeblack@google.com sources += arch_syscall_emulation_sources 7813039Sgabeblack@google.com 7913039Sgabeblack@google.comfor opt in env.ExportOptions: 8012986Sgabeblack@google.com env.ConfigFile(opt) 8113039Sgabeblack@google.com 8212986Sgabeblack@google.comReturn('sources') 8313039Sgabeblack@google.com