SConscript revision 3534
13534Sgblack@eecs.umich.edu# -*- mode:python -*-
23534Sgblack@eecs.umich.edu
33534Sgblack@eecs.umich.edu# Copyright (c) 2006 The Regents of The University of Michigan
43534Sgblack@eecs.umich.edu# All rights reserved.
53534Sgblack@eecs.umich.edu#
63534Sgblack@eecs.umich.edu# Redistribution and use in source and binary forms, with or without
73534Sgblack@eecs.umich.edu# modification, are permitted provided that the following conditions are
83534Sgblack@eecs.umich.edu# met: redistributions of source code must retain the above copyright
93534Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer;
103534Sgblack@eecs.umich.edu# redistributions in binary form must reproduce the above copyright
113534Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer in the
123534Sgblack@eecs.umich.edu# documentation and/or other materials provided with the distribution;
133534Sgblack@eecs.umich.edu# neither the name of the copyright holders nor the names of its
143534Sgblack@eecs.umich.edu# contributors may be used to endorse or promote products derived from
153534Sgblack@eecs.umich.edu# this software without specific prior written permission.
163534Sgblack@eecs.umich.edu#
173534Sgblack@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
183534Sgblack@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
193534Sgblack@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
203534Sgblack@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
213534Sgblack@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
223534Sgblack@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
233534Sgblack@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
243534Sgblack@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
253534Sgblack@eecs.umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
263534Sgblack@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
273534Sgblack@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
283534Sgblack@eecs.umich.edu#
293534Sgblack@eecs.umich.edu# Authors: Steve Reinhardt
303534Sgblack@eecs.umich.edu#          Gabe Black
313534Sgblack@eecs.umich.edu
323534Sgblack@eecs.umich.eduimport os.path, sys
333534Sgblack@eecs.umich.edu
343534Sgblack@eecs.umich.edu# Import build environment variable from SConstruct.
353534Sgblack@eecs.umich.eduImport('env')
363534Sgblack@eecs.umich.edu
373534Sgblack@eecs.umich.edu# Right now there are no source files immediately in this directory
383534Sgblack@eecs.umich.edusources = []
393534Sgblack@eecs.umich.edu
403534Sgblack@eecs.umich.edu#
413534Sgblack@eecs.umich.edu# Now include other ISA-specific sources from the ISA subdirectories.
423534Sgblack@eecs.umich.edu#
433534Sgblack@eecs.umich.edu
443534Sgblack@eecs.umich.eduisa = env['TARGET_ISA'] # someday this may be a list of ISAs
453534Sgblack@eecs.umich.edu
463534Sgblack@eecs.umich.edu#
473534Sgblack@eecs.umich.edu# These source files can be used by any architecture
483534Sgblack@eecs.umich.edu#
493534Sgblack@eecs.umich.edu
503534Sgblack@eecs.umich.edusources += Split('''
513534Sgblack@eecs.umich.edu	baddev.cc
523534Sgblack@eecs.umich.edu	disk_image.cc
533534Sgblack@eecs.umich.edu	etherbus.cc
543534Sgblack@eecs.umich.edu	etherdump.cc
553534Sgblack@eecs.umich.edu	etherint.cc
563534Sgblack@eecs.umich.edu	etherlink.cc
573534Sgblack@eecs.umich.edu	etherpkt.cc
583534Sgblack@eecs.umich.edu	ethertap.cc	
593534Sgblack@eecs.umich.edu        ide_ctrl.cc
603534Sgblack@eecs.umich.edu	ide_disk.cc
613534Sgblack@eecs.umich.edu	io_device.cc
623534Sgblack@eecs.umich.edu	isa_fake.cc
633534Sgblack@eecs.umich.edu	ns_gige.cc
643534Sgblack@eecs.umich.edu	pciconfigall.cc
653534Sgblack@eecs.umich.edu	pcidev.cc
663534Sgblack@eecs.umich.edu	pcifake.cc
673534Sgblack@eecs.umich.edu	pktfifo.cc
683534Sgblack@eecs.umich.edu	platform.cc
693534Sgblack@eecs.umich.edu        simconsole.cc
703534Sgblack@eecs.umich.edu	simple_disk.cc
713534Sgblack@eecs.umich.edu	tsunami.cc
723534Sgblack@eecs.umich.edu	tsunami_cchip.cc
733534Sgblack@eecs.umich.edu	tsunami_io.cc
743534Sgblack@eecs.umich.edu	tsunami_fake.cc
753534Sgblack@eecs.umich.edu	tsunami_pchip.cc
763534Sgblack@eecs.umich.edu	''')
773534Sgblack@eecs.umich.edu
783534Sgblack@eecs.umich.edu# Let the target architecture define what additional sources it needs
793534Sgblack@eecs.umich.edusources += SConscript(os.path.join(isa, 'SConscript'), exports = 'env')
803534Sgblack@eecs.umich.edu
813534Sgblack@eecs.umich.edu# Convert file names to SCons File objects.  This takes care of the
823534Sgblack@eecs.umich.edu# path relative to the top of the directory tree.
833534Sgblack@eecs.umich.edusources = [File(s) for s in sources]
843534Sgblack@eecs.umich.edu
853534Sgblack@eecs.umich.eduReturn('sources')
86