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 --- 32 unchanged lines hidden (view full) --- 41# Define needed sources. 42# 43################################################### 44 45# Base sources used by all configurations. 46 47base_sources = Split(''' 48 base/circlebuf.cc |
49 base/cprintf.cc |
50 base/fast_alloc.cc 51 base/fifo_buffer.cc 52 base/hostinfo.cc 53 base/hybrid_pred.cc 54 base/inifile.cc 55 base/intmath.cc 56 base/match.cc 57 base/misc.cc --- 16 unchanged lines hidden (view full) --- 74 base/loader/elf_object.cc 75 base/loader/object_file.cc 76 base/loader/symtab.cc 77 base/stats/events.cc 78 base/stats/statdb.cc 79 base/stats/visit.cc 80 base/stats/text.cc 81 |
82 cpu/base.cc 83 cpu/cpu_exec_context.cc 84 cpu/cpuevent.cc 85 cpu/exetrace.cc 86 cpu/op_class.cc 87 cpu/pc_event.cc |
88 cpu/static_inst.cc 89 cpu/sampler/sampler.cc 90 91 mem/bridge.cc 92 mem/bus.cc 93 mem/connector.cc 94 mem/mem_object.cc 95 mem/packet.cc 96 mem/physical.cc 97 mem/port.cc 98 mem/request.cc 99 |
100 sim/builder.cc 101 sim/configfile.cc 102 sim/debug.cc 103 sim/eventq.cc 104 sim/faults.cc 105 sim/main.cc 106 sim/param.cc 107 sim/profile.cc --- 238 unchanged lines hidden (view full) --- 346################################################### 347 348# Include file paths are rooted in this directory. SCons will 349# automatically expand '.' to refer to both the source directory and 350# the corresponding build directory to pick up generated include 351# files. 352env.Append(CPPPATH='.') 353 |
354# List of constructed environments to pass back to SConstruct 355envList = [] 356 357# Function to create a new build environment as clone of current 358# environment 'env' with modified object suffix and optional stripped 359# binary. Additional keyword arguments are appended to corresponding 360# build environment vars. 361def makeEnv(label, objsfx, strip = False, **kwargs): 362 newEnv = env.Copy(OBJSUFFIX=objsfx) 363 newEnv.Label = label 364 newEnv.Append(**kwargs) 365 exe = 'm5.' + label # final executable 366 bin = exe + '.bin' # executable w/o appended Python zip archive 367 newEnv.Program(bin, make_objs(sources, newEnv)) 368 if strip: 369 stripped_bin = bin + '.stripped' 370 newEnv.Command(stripped_bin, bin, 'strip $SOURCE -o $TARGET') 371 bin = stripped_bin 372 targets = newEnv.Concat(exe, [bin, 'python/m5py.zip']) 373 newEnv.M5Binary = targets[0] 374 envList.append(newEnv) 375 |
376# Debug binary |
377makeEnv('debug', '.do', 378 CCFLAGS = Split('-g3 -gdwarf-2 -O0'), 379 CPPDEFINES = 'DEBUG') |
380 381# Optimized binary |
382makeEnv('opt', '.o', 383 CCFLAGS = Split('-g -O3')) |
384 385# "Fast" binary |
386makeEnv('fast', '.fo', strip = True, 387 CCFLAGS = Split('-O3'), 388 CPPDEFINES = 'NDEBUG') |
389 390# Profiled binary |
391makeEnv('prof', '.po', 392 CCFLAGS = Split('-O3 -g -pg'), 393 LINKFLAGS = '-pg') |
394 |
395Return('envList') |