SConscript revision 2170
12SN/A# -*- mode:python -*-
213954Sgiacomo.gabrielli@arm.com
39920Syasuko.eckert@amd.com# Copyright (c) 2004-2005 The Regents of The University of Michigan
47338SAli.Saidi@ARM.com# All rights reserved.
57338SAli.Saidi@ARM.com#
67338SAli.Saidi@ARM.com# Redistribution and use in source and binary forms, with or without
77338SAli.Saidi@ARM.com# modification, are permitted provided that the following conditions are
87338SAli.Saidi@ARM.com# met: redistributions of source code must retain the above copyright
97338SAli.Saidi@ARM.com# notice, this list of conditions and the following disclaimer;
107338SAli.Saidi@ARM.com# redistributions in binary form must reproduce the above copyright
117338SAli.Saidi@ARM.com# notice, this list of conditions and the following disclaimer in the
127338SAli.Saidi@ARM.com# documentation and/or other materials provided with the distribution;
137338SAli.Saidi@ARM.com# neither the name of the copyright holders nor the names of its
147338SAli.Saidi@ARM.com# contributors may be used to endorse or promote products derived from
151762SN/A# this software without specific prior written permission.
162SN/A#
172SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
182SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
192SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
202SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
212SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
222SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
232SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
242SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
252SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
262SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
272SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282SN/A
292SN/Aimport os
302SN/Aimport sys
312SN/Afrom os.path import isdir
322SN/A
332SN/A# Import build environment variable from SConstruct.
342SN/AImport('env')
352SN/A
362SN/A###################################################
372SN/A#
382SN/A# Define needed sources.
392SN/A#
402665Ssaidi@eecs.umich.edu###################################################
412665Ssaidi@eecs.umich.edu
422SN/A# Base sources used by all configurations.
432SN/Abase_sources = Split('''
4411793Sbrandon.potter@amd.com	faults.cc
4511793Sbrandon.potter@amd.com	isa_traits.cc
468779Sgblack@eecs.umich.edu	''')
472439SN/A
488779Sgblack@eecs.umich.edu# Full-system sources
496216Snate@binkert.orgfull_system_sources = Split('''
50146SN/A	memory.cc
51146SN/A	arguments.cc
5211793Sbrandon.potter@amd.com	mips34k.cc
5312334Sgabeblack@google.com	osfpal.cc
54146SN/A	stacktrace.cc
55146SN/A	vtophys.cc
566216Snate@binkert.org	''')
576658Snate@binkert.org
581717SN/A# Syscall emulation (non-full-system) sources
598887Sgeoffrey.blake@arm.comsyscall_emulation_sources = Split('''
608887Sgeoffrey.blake@arm.com	common_syscall_emul.cc
61146SN/A	linux_process.cc
6210061Sandreas@sandberg.pp.se	tru64_process.cc
631977SN/A	''')
6411147Smitch.hayenga@arm.com
652683Sktlim@umich.edu# Set up complete list of sources based on configuration.
661717SN/Asources = base_sources
67146SN/A
682683Sktlim@umich.eduif env['FULL_SYSTEM']:
698232Snate@binkert.org    sources += full_system_sources
708232Snate@binkert.orgelse:
718232Snate@binkert.org    sources += syscall_emulation_sources
723348Sbinkertn@umich.edu
736105Ssteve.reinhardt@amd.com# Convert file names to SCons File objects.  This takes care of the
746216Snate@binkert.org# path relative to the top of the directory tree.
752036SN/Asources = [File(s) for s in sources]
76146SN/A
778817Sgblack@eecs.umich.edu# Add in files generated by the ISA description.
788793Sgblack@eecs.umich.eduisa_desc_files = env.ISADesc('isa/main.isa')
7956SN/A# Only non-header files need to be compiled.
8056SN/Aisa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')]
81695SN/Asources += isa_desc_sources
822901Ssaidi@eecs.umich.edu
832SN/AReturn('sources')
842SN/A