SConscript revision 2817
12817Sksewell@umich.edu# -*- mode:python -*-
22817Sksewell@umich.edu
32817Sksewell@umich.edu# Copyright (c) 2006 The Regents of The University of Michigan
42817Sksewell@umich.edu# All rights reserved.
52817Sksewell@umich.edu#
62817Sksewell@umich.edu# Redistribution and use in source and binary forms, with or without
72817Sksewell@umich.edu# modification, are permitted provided that the following conditions are
82817Sksewell@umich.edu# met: redistributions of source code must retain the above copyright
92817Sksewell@umich.edu# notice, this list of conditions and the following disclaimer;
102817Sksewell@umich.edu# redistributions in binary form must reproduce the above copyright
112817Sksewell@umich.edu# notice, this list of conditions and the following disclaimer in the
122817Sksewell@umich.edu# documentation and/or other materials provided with the distribution;
132817Sksewell@umich.edu# neither the name of the copyright holders nor the names of its
142817Sksewell@umich.edu# contributors may be used to endorse or promote products derived from
152817Sksewell@umich.edu# this software without specific prior written permission.
162817Sksewell@umich.edu#
172817Sksewell@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
182817Sksewell@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
192817Sksewell@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
202817Sksewell@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
212817Sksewell@umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
222817Sksewell@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
232817Sksewell@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
242817Sksewell@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
252817Sksewell@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
262817Sksewell@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
272817Sksewell@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282817Sksewell@umich.edu#
292817Sksewell@umich.edu# Authors: Korey Sewell
302817Sksewell@umich.edu
312817Sksewell@umich.eduimport os
322817Sksewell@umich.eduimport os.path
332817Sksewell@umich.eduimport sys
342817Sksewell@umich.edu
352817Sksewell@umich.edu# Import build environment variable from SConstruct.
362817Sksewell@umich.eduImport('env')
372817Sksewell@umich.edu
382817Sksewell@umich.edu
392817Sksewell@umich.edu#################################################################
402817Sksewell@umich.edu#
412817Sksewell@umich.edu# Include ISA-specific files for the O3 CPU-model
422817Sksewell@umich.edu#
432817Sksewell@umich.edu#################################################################
442817Sksewell@umich.edu
452817Sksewell@umich.edusources = []
462817Sksewell@umich.edu
472817Sksewell@umich.eduif env['TARGET_ISA'] == 'alpha':
482817Sksewell@umich.edu    sources += Split('''
492817Sksewell@umich.edu        alpha/dyn_inst.cc
502817Sksewell@umich.edu        alpha/cpu.cc
512817Sksewell@umich.edu        alpha/thread_context.cc
522817Sksewell@umich.edu        alpha/cpu_builder.cc
532817Sksewell@umich.edu        ''')
542817Sksewell@umich.eduelif env['TARGET_ISA'] == 'mips':
552817Sksewell@umich.edu    sys.exit('O3 CPU does not support MIPS')
562817Sksewell@umich.edu    #sources += Split('''
572817Sksewell@umich.edu    #    mips/dyn_inst.cc
582817Sksewell@umich.edu    #    mips/cpu.cc
592817Sksewell@umich.edu    #    mips/thread_context.cc
602817Sksewell@umich.edu    #    mips/cpu_builder.cc
612817Sksewell@umich.edu    #    ''')
622817Sksewell@umich.eduelif env['TARGET_ISA'] == 'sparc':
632817Sksewell@umich.edu    sys.exit('O3 CPU does not support MIPS')
642817Sksewell@umich.edu    #sources += Split('''
652817Sksewell@umich.edu    #    sparc/dyn_inst.cc
662817Sksewell@umich.edu    #    sparc/cpu.cc
672817Sksewell@umich.edu    #    sparc/thread_context.cc
682817Sksewell@umich.edu    #    sparc/cpu_builder.cc
692817Sksewell@umich.edu    #    ''')
702817Sksewell@umich.eduelse:
712817Sksewell@umich.edu    sys.exit('O3 CPU does not support the \'%s\' ISA' % env['TARGET_ISA'])
722817Sksewell@umich.edu
732817Sksewell@umich.edu
742817Sksewell@umich.edu# Convert file names to SCons File objects.  This takes care of the
752817Sksewell@umich.edu# path relative to the top of the directory tree.
762817Sksewell@umich.edusources = [File(s) for s in sources]
772817Sksewell@umich.edu
782817Sksewell@umich.eduReturn('sources')
792817Sksewell@umich.edu
80