SConscript revision 2972
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.edu# Authors: Gabe Black
302155SN/A#          Steve Reinhardt
314202Sbinkertn@umich.edu#          Korey Sewell
322155SN/A
332178SN/Aimport os
342178SN/Aimport sys
352178SN/Afrom os.path import isdir
362178SN/A
372178SN/A# Import build environment variable from SConstruct.
382178SN/AImport('env')
392178SN/A
402178SN/A###################################################
412178SN/A#
422178SN/A# Define needed sources.
432178SN/A#
442178SN/A###################################################
452155SN/A
462178SN/A# Base sources used by all configurations.
472155SN/Abase_sources = Split('''
482155SN/A	faults.cc
492178SN/A	isa_traits.cc
502155SN/A        utility.cc
515865Sksewell@umich.edu	''')
526181Sksewell@umich.edu
536181Sksewell@umich.edu# Full-system sources
545865Sksewell@umich.edufull_system_sources = Split('''
553918Ssaidi@eecs.umich.edu	#Insert Full-System Files Here
565865Sksewell@umich.edu	''')
572623SN/A
583918Ssaidi@eecs.umich.edu# Syscall emulation (non-full-system) sources
592155SN/Asyscall_emulation_sources = Split('''
602155SN/A        linux/linux.cc
612292SN/A	linux/process.cc
626181Sksewell@umich.edu        process.cc
636181Sksewell@umich.edu	''')
643918Ssaidi@eecs.umich.edu
652292SN/A# Set up complete list of sources based on configuration.
662292SN/Asources = base_sources
672292SN/A
683918Ssaidi@eecs.umich.eduif env['FULL_SYSTEM']:
692292SN/A    sources += full_system_sources
702292SN/Aelse:
712766Sktlim@umich.edu    sources += syscall_emulation_sources
722766Sktlim@umich.edu
732766Sktlim@umich.edu# Convert file names to SCons File objects.  This takes care of the
742921Sktlim@umich.edu# path relative to the top of the directory tree.
752921Sktlim@umich.edusources = [File(s) for s in sources]
762766Sktlim@umich.edu
772766Sktlim@umich.edu# Add in files generated by the ISA description.
785529Snate@binkert.orgisa_desc_files = env.ISADesc('isa/main.isa')
792766Sktlim@umich.edu# Only non-header files need to be compiled.
804762Snate@binkert.orgisa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')]
812155SN/Asources += isa_desc_sources
822155SN/A
832155SN/AReturn('sources')
842155SN/A