SConscript revision 2086
17405SAli.Saidi@ARM.com# -*- mode:python -*-
28868SMatt.Horsnell@arm.com
37405SAli.Saidi@ARM.com# Copyright (c) 2004-2005 The Regents of The University of Michigan
47405SAli.Saidi@ARM.com# All rights reserved.
57405SAli.Saidi@ARM.com#
67405SAli.Saidi@ARM.com# Redistribution and use in source and binary forms, with or without
77405SAli.Saidi@ARM.com# modification, are permitted provided that the following conditions are
87405SAli.Saidi@ARM.com# met: redistributions of source code must retain the above copyright
97405SAli.Saidi@ARM.com# notice, this list of conditions and the following disclaimer;
107405SAli.Saidi@ARM.com# redistributions in binary form must reproduce the above copyright
117405SAli.Saidi@ARM.com# notice, this list of conditions and the following disclaimer in the
127405SAli.Saidi@ARM.com# documentation and/or other materials provided with the distribution;
137405SAli.Saidi@ARM.com# neither the name of the copyright holders nor the names of its
147405SAli.Saidi@ARM.com# contributors may be used to endorse or promote products derived from
157405SAli.Saidi@ARM.com# this software without specific prior written permission.
167405SAli.Saidi@ARM.com#
177405SAli.Saidi@ARM.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
187405SAli.Saidi@ARM.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
197405SAli.Saidi@ARM.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
207405SAli.Saidi@ARM.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
217405SAli.Saidi@ARM.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
227405SAli.Saidi@ARM.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
237405SAli.Saidi@ARM.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
247405SAli.Saidi@ARM.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
257405SAli.Saidi@ARM.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
267405SAli.Saidi@ARM.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
277405SAli.Saidi@ARM.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
287405SAli.Saidi@ARM.com
297405SAli.Saidi@ARM.comimport os
307405SAli.Saidi@ARM.comimport sys
317405SAli.Saidi@ARM.comfrom os.path import isdir
327405SAli.Saidi@ARM.com
337405SAli.Saidi@ARM.com# Import build environment variable from SConstruct.
347405SAli.Saidi@ARM.comImport('env')
357405SAli.Saidi@ARM.com
367405SAli.Saidi@ARM.com###################################################
377405SAli.Saidi@ARM.com#
387405SAli.Saidi@ARM.com# Define needed sources.
397405SAli.Saidi@ARM.com#
407405SAli.Saidi@ARM.com###################################################
417405SAli.Saidi@ARM.com
429050Schander.sudanthi@arm.com# Base sources used by all configurations.
438887Sgeoffrey.blake@arm.comarch_base_sources = Split('''
448232Snate@binkert.org	arch/mips/decoder.cc
458232Snate@binkert.org        arch/mips/alpha_o3_exec.cc
469384SAndreas.Sandberg@arm.com	arch/mips/fast_cpu_exec.cc
477678Sgblack@eecs.umich.edu	arch/mips/simple_cpu_exec.cc
488059SAli.Saidi@ARM.com	arch/mips/full_cpu_exec.cc
498284SAli.Saidi@ARM.com	arch/mips/faults.cc
507405SAli.Saidi@ARM.com	arch/mips/isa_traits.cc
517405SAli.Saidi@ARM.com	''')
527405SAli.Saidi@ARM.com
537405SAli.Saidi@ARM.com# Full-system sources
549384SAndreas.Sandberg@arm.comarch_full_system_sources = Split('''
559384SAndreas.Sandberg@arm.com	arch/mips/alpha_memory.cc
569384SAndreas.Sandberg@arm.com	arch/mips/arguments.cc
579384SAndreas.Sandberg@arm.com	arch/mips/ev5.cc
589384SAndreas.Sandberg@arm.com	arch/mips/osfpal.cc
599384SAndreas.Sandberg@arm.com	arch/mips/stacktrace.cc
609384SAndreas.Sandberg@arm.com	arch/mips/vtophys.cc
619384SAndreas.Sandberg@arm.com	''')
629384SAndreas.Sandberg@arm.com
639384SAndreas.Sandberg@arm.com# Syscall emulation (non-full-system) sources
649384SAndreas.Sandberg@arm.comarch_syscall_emulation_sources = Split('''
659384SAndreas.Sandberg@arm.com	arch/mips/alpha_common_syscall_emul.cc
669384SAndreas.Sandberg@arm.com	arch/mips/alpha_linux_process.cc
679384SAndreas.Sandberg@arm.com	arch/mips/alpha_tru64_process.cc
689384SAndreas.Sandberg@arm.com	''')
697427Sgblack@eecs.umich.edu
707427Sgblack@eecs.umich.edu# Set up complete list of sources based on configuration.
717427Sgblack@eecs.umich.edusources = arch_base_sources
727427Sgblack@eecs.umich.edu
738299Schander.sudanthi@arm.comif env['FULL_SYSTEM']:
747427Sgblack@eecs.umich.edu    sources += arch_full_system_sources
757427Sgblack@eecs.umich.eduelse:
767427Sgblack@eecs.umich.edu    sources += arch_syscall_emulation_sources
777427Sgblack@eecs.umich.edu
787427Sgblack@eecs.umich.edufor opt in env.ExportOptions:
797427Sgblack@eecs.umich.edu    env.ConfigFile(opt)
807427Sgblack@eecs.umich.edu
817604SGene.Wu@arm.comReturn('sources')
827427Sgblack@eecs.umich.edu