SConscript revision 2152
12188SN/A# -*- mode:python -*-
22188SN/A
32188SN/A# Copyright (c) 2004-2005 The Regents of The University of Michigan
42188SN/A# All rights reserved.
52188SN/A#
62188SN/A# Redistribution and use in source and binary forms, with or without
72188SN/A# modification, are permitted provided that the following conditions are
82188SN/A# met: redistributions of source code must retain the above copyright
92188SN/A# notice, this list of conditions and the following disclaimer;
102188SN/A# redistributions in binary form must reproduce the above copyright
112188SN/A# notice, this list of conditions and the following disclaimer in the
122188SN/A# documentation and/or other materials provided with the distribution;
132188SN/A# neither the name of the copyright holders nor the names of its
142188SN/A# contributors may be used to endorse or promote products derived from
152188SN/A# this software without specific prior written permission.
162188SN/A#
172188SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
182188SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
192188SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
202188SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
212188SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
222188SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
232188SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
242188SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
252188SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
262665SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
272665SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282665SN/A
29287SN/Aimport os
302188SN/Aimport sys
314090Ssaidi@eecs.umich.edufrom os.path import isdir
324090Ssaidi@eecs.umich.edu
332188SN/A# This file defines how to build a particular configuration of M5
342188SN/A# based on variable settings in the 'env' build environment.
352188SN/A
362188SN/A# Import build environment variable from SConstruct.
372188SN/AImport('env')
3812157Sandreas.sandberg@arm.com
394090Ssaidi@eecs.umich.edu###################################################
40287SN/A#
41275SN/A# Define needed sources.
42275SN/A#
432188SN/A###################################################
442188SN/A
452188SN/A# Base sources used by all configurations.
462188SN/Abase_sources = Split('''
472188SN/A	faults.cc
482188SN/A	isa_traits.cc
492188SN/A	''')
504098Ssaidi@eecs.umich.edu
51275SN/A# Full-system sources
52275SN/Afull_system_sources = Split('''
532188SN/A	alpha_memory.cc
54	arguments.cc
55	ev5.cc
56	osfpal.cc
57	stacktrace.cc
58	vtophys.cc
59	''')
60
61
62# Syscall emulation (non-full-system) sources
63syscall_emulation_sources = Split('''
64	alpha_common_syscall_emul.cc
65	alpha_linux_process.cc
66	alpha_tru64_process.cc
67	''')
68
69# Set up complete list of sources based on configuration.
70sources = base_sources
71
72if env['FULL_SYSTEM']:
73    sources += full_system_sources
74else:
75    sources += syscall_emulation_sources
76
77# Convert file names to SCons File objects.  This takes care of the
78# path relative to the top of the directory tree.
79sources = [File(s) for s in sources]
80
81# Add in files generated by the ISA description.
82isa_desc_files = env.ISADesc('isa/main.isa')
83# Only non-header files need to be compiled.
84isa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')]
85sources += isa_desc_sources
86
87Return('sources')
88