SConscript revision 2745
12968SN/A# -*- mode:python -*- 22968SN/A 32968SN/A# Copyright (c) 2004-2005 The Regents of The University of Michigan 48835SAli.Saidi@ARM.com# All rights reserved. 57935SN/A# 67935SN/A# Redistribution and use in source and binary forms, with or without 77935SN/A# modification, are permitted provided that the following conditions are 82968SN/A# met: redistributions of source code must retain the above copyright 92968SN/A# notice, this list of conditions and the following disclaimer; 102968SN/A# redistributions in binary form must reproduce the above copyright 115509SN/A# notice, this list of conditions and the following disclaimer in the 124463SN/A# documentation and/or other materials provided with the distribution; 132968SN/A# neither the name of the copyright holders nor the names of its 147935SN/A# contributors may be used to endorse or promote products derived from 152968SN/A# this software without specific prior written permission. 167935SN/A# 177670SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 182968SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 198721SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 208721SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 217935SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 223006SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 233140SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 242968SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 252968SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 267935SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 277935SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 287935SN/A# 297935SN/A# Authors: Gabe Black 307935SN/A# Steve Reinhardt 317935SN/A# Korey Sewell 327935SN/A 338983Snate@binkert.orgimport os 342968SN/Aimport sys 352968SN/Afrom os.path import isdir 362968SN/A 374463SN/A# Import build environment variable from SConstruct. 384463SN/AImport('env') 398721SN/A 408721SN/A################################################### 418721SN/A# 422968SN/A# Define needed sources. 438983Snate@binkert.org# 448983Snate@binkert.org################################################### 452968SN/A 462968SN/A# Base sources used by all configurations. 472968SN/Abase_sources = Split(''' 485723SN/A faults.cc 495876SN/A isa_traits.cc 504463SN/A utility.cc 513171SN/A ''') 522968SN/A 533638SN/A# Full-system sources 543638SN/Afull_system_sources = Split(''' 553638SN/A #Insert Full-System Files Here 562968SN/A ''') 578983Snate@binkert.org 582968SN/A# Syscall emulation (non-full-system) sources 592968SN/Asyscall_emulation_sources = Split(''' 605723SN/A linux/linux.cc 612968SN/A linux/process.cc 622968SN/A process.cc 632968SN/A ''') 642968SN/A 652968SN/A# Set up complete list of sources based on configuration. 665575SN/Asources = base_sources 673934SN/A 682968SN/Aif env['FULL_SYSTEM']: 693140SN/A sources += full_system_sources 705509SN/Aelse: 715509SN/A sources += syscall_emulation_sources 722968SN/A 734938SN/A# Convert file names to SCons File objects. This takes care of the 742968SN/A# path relative to the top of the directory tree. 758835SAli.Saidi@ARM.comsources = [File(s) for s in sources] 764463SN/A 774463SN/A# Add in files generated by the ISA description. 784463SN/Aisa_desc_files = env.ISADesc('isa/main.isa') 794463SN/A# Only non-header files need to be compiled. 804463SN/Aisa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')] 818983Snate@binkert.orgsources += isa_desc_sources 824463SN/A 834463SN/AReturn('sources') 846123SN/A