1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 The Regents of The University of Michigan 4# All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions are 8# met: redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28# 29# Authors: Steve Reinhardt 30 31import os 32import sys |
33from os.path import isfile, join as joinpath |
34 35# This file defines how to build a particular configuration of M5 36# based on variable settings in the 'env' build environment. 37 38# Import build environment variable from SConstruct. 39Import('env') 40 41################################################### --- 99 unchanged lines hidden (view full) --- 141 sim/sim_object.cc 142 sim/startup.cc 143 sim/stat_context.cc 144 sim/stat_control.cc 145 sim/system.cc 146 sim/trace_context.cc 147 ''') 148 |
149trace_reader_sources = Split(''' 150 cpu/trace/reader/mem_trace_reader.cc 151 cpu/trace/reader/ibm_reader.cc 152 cpu/trace/reader/itx_reader.cc 153 cpu/trace/reader/m5_reader.cc 154 cpu/trace/opt_cpu.cc 155 cpu/trace/trace_cpu.cc 156 ''') --- 28 unchanged lines hidden (view full) --- 185if env['TARGET_ISA'] == 'alpha': 186 full_system_sources += Split(''' 187 kern/tru64/dump_mbuf.cc 188 kern/tru64/printf.cc 189 kern/tru64/tru64_events.cc 190 kern/tru64/tru64_syscalls.cc 191 ''') 192 |
193# Syscall emulation (non-full-system) sources 194syscall_emulation_sources = Split(''' 195 mem/translating_port.cc 196 mem/page_table.cc 197 sim/process.cc 198 sim/syscall_emul.cc 199 ''') 200 201#if env['TARGET_ISA'] == 'alpha': 202# syscall_emulation_sources += Split(''' 203# kern/tru64/tru64.cc 204# ''') 205 |
206memtest_sources = Split(''' 207 cpu/memtest/memtest.cc 208 ''') 209 210# Include file paths are rooted in this directory. SCons will 211# automatically expand '.' to refer to both the source directory and 212# the corresponding build directory to pick up generated include 213# files. 214env.Append(CPPPATH=Dir('.')) 215 216# Add a flag defining what THE_ISA should be for all compilation 217env.Append(CPPDEFINES=[('THE_ISA','%s_ISA' % env['TARGET_ISA'].upper())]) 218 219arch_sources = SConscript(os.path.join('arch', 'SConscript'), exports = 'env') 220 221cpu_sources = SConscript(os.path.join('cpu', 'SConscript'), exports = 'env') 222 223if env['FULL_SYSTEM']: |
224 dev_sources = SConscript(os.path.join('dev', 'SConscript'), 225 exports = 'env') |
226 full_system_sources += dev_sources 227 |
228 kern_sources = SConscript(os.path.join('kern', 'SConscript'), 229 exports = 'env') |
230 full_system_sources += kern_sources 231 |
232# Set up complete list of sources based on configuration. 233sources = base_sources + arch_sources + cpu_sources 234 |
235# encumbered should be last because we're adding to some of the other groups 236if isfile(joinpath(env['SRCDIR'], 'encumbered/SConscript')): 237 sources += SConscript('encumbered/SConscript', exports = 'env') 238 239 |
240if env['FULL_SYSTEM']: 241 sources += full_system_sources |
242else: 243 sources += syscall_emulation_sources 244 245if env['USE_MYSQL']: 246 sources += mysql_sources 247 248for opt in env.ExportOptions: 249 env.ConfigFile(opt) --- 85 unchanged lines hidden --- |