SConscript revision 2086
112027Sjungma@eit.uni-kl.de# -*- mode:python -*-
212027Sjungma@eit.uni-kl.de
312027Sjungma@eit.uni-kl.de# Copyright (c) 2004-2005 The Regents of The University of Michigan
412027Sjungma@eit.uni-kl.de# All rights reserved.
512027Sjungma@eit.uni-kl.de#
612027Sjungma@eit.uni-kl.de# Redistribution and use in source and binary forms, with or without
712027Sjungma@eit.uni-kl.de# modification, are permitted provided that the following conditions are
812027Sjungma@eit.uni-kl.de# met: redistributions of source code must retain the above copyright
912027Sjungma@eit.uni-kl.de# notice, this list of conditions and the following disclaimer;
1012027Sjungma@eit.uni-kl.de# redistributions in binary form must reproduce the above copyright
1112027Sjungma@eit.uni-kl.de# notice, this list of conditions and the following disclaimer in the
1212027Sjungma@eit.uni-kl.de# documentation and/or other materials provided with the distribution;
1312027Sjungma@eit.uni-kl.de# neither the name of the copyright holders nor the names of its
1412027Sjungma@eit.uni-kl.de# contributors may be used to endorse or promote products derived from
1512027Sjungma@eit.uni-kl.de# this software without specific prior written permission.
1612027Sjungma@eit.uni-kl.de#
1712027Sjungma@eit.uni-kl.de# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1812027Sjungma@eit.uni-kl.de# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1912027Sjungma@eit.uni-kl.de# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2012027Sjungma@eit.uni-kl.de# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2112027Sjungma@eit.uni-kl.de# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2212027Sjungma@eit.uni-kl.de# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2312027Sjungma@eit.uni-kl.de# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2412027Sjungma@eit.uni-kl.de# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2512027Sjungma@eit.uni-kl.de# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2612563Sgabeblack@google.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2712563Sgabeblack@google.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2812027Sjungma@eit.uni-kl.de
2912046Sgabeblack@google.comimport os
3012027Sjungma@eit.uni-kl.deimport sys
3112027Sjungma@eit.uni-kl.defrom os.path import isdir
3212046Sgabeblack@google.com
3312027Sjungma@eit.uni-kl.de# Import build environment variable from SConstruct.
3412046Sgabeblack@google.comImport('env')
3512046Sgabeblack@google.com
3612027Sjungma@eit.uni-kl.de###################################################
3712046Sgabeblack@google.com#
3812046Sgabeblack@google.com# Define needed sources.
3912027Sjungma@eit.uni-kl.de#
4012046Sgabeblack@google.com###################################################
4112046Sgabeblack@google.com
4212027Sjungma@eit.uni-kl.de# Base sources used by all configurations.
4312046Sgabeblack@google.comarch_base_sources = Split('''
4412046Sgabeblack@google.com	arch/sparc/decoder.cc
4512046Sgabeblack@google.com        arch/sparc/alpha_o3_exec.cc
4612027Sjungma@eit.uni-kl.de	arch/sparc/fast_cpu_exec.cc
4712046Sgabeblack@google.com	arch/sparc/simple_cpu_exec.cc
4812046Sgabeblack@google.com	arch/sparc/full_cpu_exec.cc
4912046Sgabeblack@google.com	arch/sparc/faults.cc
5012046Sgabeblack@google.com	arch/sparc/isa_traits.cc
5112046Sgabeblack@google.com	''')
5212046Sgabeblack@google.com
5312046Sgabeblack@google.com# Full-system sources
5412046Sgabeblack@google.comarch_full_system_sources = Split('''
5512046Sgabeblack@google.com	arch/sparc/alpha_memory.cc
5612046Sgabeblack@google.com	arch/sparc/arguments.cc
5712046Sgabeblack@google.com	arch/sparc/ev5.cc
5812046Sgabeblack@google.com	arch/sparc/osfpal.cc
5912046Sgabeblack@google.com	arch/sparc/stacktrace.cc
6012046Sgabeblack@google.com	arch/sparc/vtophys.cc
6112046Sgabeblack@google.com	''')
6212563Sgabeblack@google.com
6312563Sgabeblack@google.com# Syscall emulation (non-full-system) sources
6412046Sgabeblack@google.comarch_syscall_emulation_sources = Split('''
6512027Sjungma@eit.uni-kl.de	arch/sparc/alpha_common_syscall_emul.cc
6612027Sjungma@eit.uni-kl.de	arch/sparc/alpha_linux_process.cc
6712046Sgabeblack@google.com	arch/sparc/alpha_tru64_process.cc
6812046Sgabeblack@google.com	''')
6912027Sjungma@eit.uni-kl.de
7012046Sgabeblack@google.comsources = arch_base_sources
7112046Sgabeblack@google.com
7212046Sgabeblack@google.comif env['FULL_SYSTEM']:
7312046Sgabeblack@google.com    sources += arch_full_system_sources
7412027Sjungma@eit.uni-kl.de    if env['ALPHA_TLASER']:
7512046Sgabeblack@google.com        sources += arch_turbolaser_sources
7612046Sgabeblack@google.comelse:
7712046Sgabeblack@google.com    sources += arch_syscall_emulation_sources
7812046Sgabeblack@google.com
7912046Sgabeblack@google.comfor opt in env.ExportOptions:
8012046Sgabeblack@google.com    env.ConfigFile(opt)
8112046Sgabeblack@google.com
8212027Sjungma@eit.uni-kl.deReturn('sources')
8312046Sgabeblack@google.com