SConscript revision 4159:a3cc632b33d8
14202Sbinkertn@umich.edu# -*- mode:python -*- 24202Sbinkertn@umich.edu 34202Sbinkertn@umich.edu# Copyright (c) 2005-2006 The Regents of The University of Michigan 44202Sbinkertn@umich.edu# All rights reserved. 54202Sbinkertn@umich.edu# 64202Sbinkertn@umich.edu# Redistribution and use in source and binary forms, with or without 74202Sbinkertn@umich.edu# modification, are permitted provided that the following conditions are 84202Sbinkertn@umich.edu# met: redistributions of source code must retain the above copyright 94202Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer; 104202Sbinkertn@umich.edu# redistributions in binary form must reproduce the above copyright 114202Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer in the 124202Sbinkertn@umich.edu# documentation and/or other materials provided with the distribution; 134202Sbinkertn@umich.edu# neither the name of the copyright holders nor the names of its 144202Sbinkertn@umich.edu# contributors may be used to endorse or promote products derived from 154202Sbinkertn@umich.edu# this software without specific prior written permission. 164202Sbinkertn@umich.edu# 174202Sbinkertn@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 184202Sbinkertn@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 194202Sbinkertn@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 204202Sbinkertn@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 214202Sbinkertn@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 224202Sbinkertn@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 234202Sbinkertn@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 244202Sbinkertn@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 254202Sbinkertn@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 264202Sbinkertn@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 274202Sbinkertn@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 284202Sbinkertn@umich.edu# 294202Sbinkertn@umich.edu# Authors: Gabe Black 304202Sbinkertn@umich.edu 314202Sbinkertn@umich.edu# Copyright (c) 2007 The Hewlett-Packard Development Company 324202Sbinkertn@umich.edu# All rights reserved. 334486Sbinkertn@umich.edu# 344486Sbinkertn@umich.edu# Redistribution and use of this software in source and binary forms, 354486Sbinkertn@umich.edu# with or without modification, are permitted provided that the 364486Sbinkertn@umich.edu# following conditions are met: 374486Sbinkertn@umich.edu# 384202Sbinkertn@umich.edu# The software must be used only for Non-Commercial Use which means any 394202Sbinkertn@umich.edu# use which is NOT directed to receiving any direct monetary 404202Sbinkertn@umich.edu# compensation for, or commercial advantage from such use. Illustrative 414202Sbinkertn@umich.edu# examples of non-commercial use are academic research, personal study, 424202Sbinkertn@umich.edu# teaching, education and corporate research & development. 434202Sbinkertn@umich.edu# Illustrative examples of commercial use are distributing products for 444202Sbinkertn@umich.edu# commercial advantage and providing services using the software for 454202Sbinkertn@umich.edu# commercial advantage. 464202Sbinkertn@umich.edu# 474202Sbinkertn@umich.edu# If you wish to use this software or functionality therein that may be 484202Sbinkertn@umich.edu# covered by patents for commercial use, please contact: 494202Sbinkertn@umich.edu# Director of Intellectual Property Licensing 504202Sbinkertn@umich.edu# Office of Strategy and Technology 514202Sbinkertn@umich.edu# Hewlett-Packard Company 52# 1501 Page Mill Road 53# Palo Alto, California 94304 54# 55# Redistributions of source code must retain the above copyright notice, 56# this list of conditions and the following disclaimer. Redistributions 57# in binary form must reproduce the above copyright notice, this list of 58# conditions and the following disclaimer in the documentation and/or 59# other materials provided with the distribution. Neither the name of 60# the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its 61# contributors may be used to endorse or promote products derived from 62# this software without specific prior written permission. No right of 63# sublicense is granted herewith. Derivatives of the software and 64# output created using the software may be prepared, but only for 65# Non-Commercial Uses. Derivatives of the software may be shared with 66# others provided: (i) the others agree to abide by the list of 67# conditions herein which includes the Non-Commercial Use restrictions; 68# and (ii) such Derivatives of the software include the above copyright 69# notice to acknowledge the contribution from this software where 70# applicable, this list of conditions and the disclaimer below. 71# 72# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 73# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 74# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 75# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 76# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 77# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 78# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 79# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 80# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 81# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 82# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 83# 84# Authors: Gabe Black 85 86import os 87import sys 88from os.path import isdir 89 90# Import build environment variable from SConstruct. 91Import('env') 92 93################################################### 94# 95# Define needed sources. 96# 97################################################### 98 99# Base sources used by all configurations. 100base_sources = Split(''' 101 floatregfile.cc 102 intregfile.cc 103 miscregfile.cc 104 regfile.cc 105 remote_gdb.cc 106 ''') 107 108# Full-system sources 109full_system_sources = Split(''' 110 ''') 111 112# Syscall emulation (non-full-system) sources 113syscall_emulation_sources = Split(''' 114 ''') 115 116sources = base_sources 117 118if env['FULL_SYSTEM']: 119 sources += full_system_sources 120else: 121 sources += syscall_emulation_sources 122 123# Convert file names to SCons File objects. This takes care of the 124# path relative to the top of the directory tree. 125sources = [File(s) for s in sources] 126 127# Add in files generated by the ISA description. 128isa_desc_files = env.ISADesc('isa/main.isa') 129# Only non-header files need to be compiled. 130isa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')] 131sources += isa_desc_sources 132 133Return('sources') 134