SConscript revision 10037:5cac77888310
110461SAndreas.Sandberg@ARM.com# -*- mode:python -*-
213637Sruben.ayrapetyan@arm.com
310461SAndreas.Sandberg@ARM.com# Copyright (c) 2009, 2012-2013 ARM Limited
410461SAndreas.Sandberg@ARM.com# All rights reserved.
510461SAndreas.Sandberg@ARM.com#
610461SAndreas.Sandberg@ARM.com# The license below extends only to copyright in the software and shall
710461SAndreas.Sandberg@ARM.com# not be construed as granting a license to any other intellectual
810461SAndreas.Sandberg@ARM.com# property including but not limited to intellectual property relating
910461SAndreas.Sandberg@ARM.com# to a hardware implementation of the functionality of the software
1010461SAndreas.Sandberg@ARM.com# licensed hereunder.  You may use the software subject to the license
1110461SAndreas.Sandberg@ARM.com# terms below provided that you ensure that this notice is replicated
1210461SAndreas.Sandberg@ARM.com# unmodified and in its entirety in all distributions of the software,
1310461SAndreas.Sandberg@ARM.com# modified or unmodified, in source code or in binary form.
1410461SAndreas.Sandberg@ARM.com#
1510461SAndreas.Sandberg@ARM.com# Copyright (c) 2007-2008 The Florida State University
1610461SAndreas.Sandberg@ARM.com# All rights reserved.
1710461SAndreas.Sandberg@ARM.com#
1810461SAndreas.Sandberg@ARM.com# Redistribution and use in source and binary forms, with or without
1910461SAndreas.Sandberg@ARM.com# modification, are permitted provided that the following conditions are
2010461SAndreas.Sandberg@ARM.com# met: redistributions of source code must retain the above copyright
2110461SAndreas.Sandberg@ARM.com# notice, this list of conditions and the following disclaimer;
2210461SAndreas.Sandberg@ARM.com# redistributions in binary form must reproduce the above copyright
2310461SAndreas.Sandberg@ARM.com# notice, this list of conditions and the following disclaimer in the
2410461SAndreas.Sandberg@ARM.com# documentation and/or other materials provided with the distribution;
2510461SAndreas.Sandberg@ARM.com# neither the name of the copyright holders nor the names of its
2610461SAndreas.Sandberg@ARM.com# contributors may be used to endorse or promote products derived from
2710461SAndreas.Sandberg@ARM.com# this software without specific prior written permission.
2810461SAndreas.Sandberg@ARM.com#
2910461SAndreas.Sandberg@ARM.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3010461SAndreas.Sandberg@ARM.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3110461SAndreas.Sandberg@ARM.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3210461SAndreas.Sandberg@ARM.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3310461SAndreas.Sandberg@ARM.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3410461SAndreas.Sandberg@ARM.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3510461SAndreas.Sandberg@ARM.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3610461SAndreas.Sandberg@ARM.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3710461SAndreas.Sandberg@ARM.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3810461SAndreas.Sandberg@ARM.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3910461SAndreas.Sandberg@ARM.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4012286Sjose.marinho@arm.com#
4110461SAndreas.Sandberg@ARM.com# Authors: Stephen Hines
4210461SAndreas.Sandberg@ARM.com#          Ali Saidi
4310461SAndreas.Sandberg@ARM.com
4410461SAndreas.Sandberg@ARM.comImport('*')
4510609Sandreas.sandberg@arm.com
4610609Sandreas.sandberg@arm.comif env['TARGET_ISA'] == 'arm':
4710461SAndreas.Sandberg@ARM.com# Workaround for bug in SCons version > 0.97d20071212
4810461SAndreas.Sandberg@ARM.com# Scons bug id: 2006 M5 Bug id: 308 
4910461SAndreas.Sandberg@ARM.com    Dir('isa/formats')
5010461SAndreas.Sandberg@ARM.com    Source('decoder.cc')
5110461SAndreas.Sandberg@ARM.com    Source('faults.cc')
5212286Sjose.marinho@arm.com    Source('insts/branch64.cc')
5310461SAndreas.Sandberg@ARM.com    Source('insts/data64.cc')
5410461SAndreas.Sandberg@ARM.com    Source('insts/macromem.cc')
5510461SAndreas.Sandberg@ARM.com    Source('insts/mem.cc')
5610461SAndreas.Sandberg@ARM.com    Source('insts/mem64.cc')
5713581Sgabeblack@google.com    Source('insts/misc.cc')
5810461SAndreas.Sandberg@ARM.com    Source('insts/misc64.cc')
5910461SAndreas.Sandberg@ARM.com    Source('insts/pred_inst.cc')
6010461SAndreas.Sandberg@ARM.com    Source('insts/static_inst.cc')
6110461SAndreas.Sandberg@ARM.com    Source('insts/vfp.cc')
6210461SAndreas.Sandberg@ARM.com    Source('insts/fplib.cc')
6312117Sjose.marinho@arm.com    Source('interrupts.cc')
6410461SAndreas.Sandberg@ARM.com    Source('isa.cc')
6512286Sjose.marinho@arm.com    Source('linux/linux.cc')
6612286Sjose.marinho@arm.com    Source('linux/process.cc')
6712286Sjose.marinho@arm.com    Source('linux/system.cc')
6812286Sjose.marinho@arm.com    Source('miscregs.cc')
6910461SAndreas.Sandberg@ARM.com    Source('nativetrace.cc')
7013638Sgiacomo.travaglini@arm.com    Source('process.cc')
7110461SAndreas.Sandberg@ARM.com    Source('remote_gdb.cc')
7210461SAndreas.Sandberg@ARM.com    Source('stacktrace.cc')
7310461SAndreas.Sandberg@ARM.com    Source('system.cc')
7412286Sjose.marinho@arm.com    Source('table_walker.cc')
7510461SAndreas.Sandberg@ARM.com    Source('stage2_mmu.cc')
7612286Sjose.marinho@arm.com    Source('stage2_lookup.cc')
7710461SAndreas.Sandberg@ARM.com    Source('tlb.cc')
7810461SAndreas.Sandberg@ARM.com    Source('utility.cc')
7913638Sgiacomo.travaglini@arm.com    Source('vtophys.cc')
8012973Sandreas.sandberg@arm.com
8112973Sandreas.sandberg@arm.com    SimObject('ArmInterrupts.py')
8210461SAndreas.Sandberg@ARM.com    SimObject('ArmISA.py')
8310461SAndreas.Sandberg@ARM.com    SimObject('ArmNativeTrace.py')
8410461SAndreas.Sandberg@ARM.com    SimObject('ArmSystem.py')
8510461SAndreas.Sandberg@ARM.com    SimObject('ArmTLB.py')
8610461SAndreas.Sandberg@ARM.com
8710461SAndreas.Sandberg@ARM.com    DebugFlag('Arm')
8810461SAndreas.Sandberg@ARM.com    DebugFlag('Decoder', "Instructions returned by the predecoder")
8910461SAndreas.Sandberg@ARM.com    DebugFlag('Faults', "Trace Exceptions, interrupts, svc/swi")
9010461SAndreas.Sandberg@ARM.com    DebugFlag('TLBVerbose')
9110461SAndreas.Sandberg@ARM.com
9210461SAndreas.Sandberg@ARM.com    # Add in files generated by the ISA description.
9310461SAndreas.Sandberg@ARM.com    isa_desc_files = env.ISADesc('isa/main.isa')
9410461SAndreas.Sandberg@ARM.com    # Only non-header files need to be compiled.
9510461SAndreas.Sandberg@ARM.com    for f in isa_desc_files:
9610461SAndreas.Sandberg@ARM.com        if not f.path.endswith('.hh'):
9712973Sandreas.sandberg@arm.com            Source(f)
9812973Sandreas.sandberg@arm.com
9912973Sandreas.sandberg@arm.com