SConscript revision 7584
111106Spower.jg@gmail.com# -*- mode:python -*-
211106Spower.jg@gmail.com
311106Spower.jg@gmail.com# Copyright (c) 2009 ARM Limited
411106Spower.jg@gmail.com# All rights reserved.
511106Spower.jg@gmail.com#
611106Spower.jg@gmail.com# The license below extends only to copyright in the software and shall
711106Spower.jg@gmail.com# not be construed as granting a license to any other intellectual
811106Spower.jg@gmail.com# property including but not limited to intellectual property relating
911106Spower.jg@gmail.com# to a hardware implementation of the functionality of the software
1011106Spower.jg@gmail.com# licensed hereunder.  You may use the software subject to the license
1111106Spower.jg@gmail.com# terms below provided that you ensure that this notice is replicated
1211106Spower.jg@gmail.com# unmodified and in its entirety in all distributions of the software,
1311106Spower.jg@gmail.com# modified or unmodified, in source code or in binary form.
1411106Spower.jg@gmail.com#
1511106Spower.jg@gmail.com# Copyright (c) 2007-2008 The Florida State University
1611106Spower.jg@gmail.com# All rights reserved.
1711570SCurtis.Dunham@arm.com#
1811106Spower.jg@gmail.com# Redistribution and use in source and binary forms, with or without
1911312Santhony.gutierrez@amd.com# modification, are permitted provided that the following conditions are
2011106Spower.jg@gmail.com# met: redistributions of source code must retain the above copyright
2111106Spower.jg@gmail.com# notice, this list of conditions and the following disclaimer;
2211106Spower.jg@gmail.com# redistributions in binary form must reproduce the above copyright
2311106Spower.jg@gmail.com# notice, this list of conditions and the following disclaimer in the
2411106Spower.jg@gmail.com# documentation and/or other materials provided with the distribution;
2511106Spower.jg@gmail.com# neither the name of the copyright holders nor the names of its
2611680SCurtis.Dunham@arm.com# contributors may be used to endorse or promote products derived from
2711106Spower.jg@gmail.com# this software without specific prior written permission.
2811106Spower.jg@gmail.com#
2911219Snilay@cs.wisc.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3011106Spower.jg@gmail.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3111570SCurtis.Dunham@arm.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3211570SCurtis.Dunham@arm.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3311570SCurtis.Dunham@arm.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3411570SCurtis.Dunham@arm.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3511106Spower.jg@gmail.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3611106Spower.jg@gmail.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3711440SCurtis.Dunham@arm.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3811440SCurtis.Dunham@arm.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3911106Spower.jg@gmail.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4011106Spower.jg@gmail.com#
4111106Spower.jg@gmail.com# Authors: Stephen Hines
4211106Spower.jg@gmail.com#          Ali Saidi
4311106Spower.jg@gmail.com
4411106Spower.jg@gmail.comImport('*')
4511106Spower.jg@gmail.com
4611106Spower.jg@gmail.comif env['TARGET_ISA'] == 'arm':
4711106Spower.jg@gmail.com# Workaround for bug in SCons version > 0.97d20071212
4811106Spower.jg@gmail.com# Scons bug id: 2006 M5 Bug id: 308 
4911106Spower.jg@gmail.com    Dir('isa/formats')
5011106Spower.jg@gmail.com    Source('faults.cc')
5111106Spower.jg@gmail.com    Source('insts/macromem.cc')
5211106Spower.jg@gmail.com    Source('insts/mem.cc')
5311106Spower.jg@gmail.com    Source('insts/misc.cc')
5411106Spower.jg@gmail.com    Source('insts/pred_inst.cc')
5511106Spower.jg@gmail.com    Source('insts/static_inst.cc')
5611106Spower.jg@gmail.com    Source('insts/vfp.cc')
5711106Spower.jg@gmail.com    Source('isa.cc')
5811106Spower.jg@gmail.com    Source('miscregs.cc')
5911106Spower.jg@gmail.com    Source('predecoder.cc')
6011106Spower.jg@gmail.com    Source('nativetrace.cc')
6111106Spower.jg@gmail.com    Source('tlb.cc')
6211106Spower.jg@gmail.com    Source('vtophys.cc')
6311106Spower.jg@gmail.com    Source('utility.cc')
6411106Spower.jg@gmail.com
6511106Spower.jg@gmail.com    SimObject('ArmNativeTrace.py')
6611106Spower.jg@gmail.com    SimObject('ArmTLB.py')
6711106Spower.jg@gmail.com
6811106Spower.jg@gmail.com    TraceFlag('Arm')
6911570SCurtis.Dunham@arm.com    TraceFlag('TLBVerbose')
7011106Spower.jg@gmail.com    TraceFlag('Faults', "Trace Exceptions, interrupts, svc/swi")
7111106Spower.jg@gmail.com    TraceFlag('Predecoder', "Instructions returned by the predecoder")
7211106Spower.jg@gmail.com    if env['FULL_SYSTEM']:
7311106Spower.jg@gmail.com        Source('interrupts.cc')
7411106Spower.jg@gmail.com        Source('stacktrace.cc')
7511106Spower.jg@gmail.com        Source('system.cc')
7611106Spower.jg@gmail.com        Source('table_walker.cc')
7711106Spower.jg@gmail.com        
7811106Spower.jg@gmail.com        SimObject('ArmInterrupts.py')
7911106Spower.jg@gmail.com        SimObject('ArmSystem.py')
8011106Spower.jg@gmail.com    else:
8111106Spower.jg@gmail.com        Source('process.cc')
8211106Spower.jg@gmail.com        Source('linux/linux.cc')
8311106Spower.jg@gmail.com        Source('linux/process.cc')
8411106Spower.jg@gmail.com
8511570SCurtis.Dunham@arm.com    # Add in files generated by the ISA description.
8611570SCurtis.Dunham@arm.com    isa_desc_files = env.ISADesc('isa/main.isa')
8711570SCurtis.Dunham@arm.com    # Only non-header files need to be compiled.
8811570SCurtis.Dunham@arm.com    for f in isa_desc_files:
8911106Spower.jg@gmail.com        if not f.path.endswith('.hh'):
9011106Spower.jg@gmail.com            Source(f)
9111106Spower.jg@gmail.com
9211106Spower.jg@gmail.com