SConscript revision 7694
12929Sktlim@umich.edu# -*- mode:python -*-
22929Sktlim@umich.edu
32932Sktlim@umich.edu# Copyright (c) 2009 ARM Limited
42929Sktlim@umich.edu# All rights reserved.
52929Sktlim@umich.edu#
62929Sktlim@umich.edu# The license below extends only to copyright in the software and shall
72929Sktlim@umich.edu# not be construed as granting a license to any other intellectual
82929Sktlim@umich.edu# property including but not limited to intellectual property relating
92929Sktlim@umich.edu# to a hardware implementation of the functionality of the software
102929Sktlim@umich.edu# licensed hereunder.  You may use the software subject to the license
112929Sktlim@umich.edu# terms below provided that you ensure that this notice is replicated
122929Sktlim@umich.edu# unmodified and in its entirety in all distributions of the software,
132929Sktlim@umich.edu# modified or unmodified, in source code or in binary form.
142929Sktlim@umich.edu#
152929Sktlim@umich.edu# Copyright (c) 2007-2008 The Florida State University
162929Sktlim@umich.edu# All rights reserved.
172929Sktlim@umich.edu#
182929Sktlim@umich.edu# Redistribution and use in source and binary forms, with or without
192929Sktlim@umich.edu# modification, are permitted provided that the following conditions are
202929Sktlim@umich.edu# met: redistributions of source code must retain the above copyright
212929Sktlim@umich.edu# notice, this list of conditions and the following disclaimer;
222929Sktlim@umich.edu# redistributions in binary form must reproduce the above copyright
232929Sktlim@umich.edu# notice, this list of conditions and the following disclaimer in the
242929Sktlim@umich.edu# documentation and/or other materials provided with the distribution;
252929Sktlim@umich.edu# neither the name of the copyright holders nor the names of its
262929Sktlim@umich.edu# contributors may be used to endorse or promote products derived from
272929Sktlim@umich.edu# this software without specific prior written permission.
282932Sktlim@umich.edu#
292932Sktlim@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
302932Sktlim@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
312929Sktlim@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
326007Ssteve.reinhardt@amd.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
337735SAli.Saidi@ARM.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
342929Sktlim@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
352929Sktlim@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
362929Sktlim@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
372929Sktlim@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
382929Sktlim@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
392929Sktlim@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
402929Sktlim@umich.edu#
418947Sandreas.hansson@arm.com# Authors: Stephen Hines
428947Sandreas.hansson@arm.com#          Ali Saidi
438947Sandreas.hansson@arm.com
442929Sktlim@umich.eduImport('*')
452929Sktlim@umich.edu
462929Sktlim@umich.eduif env['TARGET_ISA'] == 'arm':
472929Sktlim@umich.edu# Workaround for bug in SCons version > 0.97d20071212
482929Sktlim@umich.edu# Scons bug id: 2006 M5 Bug id: 308 
492929Sktlim@umich.edu    Dir('isa/formats')
506007Ssteve.reinhardt@amd.com    Source('faults.cc')
516007Ssteve.reinhardt@amd.com    Source('insts/macromem.cc')
526007Ssteve.reinhardt@amd.com    Source('insts/mem.cc')
536007Ssteve.reinhardt@amd.com    Source('insts/misc.cc')
546007Ssteve.reinhardt@amd.com    Source('insts/pred_inst.cc')
556007Ssteve.reinhardt@amd.com    Source('insts/static_inst.cc')
566007Ssteve.reinhardt@amd.com    Source('insts/vfp.cc')
576007Ssteve.reinhardt@amd.com    Source('isa.cc')
586007Ssteve.reinhardt@amd.com    Source('miscregs.cc')
596007Ssteve.reinhardt@amd.com    Source('predecoder.cc')
606007Ssteve.reinhardt@amd.com    Source('nativetrace.cc')
616007Ssteve.reinhardt@amd.com    Source('tlb.cc')
626007Ssteve.reinhardt@amd.com    Source('utility.cc')
636007Ssteve.reinhardt@amd.com
646007Ssteve.reinhardt@amd.com    SimObject('ArmNativeTrace.py')
656007Ssteve.reinhardt@amd.com    SimObject('ArmTLB.py')
669435SAndreas.Sandberg@ARM.com
679435SAndreas.Sandberg@ARM.com    TraceFlag('Arm')
689435SAndreas.Sandberg@ARM.com    TraceFlag('TLBVerbose')
696007Ssteve.reinhardt@amd.com    TraceFlag('Faults', "Trace Exceptions, interrupts, svc/swi")
706007Ssteve.reinhardt@amd.com    TraceFlag('Predecoder', "Instructions returned by the predecoder")
716007Ssteve.reinhardt@amd.com    if env['FULL_SYSTEM']:
726007Ssteve.reinhardt@amd.com        Source('interrupts.cc')
736007Ssteve.reinhardt@amd.com        Source('stacktrace.cc')
746007Ssteve.reinhardt@amd.com        Source('system.cc')
756007Ssteve.reinhardt@amd.com        Source('vtophys.cc')
766007Ssteve.reinhardt@amd.com        Source('linux/system.cc')
776007Ssteve.reinhardt@amd.com        Source('table_walker.cc')
786007Ssteve.reinhardt@amd.com        
792929Sktlim@umich.edu        SimObject('ArmInterrupts.py')
802929Sktlim@umich.edu        SimObject('ArmSystem.py')
812929Sktlim@umich.edu    else:
826007Ssteve.reinhardt@amd.com        Source('process.cc')
836007Ssteve.reinhardt@amd.com        Source('linux/linux.cc')
846007Ssteve.reinhardt@amd.com        Source('linux/process.cc')
859781Sandreas.hansson@arm.com
866007Ssteve.reinhardt@amd.com    # Add in files generated by the ISA description.
876007Ssteve.reinhardt@amd.com    isa_desc_files = env.ISADesc('isa/main.isa')
882929Sktlim@umich.edu    # Only non-header files need to be compiled.
892929Sktlim@umich.edu    for f in isa_desc_files:
902929Sktlim@umich.edu        if not f.path.endswith('.hh'):
912929Sktlim@umich.edu            Source(f)
922929Sktlim@umich.edu
936011Ssteve.reinhardt@amd.com