SConscript revision 4130
17008Snate@binkert.org# -*- mode:python -*- 27008Snate@binkert.org 37008Snate@binkert.org# Copyright (c) 2006 The Regents of The University of Michigan 47008Snate@binkert.org# All rights reserved. 57008Snate@binkert.org# 67008Snate@binkert.org# Redistribution and use in source and binary forms, with or without 77008Snate@binkert.org# modification, are permitted provided that the following conditions are 87008Snate@binkert.org# met: redistributions of source code must retain the above copyright 97008Snate@binkert.org# notice, this list of conditions and the following disclaimer; 107008Snate@binkert.org# redistributions in binary form must reproduce the above copyright 117008Snate@binkert.org# notice, this list of conditions and the following disclaimer in the 127008Snate@binkert.org# documentation and/or other materials provided with the distribution; 137008Snate@binkert.org# neither the name of the copyright holders nor the names of its 147008Snate@binkert.org# contributors may be used to endorse or promote products derived from 157008Snate@binkert.org# this software without specific prior written permission. 167008Snate@binkert.org# 177008Snate@binkert.org# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 187008Snate@binkert.org# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 197008Snate@binkert.org# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 207008Snate@binkert.org# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 217008Snate@binkert.org# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 227008Snate@binkert.org# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 237008Snate@binkert.org# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 247008Snate@binkert.org# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 257008Snate@binkert.org# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 267008Snate@binkert.org# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 277008Snate@binkert.org# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 286285Snate@binkert.org# 297039Snate@binkert.org# Authors: Steve Reinhardt 307039Snate@binkert.org# Gabe Black 316285Snate@binkert.org 327055Snate@binkert.orgimport os.path, sys 337055Snate@binkert.org 346876Ssteve.reinhardt@amd.com# Import build environment variable from SConstruct. 359745Snilay@cs.wisc.eduImport('env') 368341Snilay@cs.wisc.edu 376506Spdudnik@gmail.com# Right now there are no source files immediately in this directory 387055Snate@binkert.orgsources = [] 398436SBrad.Beckmann@amd.com 409497Snilay@cs.wisc.edu# 4110301Snilay@cs.wisc.edu# Now include other ISA-specific sources from the ISA subdirectories. 4210301Snilay@cs.wisc.edu# 436881SBrad.Beckmann@amd.com 4410301Snilay@cs.wisc.eduisa = env['TARGET_ISA'] # someday this may be a list of ISAs 459364Snilay@cs.wisc.edu 467055Snate@binkert.org# 479465Snilay@cs.wisc.edu# These source files can be used by any architecture 486285Snate@binkert.org# 496285Snate@binkert.org 506285Snate@binkert.orgsources += Split(''' 519465Snilay@cs.wisc.edu baddev.cc 527039Snate@binkert.org disk_image.cc 537039Snate@binkert.org etherbus.cc 546876Ssteve.reinhardt@amd.com etherdump.cc 558436SBrad.Beckmann@amd.com etherint.cc 569496Snilay@cs.wisc.edu etherlink.cc 578257SBrad.Beckmann@amd.com etherpkt.cc 589745Snilay@cs.wisc.edu ethertap.cc 5910078Snilay@cs.wisc.edu ide_ctrl.cc 6010078Snilay@cs.wisc.edu ide_disk.cc 6110078Snilay@cs.wisc.edu io_device.cc 629819Snilay@cs.wisc.edu isa_fake.cc 639819Snilay@cs.wisc.edu ns_gige.cc 649819Snilay@cs.wisc.edu pciconfigall.cc 659819Snilay@cs.wisc.edu pcidev.cc 669819Snilay@cs.wisc.edu pktfifo.cc 679819Snilay@cs.wisc.edu platform.cc 687039Snate@binkert.org simconsole.cc 698531Snilay@cs.wisc.edu simple_disk.cc 706285Snate@binkert.org ''') 717055Snate@binkert.org 727039Snate@binkert.org# Let the target architecture define what additional sources it needs 7310012Snilay@cs.wisc.edusources += SConscript(os.path.join(isa, 'SConscript'), exports = 'env') 7410012Snilay@cs.wisc.edu 759745Snilay@cs.wisc.edu# Convert file names to SCons File objects. This takes care of the 768683Snilay@cs.wisc.edu# path relative to the top of the directory tree. 778683Snilay@cs.wisc.edusources = [File(s) for s in sources] 789302Snilay@cs.wisc.edu 799302Snilay@cs.wisc.eduReturn('sources') 809302Snilay@cs.wisc.edu