SConscript revision 8757
112771Sqtt2@cornell.edu# -*- mode:python -*-
212771Sqtt2@cornell.edu
312771Sqtt2@cornell.edu# Copyright (c) 2009 ARM Limited
412771Sqtt2@cornell.edu# All rights reserved.
512771Sqtt2@cornell.edu#
612771Sqtt2@cornell.edu# The license below extends only to copyright in the software and shall
712771Sqtt2@cornell.edu# not be construed as granting a license to any other intellectual
812771Sqtt2@cornell.edu# property including but not limited to intellectual property relating
912771Sqtt2@cornell.edu# to a hardware implementation of the functionality of the software
1012771Sqtt2@cornell.edu# licensed hereunder.  You may use the software subject to the license
1112771Sqtt2@cornell.edu# terms below provided that you ensure that this notice is replicated
1212771Sqtt2@cornell.edu# unmodified and in its entirety in all distributions of the software,
1312771Sqtt2@cornell.edu# modified or unmodified, in source code or in binary form.
1412771Sqtt2@cornell.edu#
1512771Sqtt2@cornell.edu# Copyright (c) 2007-2008 The Florida State University
1612771Sqtt2@cornell.edu# All rights reserved.
1712771Sqtt2@cornell.edu#
1812771Sqtt2@cornell.edu# Redistribution and use in source and binary forms, with or without
1912771Sqtt2@cornell.edu# modification, are permitted provided that the following conditions are
2012771Sqtt2@cornell.edu# met: redistributions of source code must retain the above copyright
2112771Sqtt2@cornell.edu# notice, this list of conditions and the following disclaimer;
2212771Sqtt2@cornell.edu# redistributions in binary form must reproduce the above copyright
2312771Sqtt2@cornell.edu# notice, this list of conditions and the following disclaimer in the
2412771Sqtt2@cornell.edu# documentation and/or other materials provided with the distribution;
2512771Sqtt2@cornell.edu# neither the name of the copyright holders nor the names of its
2612771Sqtt2@cornell.edu# contributors may be used to endorse or promote products derived from
2712771Sqtt2@cornell.edu# this software without specific prior written permission.
2812771Sqtt2@cornell.edu#
2912771Sqtt2@cornell.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
3012771Sqtt2@cornell.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
3112771Sqtt2@cornell.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
3212771Sqtt2@cornell.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
3312771Sqtt2@cornell.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
3412771Sqtt2@cornell.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
3512771Sqtt2@cornell.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
3612771Sqtt2@cornell.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
3712771Sqtt2@cornell.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
3812771Sqtt2@cornell.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
3912771Sqtt2@cornell.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
4012771Sqtt2@cornell.edu#
4112771Sqtt2@cornell.edu# Authors: Stephen Hines
4212771Sqtt2@cornell.edu#          Ali Saidi
43
44Import('*')
45
46if env['TARGET_ISA'] == 'arm':
47# Workaround for bug in SCons version > 0.97d20071212
48# Scons bug id: 2006 M5 Bug id: 308 
49    Dir('isa/formats')
50    Source('faults.cc')
51    Source('insts/macromem.cc')
52    Source('insts/mem.cc')
53    Source('insts/misc.cc')
54    Source('insts/pred_inst.cc')
55    Source('insts/static_inst.cc')
56    Source('insts/vfp.cc')
57    Source('interrupts.cc')
58    Source('isa.cc')
59    Source('miscregs.cc')
60    Source('nativetrace.cc')
61    Source('predecoder.cc')
62    Source('remote_gdb.cc')
63    Source('table_walker.cc')
64    Source('tlb.cc')
65    Source('utility.cc')
66    Source('vtophys.cc')
67
68    SimObject('ArmInterrupts.py')
69    SimObject('ArmNativeTrace.py')
70    SimObject('ArmTLB.py')
71
72    DebugFlag('Arm')
73    DebugFlag('TLBVerbose')
74    DebugFlag('Faults', "Trace Exceptions, interrupts, svc/swi")
75    DebugFlag('Predecoder', "Instructions returned by the predecoder")
76    if env['FULL_SYSTEM']:
77        Source('stacktrace.cc')
78        Source('system.cc')
79        Source('linux/system.cc')
80        
81        SimObject('ArmSystem.py')
82    else:
83        Source('process.cc')
84        Source('linux/linux.cc')
85        Source('linux/process.cc')
86
87    # Add in files generated by the ISA description.
88    isa_desc_files = env.ISADesc('isa/main.isa')
89    # Only non-header files need to be compiled.
90    for f in isa_desc_files:
91        if not f.path.endswith('.hh'):
92            Source(f)
93
94