SConscript revision 2152
12929Sktlim@umich.edu# -*- mode:python -*- 22929Sktlim@umich.edu 32932Sktlim@umich.edu# Copyright (c) 2004-2005 The Regents of The University of Michigan 42929Sktlim@umich.edu# All rights reserved. 52929Sktlim@umich.edu# 62929Sktlim@umich.edu# Redistribution and use in source and binary forms, with or without 72929Sktlim@umich.edu# modification, are permitted provided that the following conditions are 82929Sktlim@umich.edu# met: redistributions of source code must retain the above copyright 92929Sktlim@umich.edu# notice, this list of conditions and the following disclaimer; 102929Sktlim@umich.edu# redistributions in binary form must reproduce the above copyright 112929Sktlim@umich.edu# notice, this list of conditions and the following disclaimer in the 122929Sktlim@umich.edu# documentation and/or other materials provided with the distribution; 132929Sktlim@umich.edu# neither the name of the copyright holders nor the names of its 142929Sktlim@umich.edu# contributors may be used to endorse or promote products derived from 152929Sktlim@umich.edu# this software without specific prior written permission. 162929Sktlim@umich.edu# 172929Sktlim@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 182929Sktlim@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 192929Sktlim@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 202929Sktlim@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 212929Sktlim@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 222929Sktlim@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 232929Sktlim@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 242929Sktlim@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 252929Sktlim@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 262929Sktlim@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 272929Sktlim@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282932Sktlim@umich.edu 292932Sktlim@umich.eduimport os 302932Sktlim@umich.eduimport sys 312929Sktlim@umich.edufrom os.path import isdir 322929Sktlim@umich.edu 332929Sktlim@umich.edu# Import build environment variable from SConstruct. 342929Sktlim@umich.eduImport('env') 352929Sktlim@umich.edu 362929Sktlim@umich.edu################################################### 372929Sktlim@umich.edu# 382929Sktlim@umich.edu# Define needed sources. 392929Sktlim@umich.edu# 402929Sktlim@umich.edu################################################### 412929Sktlim@umich.edu 422929Sktlim@umich.edu# Base sources used by all configurations. 432929Sktlim@umich.edubase_sources = Split(''' 442929Sktlim@umich.edu faults.cc 452929Sktlim@umich.edu isa_traits.cc 462929Sktlim@umich.edu ''') 472929Sktlim@umich.edu 482929Sktlim@umich.edu# Full-system sources 492929Sktlim@umich.edufull_system_sources = Split(''' 502929Sktlim@umich.edu alpha_memory.cc 512929Sktlim@umich.edu arguments.cc 522929Sktlim@umich.edu ev5.cc 532929Sktlim@umich.edu osfpal.cc 542929Sktlim@umich.edu stacktrace.cc 552929Sktlim@umich.edu vtophys.cc 562929Sktlim@umich.edu ''') 572929Sktlim@umich.edu 582929Sktlim@umich.edu# Syscall emulation (non-full-system) sources 592929Sktlim@umich.edusyscall_emulation_sources = Split(''' 602929Sktlim@umich.edu alpha_common_syscall_emul.cc 615773Snate@binkert.org alpha_linux_process.cc 622929Sktlim@umich.edu alpha_tru64_process.cc 632929Sktlim@umich.edu ''') 643020Sstever@eecs.umich.edu 653020Sstever@eecs.umich.edusources = base_sources 663020Sstever@eecs.umich.edu 672929Sktlim@umich.eduif env['FULL_SYSTEM']: 682929Sktlim@umich.edu sources += full_system_sources 693021Sstever@eecs.umich.eduelse: 705773Snate@binkert.org sources += syscall_emulation_sources 712929Sktlim@umich.edu 722929Sktlim@umich.edu# Convert file names to SCons File objects. This takes care of the 732929Sktlim@umich.edu# path relative to the top of the directory tree. 742929Sktlim@umich.edusources = [File(s) for s in sources] 755773Snate@binkert.org 762929Sktlim@umich.edu# Add in files generated by the ISA description. 772929Sktlim@umich.eduisa_desc_files = env.ISADesc('isa/main.isa') 782929Sktlim@umich.edu# Only non-header files need to be compiled. 792929Sktlim@umich.eduisa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')] 802929Sktlim@umich.edusources += isa_desc_sources 812929Sktlim@umich.edu 822929Sktlim@umich.eduReturn('sources') 832929Sktlim@umich.edu