SConscript revision 3806
1955SN/A# -*- mode:python -*-
2955SN/A
31762SN/A# Copyright (c) 2006 The Regents of The University of Michigan
4955SN/A# All rights reserved.
5955SN/A#
6955SN/A# Redistribution and use in source and binary forms, with or without
7955SN/A# modification, are permitted provided that the following conditions are
8955SN/A# met: redistributions of source code must retain the above copyright
9955SN/A# notice, this list of conditions and the following disclaimer;
10955SN/A# redistributions in binary form must reproduce the above copyright
11955SN/A# notice, this list of conditions and the following disclaimer in the
12955SN/A# documentation and/or other materials provided with the distribution;
13955SN/A# neither the name of the copyright holders nor the names of its
14955SN/A# contributors may be used to endorse or promote products derived from
15955SN/A# this software without specific prior written permission.
16955SN/A#
17955SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18955SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19955SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20955SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21955SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22955SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23955SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24955SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25955SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26955SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27955SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282665Ssaidi@eecs.umich.edu#
294762Snate@binkert.org# Authors: Korey Sewell
30955SN/A
315522Snate@binkert.orgimport os
326143Snate@binkert.orgimport os.path
334762Snate@binkert.orgimport sys
345522Snate@binkert.org
35955SN/A# Import build environment variable from SConstruct.
365522Snate@binkert.orgImport('env')
37955SN/A
385522Snate@binkert.org
394202Sbinkertn@umich.edu#################################################################
405742Snate@binkert.org#
41955SN/A# Include ISA-specific files for the O3 CPU-model
424381Sbinkertn@umich.edu#
434381Sbinkertn@umich.edu#################################################################
448334Snate@binkert.org
45955SN/Asources = []
46955SN/A
474202Sbinkertn@umich.eduif env['TARGET_ISA'] == 'alpha':
48955SN/A    sources += Split('''
494382Sbinkertn@umich.edu        alpha/dyn_inst.cc
504382Sbinkertn@umich.edu        alpha/cpu.cc
514382Sbinkertn@umich.edu        alpha/thread_context.cc
526654Snate@binkert.org        alpha/cpu_builder.cc
535517Snate@binkert.org        ''')
548614Sgblack@eecs.umich.eduelif env['TARGET_ISA'] == 'mips':
557674Snate@binkert.org    sources += Split('''
566143Snate@binkert.org        mips/dyn_inst.cc
576143Snate@binkert.org        mips/cpu.cc
586143Snate@binkert.org        mips/thread_context.cc
598233Snate@binkert.org        mips/cpu_builder.cc
608233Snate@binkert.org        ''')
618233Snate@binkert.orgelif env['TARGET_ISA'] == 'sparc':
628233Snate@binkert.org    sources += Split('''
638233Snate@binkert.org        sparc/dyn_inst.cc
648334Snate@binkert.org        sparc/cpu.cc
658334Snate@binkert.org        sparc/thread_context.cc
6610453SAndrew.Bardsley@arm.com        sparc/cpu_builder.cc
6710453SAndrew.Bardsley@arm.com        ''')
688233Snate@binkert.orgelse:
698233Snate@binkert.org    sys.exit('O3 CPU does not support the \'%s\' ISA' % env['TARGET_ISA'])
708233Snate@binkert.org
718233Snate@binkert.org
728233Snate@binkert.org# Convert file names to SCons File objects.  This takes care of the
738233Snate@binkert.org# path relative to the top of the directory tree.
746143Snate@binkert.orgsources = [File(s) for s in sources]
758233Snate@binkert.org
768233Snate@binkert.orgReturn('sources')
778233Snate@binkert.org
786143Snate@binkert.org