SConscript revision 2766
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 339850Sandreas.hansson@arm.comimport os 349850Sandreas.hansson@arm.comimport sys 359850Sandreas.hansson@arm.comfrom os.path import isdir 367768SAli.Saidi@ARM.com 377768SAli.Saidi@ARM.com# Import build environment variable from SConstruct. 3810695SAli.Saidi@ARM.comImport('env') 3910695SAli.Saidi@ARM.com 4010695SAli.Saidi@ARM.com################################################### 4110695SAli.Saidi@ARM.com# 4210695SAli.Saidi@ARM.com# Define needed sources. 438887Sgeoffrey.blake@arm.com# 442766Sktlim@umich.edu################################################### 454486Sbinkertn@umich.edu 4610663SAli.Saidi@ARM.com# Base sources used by all configurations. 474486Sbinkertn@umich.edubase_sources = Split(''' 488739Sgblack@eecs.umich.edu faults.cc 4910259SAndrew.Bardsley@arm.com isa_traits.cc 504486Sbinkertn@umich.edu utility.cc 514202Sbinkertn@umich.edu ''') 524202Sbinkertn@umich.edu 534202Sbinkertn@umich.edu# Full-system sources 544202Sbinkertn@umich.edufull_system_sources = Split(''' 5510319SAndreas.Sandberg@ARM.com #Insert Full-System Files Here 564202Sbinkertn@umich.edu ''') 574776Sgblack@eecs.umich.edu 588739Sgblack@eecs.umich.edu# Syscall emulation (non-full-system) sources 596365Sgblack@eecs.umich.edusyscall_emulation_sources = Split(''' 604202Sbinkertn@umich.edu linux/linux.cc 618777Sgblack@eecs.umich.edu linux/process.cc 624202Sbinkertn@umich.edu process.cc 639913Ssteve.reinhardt@amd.com ''') 644202Sbinkertn@umich.edu 654202Sbinkertn@umich.edu# Set up complete list of sources based on configuration. 665217Ssaidi@eecs.umich.edusources = base_sources 674202Sbinkertn@umich.edu 6810259SAndrew.Bardsley@arm.comif env['FULL_SYSTEM']: 692155SN/A sources += full_system_sources 708887Sgeoffrey.blake@arm.comelse: 7110201SAndrew.Bardsley@arm.com sources += syscall_emulation_sources 728887Sgeoffrey.blake@arm.com 739340SAndreas.Sandberg@arm.com# Convert file names to SCons File objects. This takes care of the 748887Sgeoffrey.blake@arm.com# path relative to the top of the directory tree. 755192Ssaidi@eecs.umich.edusources = [File(s) for s in sources] 768335Snate@binkert.org 778335Snate@binkert.org# Add in files generated by the ISA description. 788335Snate@binkert.orgisa_desc_files = env.ISADesc('isa/main.isa') 798335Snate@binkert.org# Only non-header files need to be compiled. 808335Snate@binkert.orgisa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')] 819534SAndreas.Sandberg@ARM.comsources += isa_desc_sources 829534SAndreas.Sandberg@ARM.com 839534SAndreas.Sandberg@ARM.comReturn('sources') 848335Snate@binkert.org