SConscript revision 3817:7df12d77afc2
12SN/A# -*- mode:python -*-
21762SN/A
32SN/A# Copyright (c) 2004-2005 The Regents of The University of Michigan
42SN/A# All rights reserved.
52SN/A#
62SN/A# Redistribution and use in source and binary forms, with or without
72SN/A# modification, are permitted provided that the following conditions are
82SN/A# met: redistributions of source code must retain the above copyright
92SN/A# notice, this list of conditions and the following disclaimer;
102SN/A# redistributions in binary form must reproduce the above copyright
112SN/A# notice, this list of conditions and the following disclaimer in the
122SN/A# documentation and/or other materials provided with the distribution;
132SN/A# neither the name of the copyright holders nor the names of its
142SN/A# contributors may be used to endorse or promote products derived from
152SN/A# this software without specific prior written permission.
162SN/A#
172SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
182SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
192SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
202SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
212SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
222SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
232SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
242SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
252SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
262SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
272665Ssaidi@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282665Ssaidi@eecs.umich.edu#
292665Ssaidi@eecs.umich.edu# Authors: Gabe Black
302665Ssaidi@eecs.umich.edu#          Steve Reinhardt
312SN/A
322SN/Aimport os
332SN/Aimport sys
342SN/Afrom os.path import isdir
352SN/A
362655Sstever@eecs.umich.edu# Import build environment variable from SConstruct.
372655Sstever@eecs.umich.eduImport('env')
382SN/A
392SN/A###################################################
401399SN/A#
411396SN/A# Define needed sources.
422SN/A#
432SN/A###################################################
442729Ssaidi@eecs.umich.edu
452SN/A# Base sources used by all configurations.
461310SN/Abase_sources = Split('''
472SN/A	asi.cc
482SN/A	faults.cc
492SN/A	floatregfile.cc
502667Sstever@eecs.umich.edu	intregfile.cc
5156SN/A	miscregfile.cc
52146SN/A	regfile.cc
531388SN/A	''')
5456SN/A
5556SN/A# Full-system sources
561311SN/Afull_system_sources = Split('''
57400SN/A	arguments.cc
581717SN/A	remote_gdb.cc
591717SN/A        pagetable.cc
60146SN/A	stacktrace.cc
61146SN/A	system.cc
62146SN/A	tlb.cc
63146SN/A        ua2005.cc
6456SN/A	vtophys.cc
6556SN/A	''')
6656SN/A
67695SN/A# Syscall emulation (non-full-system) sources
68695SN/Asyscall_emulation_sources = Split('''
691696SN/A	linux/linux.cc
702SN/A	linux/process.cc
712SN/A	process.cc
722SN/A	solaris/process.cc
732SN/A	solaris/solaris.cc
742SN/A	''')
752SN/A
76329SN/Asources = base_sources
772SN/A
782SN/Aif env['FULL_SYSTEM']:
792SN/A    sources += full_system_sources
802SN/Aelse:
812SN/A    sources += syscall_emulation_sources
822SN/A
832SN/A# Convert file names to SCons File objects.  This takes care of the
842SN/A# path relative to the top of the directory tree.
852SN/Asources = [File(s) for s in sources]
862SN/A
872SN/A# Add in files generated by the ISA description.
882SN/Aisa_desc_files = env.ISADesc('isa/main.isa')
89329SN/A# Only non-header files need to be compiled.
90329SN/Aisa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')]
91329SN/Asources += isa_desc_sources
92329SN/A
93329SN/AReturn('sources')
94329SN/A