SConscript revision 3806
12086SN/A# -*- mode:python -*-
22086SN/A
32086SN/A# Copyright (c) 2006 The Regents of The University of Michigan
42086SN/A# All rights reserved.
52086SN/A#
62086SN/A# Redistribution and use in source and binary forms, with or without
72086SN/A# modification, are permitted provided that the following conditions are
82086SN/A# met: redistributions of source code must retain the above copyright
92086SN/A# notice, this list of conditions and the following disclaimer;
102086SN/A# redistributions in binary form must reproduce the above copyright
112086SN/A# notice, this list of conditions and the following disclaimer in the
122086SN/A# documentation and/or other materials provided with the distribution;
132086SN/A# neither the name of the copyright holders nor the names of its
142086SN/A# contributors may be used to endorse or promote products derived from
152086SN/A# this software without specific prior written permission.
162086SN/A#
172086SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
182086SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
192086SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
202086SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
212086SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
222086SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
232086SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
242086SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
252086SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
262086SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
272086SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282665Ssaidi@eecs.umich.edu#
292665Ssaidi@eecs.umich.edu# Authors: Korey Sewell
302665Ssaidi@eecs.umich.edu
312686Sksewell@umich.eduimport os
322086SN/Aimport os.path
332086SN/Aimport sys
342086SN/A
352086SN/A# Import build environment variable from SConstruct.
362086SN/AImport('env')
372086SN/A
382086SN/A
392086SN/A#################################################################
402086SN/A#
412086SN/A# Include ISA-specific files for the O3 CPU-model
422086SN/A#
432086SN/A#################################################################
442086SN/A
452086SN/Asources = []
462086SN/A
472152SN/Aif env['TARGET_ISA'] == 'alpha':
482152SN/A    sources += Split('''
492152SN/A        alpha/dyn_inst.cc
502686Sksewell@umich.edu        alpha/cpu.cc
512086SN/A        alpha/thread_context.cc
522086SN/A        alpha/cpu_builder.cc
532086SN/A        ''')
542152SN/Aelif env['TARGET_ISA'] == 'mips':
552745Sksewell@umich.edu    sources += Split('''
562086SN/A        mips/dyn_inst.cc
572086SN/A        mips/cpu.cc
582086SN/A        mips/thread_context.cc
592152SN/A        mips/cpu_builder.cc
602597SN/A        ''')
612597SN/Aelif env['TARGET_ISA'] == 'sparc':
622447SN/A    sources += Split('''
632086SN/A        sparc/dyn_inst.cc
642086SN/A        sparc/cpu.cc
652086SN/A        sparc/thread_context.cc
662152SN/A        sparc/cpu_builder.cc
672086SN/A        ''')
682086SN/Aelse:
692152SN/A    sys.exit('O3 CPU does not support the \'%s\' ISA' % env['TARGET_ISA'])
702086SN/A
712152SN/A
722086SN/A# Convert file names to SCons File objects.  This takes care of the
732152SN/A# path relative to the top of the directory tree.
742152SN/Asources = [File(s) for s in sources]
752152SN/A
762152SN/AReturn('sources')
772152SN/A
782152SN/A