SConscript revision 2935
112771Sqtt2@cornell.edu# -*- mode:python -*- 212771Sqtt2@cornell.edu 312771Sqtt2@cornell.edu# Copyright (c) 2006 The Regents of The University of Michigan 412771Sqtt2@cornell.edu# All rights reserved. 512771Sqtt2@cornell.edu# 612771Sqtt2@cornell.edu# Redistribution and use in source and binary forms, with or without 712771Sqtt2@cornell.edu# modification, are permitted provided that the following conditions are 812771Sqtt2@cornell.edu# met: redistributions of source code must retain the above copyright 912771Sqtt2@cornell.edu# notice, this list of conditions and the following disclaimer; 1012771Sqtt2@cornell.edu# redistributions in binary form must reproduce the above copyright 1112771Sqtt2@cornell.edu# notice, this list of conditions and the following disclaimer in the 1212771Sqtt2@cornell.edu# documentation and/or other materials provided with the distribution; 1312771Sqtt2@cornell.edu# neither the name of the copyright holders nor the names of its 1412771Sqtt2@cornell.edu# contributors may be used to endorse or promote products derived from 1512771Sqtt2@cornell.edu# this software without specific prior written permission. 1612771Sqtt2@cornell.edu# 1712771Sqtt2@cornell.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1812771Sqtt2@cornell.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1912771Sqtt2@cornell.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2012771Sqtt2@cornell.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2112771Sqtt2@cornell.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2212771Sqtt2@cornell.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2312771Sqtt2@cornell.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2412771Sqtt2@cornell.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2512771Sqtt2@cornell.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2612771Sqtt2@cornell.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2712771Sqtt2@cornell.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2812771Sqtt2@cornell.edu# 2912771Sqtt2@cornell.edu# Authors: Korey Sewell 3012771Sqtt2@cornell.edu 3112771Sqtt2@cornell.eduimport os 3212771Sqtt2@cornell.eduimport os.path 3312771Sqtt2@cornell.eduimport sys 3412771Sqtt2@cornell.edu 3512771Sqtt2@cornell.edu# Import build environment variable from SConstruct. 3612771Sqtt2@cornell.eduImport('env') 3712771Sqtt2@cornell.edu 3812771Sqtt2@cornell.edu 3912771Sqtt2@cornell.edu################################################################# 4012771Sqtt2@cornell.edu# 4112771Sqtt2@cornell.edu# Include ISA-specific files for the O3 CPU-model 4212771Sqtt2@cornell.edu# 4312771Sqtt2@cornell.edu################################################################# 4412771Sqtt2@cornell.edu 4512771Sqtt2@cornell.edusources = [] 4612771Sqtt2@cornell.edu 4712771Sqtt2@cornell.eduif env['TARGET_ISA'] == 'alpha': 4812771Sqtt2@cornell.edu sources += Split(''' 4912771Sqtt2@cornell.edu alpha/dyn_inst.cc 5012771Sqtt2@cornell.edu alpha/cpu.cc 5112771Sqtt2@cornell.edu alpha/thread_context.cc 5212771Sqtt2@cornell.edu alpha/cpu_builder.cc 5312771Sqtt2@cornell.edu ''') 5412771Sqtt2@cornell.eduelif env['TARGET_ISA'] == 'mips': 5512771Sqtt2@cornell.edu sources += Split(''' 5612771Sqtt2@cornell.edu mips/dyn_inst.cc 5712771Sqtt2@cornell.edu mips/cpu.cc 5812771Sqtt2@cornell.edu mips/thread_context.cc 5912771Sqtt2@cornell.edu mips/cpu_builder.cc 6012771Sqtt2@cornell.edu ''') 6112771Sqtt2@cornell.eduelif env['TARGET_ISA'] == 'sparc': 6212771Sqtt2@cornell.edu sys.exit('O3 CPU does not support Sparc') 6312771Sqtt2@cornell.edu #sources += Split(''' 6412771Sqtt2@cornell.edu # sparc/dyn_inst.cc 6512771Sqtt2@cornell.edu # sparc/cpu.cc 6612771Sqtt2@cornell.edu # sparc/thread_context.cc 6712771Sqtt2@cornell.edu # sparc/cpu_builder.cc 6812771Sqtt2@cornell.edu # ''') 6912771Sqtt2@cornell.eduelse: 7012771Sqtt2@cornell.edu sys.exit('O3 CPU does not support the \'%s\' ISA' % env['TARGET_ISA']) 7112771Sqtt2@cornell.edu 7212771Sqtt2@cornell.edu 7312771Sqtt2@cornell.edu# Convert file names to SCons File objects. This takes care of the 7412771Sqtt2@cornell.edu# path relative to the top of the directory tree. 7512771Sqtt2@cornell.edusources = [File(s) for s in sources] 7612771Sqtt2@cornell.edu 7712771Sqtt2@cornell.eduReturn('sources') 7812771Sqtt2@cornell.edu 7912771Sqtt2@cornell.edu