SConscript revision 7694
14202Sbinkertn@umich.edu# -*- mode:python -*-
24202Sbinkertn@umich.edu
34202Sbinkertn@umich.edu# Copyright (c) 2009 ARM Limited
44202Sbinkertn@umich.edu# All rights reserved.
54202Sbinkertn@umich.edu#
64202Sbinkertn@umich.edu# The license below extends only to copyright in the software and shall
74202Sbinkertn@umich.edu# not be construed as granting a license to any other intellectual
84202Sbinkertn@umich.edu# property including but not limited to intellectual property relating
94202Sbinkertn@umich.edu# to a hardware implementation of the functionality of the software
104202Sbinkertn@umich.edu# licensed hereunder.  You may use the software subject to the license
114202Sbinkertn@umich.edu# terms below provided that you ensure that this notice is replicated
124202Sbinkertn@umich.edu# unmodified and in its entirety in all distributions of the software,
134202Sbinkertn@umich.edu# modified or unmodified, in source code or in binary form.
144202Sbinkertn@umich.edu#
154202Sbinkertn@umich.edu# Copyright (c) 2007-2008 The Florida State University
164202Sbinkertn@umich.edu# All rights reserved.
174202Sbinkertn@umich.edu#
184202Sbinkertn@umich.edu# Redistribution and use in source and binary forms, with or without
194202Sbinkertn@umich.edu# modification, are permitted provided that the following conditions are
204202Sbinkertn@umich.edu# met: redistributions of source code must retain the above copyright
214202Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer;
224202Sbinkertn@umich.edu# redistributions in binary form must reproduce the above copyright
234202Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer in the
244202Sbinkertn@umich.edu# documentation and/or other materials provided with the distribution;
254202Sbinkertn@umich.edu# neither the name of the copyright holders nor the names of its
264202Sbinkertn@umich.edu# contributors may be used to endorse or promote products derived from
274202Sbinkertn@umich.edu# this software without specific prior written permission.
284202Sbinkertn@umich.edu#
294202Sbinkertn@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
304202Sbinkertn@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
314202Sbinkertn@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
324202Sbinkertn@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3310996Sandreas.sandberg@arm.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3410996Sandreas.sandberg@arm.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
359398Sandreas.hansson@arm.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
369850Sandreas.hansson@arm.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
379259SAli.Saidi@ARM.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
384486Sbinkertn@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3910146Sandreas.hansson@arm.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4010478SAndrew.Bardsley@arm.com#
4110478SAndrew.Bardsley@arm.com# Authors: Stephen Hines
426165Ssanchezd@stanford.edu#          Ali Saidi
439850Sandreas.hansson@arm.com
4410405Sandreas.hansson@arm.comImport('*')
456168Snate@binkert.org
469850Sandreas.hansson@arm.comif env['TARGET_ISA'] == 'arm':
479259SAli.Saidi@ARM.com# Workaround for bug in SCons version > 0.97d20071212
484202Sbinkertn@umich.edu# Scons bug id: 2006 M5 Bug id: 308 
4910405Sandreas.hansson@arm.com    Dir('isa/formats')
5010431SOmar.Naji@arm.com    Source('faults.cc')
5110146Sandreas.hansson@arm.com    Source('insts/macromem.cc')
5210478SAndrew.Bardsley@arm.com    Source('insts/mem.cc')
5310478SAndrew.Bardsley@arm.com    Source('insts/misc.cc')
544202Sbinkertn@umich.edu    Source('insts/pred_inst.cc')
558761Sgblack@eecs.umich.edu    Source('insts/static_inst.cc')
5610405Sandreas.hansson@arm.com    Source('insts/vfp.cc')
574202Sbinkertn@umich.edu    Source('isa.cc')
584202Sbinkertn@umich.edu    Source('miscregs.cc')
598914Sandreas.hansson@arm.com    Source('predecoder.cc')
6010405Sandreas.hansson@arm.com    Source('nativetrace.cc')
6110405Sandreas.hansson@arm.com    Source('tlb.cc')
6210405Sandreas.hansson@arm.com    Source('utility.cc')
6310405Sandreas.hansson@arm.com
6410614Skanishk.sugand@arm.com    SimObject('ArmNativeTrace.py')
654202Sbinkertn@umich.edu    SimObject('ArmTLB.py')
6610405Sandreas.hansson@arm.com
676168Snate@binkert.org    TraceFlag('Arm')
689850Sandreas.hansson@arm.com    TraceFlag('TLBVerbose')
699850Sandreas.hansson@arm.com    TraceFlag('Faults', "Trace Exceptions, interrupts, svc/swi")
709850Sandreas.hansson@arm.com    TraceFlag('Predecoder', "Instructions returned by the predecoder")
718763Sgblack@eecs.umich.edu    if env['FULL_SYSTEM']:
7210299Salexandru.dutu@amd.com        Source('interrupts.cc')
7310299Salexandru.dutu@amd.com        Source('stacktrace.cc')
747768SAli.Saidi@ARM.com        Source('system.cc')
7510131Sandreas.hansson@arm.com        Source('vtophys.cc')
7610131Sandreas.hansson@arm.com        Source('linux/system.cc')
7710131Sandreas.hansson@arm.com        Source('table_walker.cc')
7810131Sandreas.hansson@arm.com        
7910066Sandreas.hansson@arm.com        SimObject('ArmInterrupts.py')
8010612SMarco.Elver@ARM.com        SimObject('ArmSystem.py')
8110612SMarco.Elver@ARM.com    else:
8210612SMarco.Elver@ARM.com        Source('process.cc')
8310612SMarco.Elver@ARM.com        Source('linux/linux.cc')
8410405Sandreas.hansson@arm.com        Source('linux/process.cc')
8510405Sandreas.hansson@arm.com
8610405Sandreas.hansson@arm.com    # Add in files generated by the ISA description.
8710405Sandreas.hansson@arm.com    isa_desc_files = env.ISADesc('isa/main.isa')
8810399Sstephan.diestelhorst@arm.com    # Only non-header files need to be compiled.
8910405Sandreas.hansson@arm.com    for f in isa_desc_files:
9010405Sandreas.hansson@arm.com        if not f.path.endswith('.hh'):
919036Sandreas.hansson@arm.com            Source(f)
929164Sandreas.hansson@arm.com
938981Sandreas.hansson@arm.com