SConscript revision 6998
16019Shines@cs.fsu.edu# -*- mode:python -*-
26019Shines@cs.fsu.edu
36019Shines@cs.fsu.edu# Copyright (c) 2007-2008 The Florida State University
46757SAli.Saidi@ARM.com# Copyright (c) 2009 ARM Limited
56019Shines@cs.fsu.edu# All rights reserved.
66019Shines@cs.fsu.edu#
76019Shines@cs.fsu.edu# Redistribution and use in source and binary forms, with or without
86019Shines@cs.fsu.edu# modification, are permitted provided that the following conditions are
96019Shines@cs.fsu.edu# met: redistributions of source code must retain the above copyright
106019Shines@cs.fsu.edu# notice, this list of conditions and the following disclaimer;
116019Shines@cs.fsu.edu# redistributions in binary form must reproduce the above copyright
126019Shines@cs.fsu.edu# notice, this list of conditions and the following disclaimer in the
136019Shines@cs.fsu.edu# documentation and/or other materials provided with the distribution;
146019Shines@cs.fsu.edu# neither the name of the copyright holders nor the names of its
156019Shines@cs.fsu.edu# contributors may be used to endorse or promote products derived from
166019Shines@cs.fsu.edu# this software without specific prior written permission.
176019Shines@cs.fsu.edu#
186019Shines@cs.fsu.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
196019Shines@cs.fsu.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
206019Shines@cs.fsu.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
216019Shines@cs.fsu.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
226019Shines@cs.fsu.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
236019Shines@cs.fsu.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
246019Shines@cs.fsu.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
256019Shines@cs.fsu.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
266019Shines@cs.fsu.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
276019Shines@cs.fsu.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
286019Shines@cs.fsu.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
296019Shines@cs.fsu.edu#
306019Shines@cs.fsu.edu# Authors: Stephen Hines
316757SAli.Saidi@ARM.com#          Ali Saidi
326019Shines@cs.fsu.edu
336019Shines@cs.fsu.eduImport('*')
346019Shines@cs.fsu.edu
356019Shines@cs.fsu.eduif env['TARGET_ISA'] == 'arm':
366019Shines@cs.fsu.edu# Workaround for bug in SCons version > 0.97d20071212
376019Shines@cs.fsu.edu# Scons bug id: 2006 M5 Bug id: 308 
386019Shines@cs.fsu.edu    Dir('isa/formats')
396019Shines@cs.fsu.edu    Source('faults.cc')
406253Sgblack@eecs.umich.edu    Source('insts/branch.cc')
416253Sgblack@eecs.umich.edu    Source('insts/mem.cc')
426253Sgblack@eecs.umich.edu    Source('insts/pred_inst.cc')
436253Sgblack@eecs.umich.edu    Source('insts/static_inst.cc')
446397Sgblack@eecs.umich.edu    Source('nativetrace.cc')
456019Shines@cs.fsu.edu    Source('pagetable.cc')
466019Shines@cs.fsu.edu    Source('tlb.cc')
476019Shines@cs.fsu.edu    Source('vtophys.cc')
486757SAli.Saidi@ARM.com    Source('utility.cc')
496019Shines@cs.fsu.edu
506397Sgblack@eecs.umich.edu    SimObject('ArmNativeTrace.py')
516019Shines@cs.fsu.edu    SimObject('ArmTLB.py')
526397Sgblack@eecs.umich.edu
536019Shines@cs.fsu.edu    TraceFlag('Arm')
546735Sgblack@eecs.umich.edu    TraceFlag('Faults', "Trace Exceptions, interrupts, svc/swi")
556019Shines@cs.fsu.edu    if env['FULL_SYSTEM']:
566757SAli.Saidi@ARM.com        Source('interrupts.cc')
576757SAli.Saidi@ARM.com        Source('stacktrace.cc')
586757SAli.Saidi@ARM.com        Source('system.cc')
596757SAli.Saidi@ARM.com        
606757SAli.Saidi@ARM.com        SimObject('ArmInterrupts.py')
616757SAli.Saidi@ARM.com        SimObject('ArmSystem.py')
626019Shines@cs.fsu.edu    else:
636019Shines@cs.fsu.edu        Source('process.cc')
646019Shines@cs.fsu.edu        Source('linux/linux.cc')
656019Shines@cs.fsu.edu        Source('linux/process.cc')
666019Shines@cs.fsu.edu
676019Shines@cs.fsu.edu    # Add in files generated by the ISA description.
686019Shines@cs.fsu.edu    isa_desc_files = env.ISADesc('isa/main.isa')
696019Shines@cs.fsu.edu    # Only non-header files need to be compiled.
706019Shines@cs.fsu.edu    for f in isa_desc_files:
716019Shines@cs.fsu.edu        if not f.path.endswith('.hh'):
726019Shines@cs.fsu.edu            Source(f)
736019Shines@cs.fsu.edu
74