SConscript revision 2086
12155SN/A# -*- mode:python -*-
22155SN/A
32155SN/A# Copyright (c) 2004-2005 The Regents of The University of Michigan
42155SN/A# All rights reserved.
52155SN/A#
62155SN/A# Redistribution and use in source and binary forms, with or without
72155SN/A# modification, are permitted provided that the following conditions are
82155SN/A# met: redistributions of source code must retain the above copyright
92155SN/A# notice, this list of conditions and the following disclaimer;
102155SN/A# redistributions in binary form must reproduce the above copyright
112155SN/A# notice, this list of conditions and the following disclaimer in the
122155SN/A# documentation and/or other materials provided with the distribution;
132155SN/A# neither the name of the copyright holders nor the names of its
142155SN/A# contributors may be used to endorse or promote products derived from
152155SN/A# this software without specific prior written permission.
162155SN/A#
172155SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
182155SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
192155SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
202155SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
212155SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
222155SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
232155SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
242155SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
252155SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
262155SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
272155SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282665Ssaidi@eecs.umich.edu
292665Ssaidi@eecs.umich.eduimport os
302155SN/Aimport sys
312155SN/Afrom os.path import isdir
322155SN/A
332155SN/A# Import build environment variable from SConstruct.
342155SN/AImport('env')
352155SN/A
362155SN/A###################################################
372178SN/A#
382178SN/A# Define needed sources.
392178SN/A#
402178SN/A###################################################
412178SN/A
422178SN/A# Base sources used by all configurations.
432178SN/Aarch_base_sources = Split('''
442178SN/A	arch/mips/decoder.cc
452178SN/A        arch/mips/alpha_o3_exec.cc
462178SN/A	arch/mips/fast_cpu_exec.cc
472178SN/A	arch/mips/simple_cpu_exec.cc
482178SN/A	arch/mips/full_cpu_exec.cc
492155SN/A	arch/mips/faults.cc
502178SN/A	arch/mips/isa_traits.cc
512155SN/A	''')
522155SN/A
532178SN/A# Full-system sources
542155SN/Aarch_full_system_sources = Split('''
552155SN/A	arch/mips/alpha_memory.cc
562623SN/A	arch/mips/arguments.cc
572623SN/A	arch/mips/ev5.cc
582623SN/A	arch/mips/osfpal.cc
592623SN/A	arch/mips/stacktrace.cc
602623SN/A	arch/mips/vtophys.cc
612155SN/A	''')
622155SN/A
632292SN/A# Syscall emulation (non-full-system) sources
642292SN/Aarch_syscall_emulation_sources = Split('''
652292SN/A	arch/mips/alpha_common_syscall_emul.cc
662292SN/A	arch/mips/alpha_linux_process.cc
672292SN/A	arch/mips/alpha_tru64_process.cc
682292SN/A	''')
692292SN/A
702292SN/A# Set up complete list of sources based on configuration.
712766Sktlim@umich.edusources = arch_base_sources
722766Sktlim@umich.edu
732766Sktlim@umich.eduif env['FULL_SYSTEM']:
742921Sktlim@umich.edu    sources += arch_full_system_sources
752921Sktlim@umich.eduelse:
762766Sktlim@umich.edu    sources += arch_syscall_emulation_sources
772766Sktlim@umich.edu
782766Sktlim@umich.edufor opt in env.ExportOptions:
792178SN/A    env.ConfigFile(opt)
802155SN/A
812155SN/AReturn('sources')
822155SN/A