SConscript revision 2932
14202SN/A# -*- mode:python -*-
24202SN/A
34202SN/A# Copyright (c) 2004-2005 The Regents of The University of Michigan
44202SN/A# All rights reserved.
54202SN/A#
64202SN/A# Redistribution and use in source and binary forms, with or without
74202SN/A# modification, are permitted provided that the following conditions are
84202SN/A# met: redistributions of source code must retain the above copyright
94202SN/A# notice, this list of conditions and the following disclaimer;
104202SN/A# redistributions in binary form must reproduce the above copyright
114202SN/A# notice, this list of conditions and the following disclaimer in the
124202SN/A# documentation and/or other materials provided with the distribution;
134202SN/A# neither the name of the copyright holders nor the names of its
144202SN/A# contributors may be used to endorse or promote products derived from
154202SN/A# this software without specific prior written permission.
164202SN/A#
174202SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
184202SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
194202SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
204202SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
214202SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
224202SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
234202SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
244202SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
254202SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
264202SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
274202SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
284202SN/A#
294202SN/A# Authors: Gabe Black
304202SN/A#          Steve Reinhardt
314202SN/A
324202SN/Aimport os
336629SN/Aimport sys
346629SN/Afrom os.path import isdir
354486SN/A
366629SN/A# This file defines how to build a particular configuration of M5
375192SN/A# based on variable settings in the 'env' build environment.
388335Snate@binkert.org
39# Import build environment variable from SConstruct.
40Import('env')
41
42###################################################
43#
44# Define needed sources.
45#
46###################################################
47
48# Base sources used by all configurations.
49base_sources = Split('''
50	faults.cc
51	isa_traits.cc
52	''')
53
54# Full-system sources
55full_system_sources = Split('''
56	tlb.cc
57	arguments.cc
58	ev5.cc
59	osfpal.cc
60	stacktrace.cc
61	vtophys.cc
62	system.cc
63	freebsd/system.cc
64	linux/system.cc
65	tru64/system.cc
66	''')
67
68
69# Syscall emulation (non-full-system) sources
70syscall_emulation_sources = Split('''
71        linux/linux.cc
72	linux/process.cc
73        tru64/tru64.cc
74	tru64/process.cc
75	process.cc
76	''')
77
78# Set up complete list of sources based on configuration.
79sources = base_sources
80
81if env['FULL_SYSTEM']:
82    sources += full_system_sources
83else:
84    sources += syscall_emulation_sources
85
86# Convert file names to SCons File objects.  This takes care of the
87# path relative to the top of the directory tree.
88sources = [File(s) for s in sources]
89
90# Add in files generated by the ISA description.
91isa_desc_files = env.ISADesc('isa/main.isa')
92# Only non-header files need to be compiled.
93isa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')]
94sources += isa_desc_sources
95
96Return('sources')
97