SConscript revision 3546
12139SN/A# -*- mode:python -*-
22139SN/A
32139SN/A# Copyright (c) 2004-2005 The Regents of The University of Michigan
42139SN/A# All rights reserved.
52139SN/A#
62139SN/A# Redistribution and use in source and binary forms, with or without
72139SN/A# modification, are permitted provided that the following conditions are
82139SN/A# met: redistributions of source code must retain the above copyright
92139SN/A# notice, this list of conditions and the following disclaimer;
102139SN/A# redistributions in binary form must reproduce the above copyright
112139SN/A# notice, this list of conditions and the following disclaimer in the
122139SN/A# documentation and/or other materials provided with the distribution;
132139SN/A# neither the name of the copyright holders nor the names of its
142139SN/A# contributors may be used to endorse or promote products derived from
152139SN/A# this software without specific prior written permission.
162139SN/A#
172139SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
182139SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
192139SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
202139SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
212139SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
222139SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
232139SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
242139SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
252139SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
262139SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
272139SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282665Ssaidi@eecs.umich.edu#
292665Ssaidi@eecs.umich.edu# Authors: Gabe Black
302139SN/A#          Steve Reinhardt
314202Sbinkertn@umich.edu
322139SN/Aimport os
334202Sbinkertn@umich.eduimport sys
342152SN/Afrom os.path import isdir
352152SN/A
362139SN/A# Import build environment variable from SConstruct.
372139SN/AImport('env')
382139SN/A
392139SN/A###################################################
402139SN/A#
412152SN/A# Define needed sources.
422152SN/A#
432139SN/A###################################################
442139SN/A
452139SN/A# Base sources used by all configurations.
464781Snate@binkert.orgbase_sources = Split('''
474781Snate@binkert.org	asi.cc
487799Sgblack@eecs.umich.edu	faults.cc
494781Snate@binkert.org	floatregfile.cc
504781Snate@binkert.org	intregfile.cc
513170Sstever@eecs.umich.edu	miscregfile.cc
525664Sgblack@eecs.umich.edu	regfile.cc
533806Ssaidi@eecs.umich.edu	''')
546179Sksewell@umich.edu
554781Snate@binkert.org# Full-system sources
564781Snate@binkert.orgfull_system_sources = Split('''
576329Sgblack@eecs.umich.edu	vtophys.cc
584781Snate@binkert.org	system.cc
594781Snate@binkert.org	''')
604781Snate@binkert.org
614781Snate@binkert.org# Syscall emulation (non-full-system) sources
624781Snate@binkert.orgsyscall_emulation_sources = Split('''
634781Snate@binkert.org	linux/linux.cc
642139SN/A	linux/process.cc
652139SN/A	process.cc
663546Sgblack@eecs.umich.edu	solaris/process.cc
674202Sbinkertn@umich.edu	solaris/solaris.cc
682152SN/A	''')
692152SN/A
702152SN/Asources = base_sources
712152SN/A
722152SN/Aif env['FULL_SYSTEM']:
732152SN/A    sources += full_system_sources
742152SN/Aelse:
752152SN/A    sources += syscall_emulation_sources
762152SN/A
772152SN/A# Convert file names to SCons File objects.  This takes care of the
782152SN/A# path relative to the top of the directory tree.
792152SN/Asources = [File(s) for s in sources]
802504SN/A
812504SN/A# Add in files generated by the ISA description.
822504SN/Aisa_desc_files = env.ISADesc('isa/main.isa')
832504SN/A# Only non-header files need to be compiled.
842152SN/Aisa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')]
852504SN/Asources += isa_desc_sources
862152SN/A
872152SN/AReturn('sources')
882152SN/A