SConscript revision 2325
1955SN/A# -*- mode:python -*- 2955SN/A 31762SN/A# Copyright (c) 2004-2005 The Regents of The University of Michigan 4955SN/A# All rights reserved. 5955SN/A# 6955SN/A# Redistribution and use in source and binary forms, with or without 7955SN/A# modification, are permitted provided that the following conditions are 8955SN/A# met: redistributions of source code must retain the above copyright 9955SN/A# notice, this list of conditions and the following disclaimer; 10955SN/A# redistributions in binary form must reproduce the above copyright 11955SN/A# notice, this list of conditions and the following disclaimer in the 12955SN/A# documentation and/or other materials provided with the distribution; 13955SN/A# neither the name of the copyright holders nor the names of its 14955SN/A# contributors may be used to endorse or promote products derived from 15955SN/A# this software without specific prior written permission. 16955SN/A# 17955SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18955SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19955SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20955SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21955SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22955SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23955SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24955SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25955SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26955SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27955SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282665Ssaidi@eecs.umich.edu 294762Snate@binkert.orgimport os 30955SN/Aimport sys 315522Snate@binkert.orgfrom os.path import isdir 324762Snate@binkert.org 335522Snate@binkert.org# This file defines how to build a particular configuration of M5 34955SN/A# based on variable settings in the 'env' build environment. 355522Snate@binkert.org 36955SN/A# Import build environment variable from SConstruct. 375522Snate@binkert.orgImport('env') 384202Sbinkertn@umich.edu 395742Snate@binkert.org################################################### 40955SN/A# 414381Sbinkertn@umich.edu# Define needed sources. 424381Sbinkertn@umich.edu# 43955SN/A################################################### 44955SN/A 45955SN/A# Base sources used by all configurations. 464202Sbinkertn@umich.edu 47955SN/Abase_sources = Split(''' 484382Sbinkertn@umich.edu base/circlebuf.cc 494382Sbinkertn@umich.edu base/copyright.cc 504382Sbinkertn@umich.edu base/cprintf.cc 515517Snate@binkert.org base/embedfile.cc 525517Snate@binkert.org base/fast_alloc.cc 534762Snate@binkert.org base/fifo_buffer.cc 544762Snate@binkert.org base/hostinfo.cc 554762Snate@binkert.org base/hybrid_pred.cc 564762Snate@binkert.org base/inifile.cc 574762Snate@binkert.org base/intmath.cc 584762Snate@binkert.org base/match.cc 594762Snate@binkert.org base/misc.cc 604762Snate@binkert.org base/output.cc 614762Snate@binkert.org base/pollevent.cc 624762Snate@binkert.org base/range.cc 635522Snate@binkert.org base/random.cc 645604Snate@binkert.org base/sat_counter.cc 655604Snate@binkert.org base/socket.cc 665604Snate@binkert.org base/statistics.cc 674762Snate@binkert.org base/str.cc 684762Snate@binkert.org base/time.cc 694762Snate@binkert.org base/trace.cc 705522Snate@binkert.org base/traceflags.cc 715522Snate@binkert.org base/userinfo.cc 725522Snate@binkert.org base/compression/lzss_compression.cc 735522Snate@binkert.org base/loader/aout_object.cc 745604Snate@binkert.org base/loader/ecoff_object.cc 755604Snate@binkert.org base/loader/elf_object.cc 764762Snate@binkert.org base/loader/object_file.cc 774762Snate@binkert.org base/loader/symtab.cc 784762Snate@binkert.org base/stats/events.cc 794762Snate@binkert.org base/stats/statdb.cc 805522Snate@binkert.org base/stats/visit.cc 814762Snate@binkert.org base/stats/text.cc 824762Snate@binkert.org 835604Snate@binkert.org cpu/activity.cc 845604Snate@binkert.org cpu/base.cc 855604Snate@binkert.org cpu/base_dyn_inst.cc 865604Snate@binkert.org cpu/cpu_exec_context.cc 875604Snate@binkert.org cpu/exetrace.cc 885604Snate@binkert.org cpu/pc_event.cc 894762Snate@binkert.org cpu/quiesce_event.cc 904762Snate@binkert.org cpu/static_inst.cc 914762Snate@binkert.org cpu/sampler/sampler.cc 924762Snate@binkert.org cpu/trace/reader/mem_trace_reader.cc 935604Snate@binkert.org cpu/trace/reader/ibm_reader.cc 944762Snate@binkert.org cpu/trace/reader/itx_reader.cc 955522Snate@binkert.org cpu/trace/reader/m5_reader.cc 965522Snate@binkert.org cpu/trace/opt_cpu.cc 975522Snate@binkert.org cpu/trace/trace_cpu.cc 984762Snate@binkert.org 994382Sbinkertn@umich.edu encumbered/mem/functional/main.cc 1004762Snate@binkert.org 1014382Sbinkertn@umich.edu mem/base_hier.cc 1025522Snate@binkert.org mem/base_mem.cc 1034381Sbinkertn@umich.edu mem/hier_params.cc 1045522Snate@binkert.org mem/mem_cmd.cc 1054762Snate@binkert.org mem/mem_debug.cc 1064762Snate@binkert.org mem/mem_req.cc 1074762Snate@binkert.org mem/memory_interface.cc 1085522Snate@binkert.org mem/bus/base_interface.cc 1095522Snate@binkert.org mem/bus/bus.cc 1105522Snate@binkert.org mem/bus/bus_bridge.cc 1115522Snate@binkert.org mem/bus/bus_bridge_master.cc 1125522Snate@binkert.org mem/bus/bus_bridge_slave.cc 1135522Snate@binkert.org mem/bus/bus_interface.cc 1145522Snate@binkert.org mem/bus/dma_bus_interface.cc 1155522Snate@binkert.org mem/bus/dma_interface.cc 1165522Snate@binkert.org mem/bus/master_interface.cc 1174762Snate@binkert.org mem/bus/slave_interface.cc 1184762Snate@binkert.org mem/cache/base_cache.cc 1194762Snate@binkert.org mem/cache/cache.cc 1204762Snate@binkert.org mem/cache/cache_builder.cc 1214762Snate@binkert.org mem/cache/coherence/coherence_protocol.cc 1224762Snate@binkert.org mem/cache/coherence/uni_coherence.cc 1234762Snate@binkert.org mem/cache/miss/blocking_buffer.cc 1244762Snate@binkert.org mem/cache/miss/miss_queue.cc 1254762Snate@binkert.org mem/cache/miss/mshr.cc 1264762Snate@binkert.org mem/cache/miss/mshr_queue.cc 1274762Snate@binkert.org mem/cache/prefetch/base_prefetcher.cc 1284762Snate@binkert.org mem/cache/prefetch/prefetcher.cc 1294762Snate@binkert.org mem/cache/prefetch/tagged_prefetcher.cc 1304762Snate@binkert.org mem/cache/tags/base_tags.cc 1314762Snate@binkert.org mem/cache/tags/cache_tags.cc 1324762Snate@binkert.org mem/cache/tags/fa_lru.cc 1334762Snate@binkert.org mem/cache/tags/iic.cc 1344762Snate@binkert.org mem/cache/tags/lru.cc 1354762Snate@binkert.org mem/cache/tags/repl/gen.cc 1364762Snate@binkert.org mem/cache/tags/repl/repl.cc 1374762Snate@binkert.org mem/cache/tags/split.cc 1384762Snate@binkert.org mem/cache/tags/split_lru.cc 1394762Snate@binkert.org mem/cache/tags/split_lifo.cc 1404762Snate@binkert.org mem/functional/functional.cc 1414762Snate@binkert.org mem/timing/base_memory.cc 1424762Snate@binkert.org mem/timing/dram_memory.cc 1434762Snate@binkert.org mem/timing/dram_mem_bank.cc 1444762Snate@binkert.org mem/timing/dram_memory_builder.cc 1454762Snate@binkert.org mem/timing/memory_builder.cc 1464762Snate@binkert.org mem/timing/simple_mem_bank.cc 1474762Snate@binkert.org mem/trace/itx_writer.cc 1484762Snate@binkert.org mem/trace/mem_trace_writer.cc 1494762Snate@binkert.org mem/trace/m5_writer.cc 1504762Snate@binkert.org 1514762Snate@binkert.org python/pyconfig.cc 152955SN/A python/embedded_py.cc 1535584Snate@binkert.org 1545584Snate@binkert.org sim/builder.cc 1555584Snate@binkert.org sim/configfile.cc 1565584Snate@binkert.org sim/debug.cc 1575584Snate@binkert.org sim/eventq.cc 1585584Snate@binkert.org sim/faults.cc 1595584Snate@binkert.org sim/main.cc 1605584Snate@binkert.org sim/param.cc 1615584Snate@binkert.org sim/profile.cc 1625584Snate@binkert.org sim/root.cc 1635584Snate@binkert.org sim/serialize.cc 1645584Snate@binkert.org sim/sim_events.cc 1655584Snate@binkert.org sim/sim_exit.cc 1664382Sbinkertn@umich.edu sim/sim_object.cc 1674202Sbinkertn@umich.edu sim/startup.cc 1685522Snate@binkert.org sim/stat_context.cc 1694382Sbinkertn@umich.edu sim/stat_control.cc 1704382Sbinkertn@umich.edu sim/trace_context.cc 1714382Sbinkertn@umich.edu ''') 1725584Snate@binkert.org 1734382Sbinkertn@umich.edu# Old FullCPU sources 1744382Sbinkertn@umich.edufull_cpu_sources = Split(''' 1754382Sbinkertn@umich.edu encumbered/cpu/full/bpred.cc 1765192Ssaidi@eecs.umich.edu encumbered/cpu/full/commit.cc 1775192Ssaidi@eecs.umich.edu encumbered/cpu/full/cpu.cc 1785799Snate@binkert.org encumbered/cpu/full/create_vector.cc 1795799Snate@binkert.org encumbered/cpu/full/cv_spec_state.cc 1805799Snate@binkert.org encumbered/cpu/full/dd_queue.cc 1815192Ssaidi@eecs.umich.edu encumbered/cpu/full/dep_link.cc 1825799Snate@binkert.org encumbered/cpu/full/dispatch.cc 1835192Ssaidi@eecs.umich.edu encumbered/cpu/full/dyn_inst.cc 1845799Snate@binkert.org encumbered/cpu/full/execute.cc 1855799Snate@binkert.org encumbered/cpu/full/fetch.cc 1865192Ssaidi@eecs.umich.edu encumbered/cpu/full/floss_reasons.cc 1875192Ssaidi@eecs.umich.edu encumbered/cpu/full/fu_pool.cc 1885192Ssaidi@eecs.umich.edu encumbered/cpu/full/inst_fifo.cc 1895192Ssaidi@eecs.umich.edu encumbered/cpu/full/instpipe.cc 1905799Snate@binkert.org encumbered/cpu/full/issue.cc 1915192Ssaidi@eecs.umich.edu encumbered/cpu/full/ls_queue.cc 1925799Snate@binkert.org encumbered/cpu/full/machine_queue.cc 1935192Ssaidi@eecs.umich.edu encumbered/cpu/full/pipetrace.cc 1945192Ssaidi@eecs.umich.edu encumbered/cpu/full/readyq.cc 1955192Ssaidi@eecs.umich.edu encumbered/cpu/full/reg_info.cc 1965799Snate@binkert.org encumbered/cpu/full/rob_station.cc 1975192Ssaidi@eecs.umich.edu encumbered/cpu/full/spec_memory.cc 1985192Ssaidi@eecs.umich.edu encumbered/cpu/full/spec_state.cc 1995192Ssaidi@eecs.umich.edu encumbered/cpu/full/storebuffer.cc 2005192Ssaidi@eecs.umich.edu encumbered/cpu/full/writeback.cc 2015192Ssaidi@eecs.umich.edu encumbered/cpu/full/iq/iq_station.cc 2025192Ssaidi@eecs.umich.edu encumbered/cpu/full/iq/iqueue.cc 2034382Sbinkertn@umich.edu encumbered/cpu/full/iq/segmented/chain_info.cc 2044382Sbinkertn@umich.edu encumbered/cpu/full/iq/segmented/chain_wire.cc 2054382Sbinkertn@umich.edu encumbered/cpu/full/iq/segmented/iq_seg.cc 2062667Sstever@eecs.umich.edu encumbered/cpu/full/iq/segmented/iq_segmented.cc 2072667Sstever@eecs.umich.edu encumbered/cpu/full/iq/segmented/seg_chain.cc 2082667Sstever@eecs.umich.edu encumbered/cpu/full/iq/seznec/iq_seznec.cc 2092667Sstever@eecs.umich.edu encumbered/cpu/full/iq/standard/iq_standard.cc 2102667Sstever@eecs.umich.edu ''') 2112667Sstever@eecs.umich.edu 2125742Snate@binkert.org# MySql sources 2135742Snate@binkert.orgmysql_sources = Split(''' 2145742Snate@binkert.org base/mysql.cc 2152037SN/A base/stats/mysql.cc 2162037SN/A ''') 2172037SN/A 2185793Snate@binkert.org# Full-system sources 2195793Snate@binkert.orgfull_system_sources = Split(''' 2205793Snate@binkert.org base/crc.cc 2215793Snate@binkert.org base/inet.cc 2225793Snate@binkert.org base/remote_gdb.cc 2234382Sbinkertn@umich.edu 2244762Snate@binkert.org cpu/intr_control.cc 2255344Sstever@gmail.com cpu/profile.cc 2264382Sbinkertn@umich.edu 2275341Sstever@gmail.com dev/alpha_console.cc 2285742Snate@binkert.org dev/baddev.cc 2295742Snate@binkert.org dev/simconsole.cc 2305742Snate@binkert.org dev/disk_image.cc 2315742Snate@binkert.org dev/etherbus.cc 2325742Snate@binkert.org dev/etherdump.cc 2334762Snate@binkert.org dev/etherint.cc 2345742Snate@binkert.org dev/etherlink.cc 2355742Snate@binkert.org dev/etherpkt.cc 2365742Snate@binkert.org dev/ethertap.cc 2375742Snate@binkert.org dev/ide_ctrl.cc 2385742Snate@binkert.org dev/ide_disk.cc 2395742Snate@binkert.org dev/io_device.cc 2405742Snate@binkert.org dev/ns_gige.cc 2415341Sstever@gmail.com dev/pciconfigall.cc 2425742Snate@binkert.org dev/pcidev.cc 2435341Sstever@gmail.com dev/pcifake.cc 2444773Snate@binkert.org dev/pktfifo.cc 2451858SN/A dev/platform.cc 2461858SN/A dev/sinic.cc 2471085SN/A dev/simple_disk.cc 2484382Sbinkertn@umich.edu dev/tsunami.cc 2494382Sbinkertn@umich.edu dev/tsunami_cchip.cc 2504762Snate@binkert.org dev/isa_fake.cc 2514762Snate@binkert.org dev/tsunami_io.cc 2524762Snate@binkert.org dev/tsunami_pchip.cc 2535517Snate@binkert.org dev/uart.cc 2545517Snate@binkert.org dev/uart8250.cc 2555517Snate@binkert.org 2565517Snate@binkert.org kern/kernel_binning.cc 2575517Snate@binkert.org kern/kernel_stats.cc 2585517Snate@binkert.org kern/system_events.cc 2595517Snate@binkert.org kern/linux/events.cc 2605517Snate@binkert.org kern/linux/linux_syscalls.cc 2615517Snate@binkert.org kern/linux/printk.cc 2625517Snate@binkert.org kern/tru64/dump_mbuf.cc 2635517Snate@binkert.org kern/tru64/printf.cc 2645517Snate@binkert.org kern/tru64/tru64_events.cc 2655517Snate@binkert.org kern/tru64/tru64_syscalls.cc 2665517Snate@binkert.org 2675517Snate@binkert.org mem/functional/memory_control.cc 2685517Snate@binkert.org mem/functional/physical.cc 2695517Snate@binkert.org 2705798Snate@binkert.org sim/system.cc 2715517Snate@binkert.org sim/pseudo_inst.cc 2725517Snate@binkert.org ''') 2735517Snate@binkert.org 2745517Snate@binkert.org# turbolaser encumbered sources 2755517Snate@binkert.orgturbolaser_sources = Split(''' 2765517Snate@binkert.org encumbered/dev/dma.cc 2775517Snate@binkert.org encumbered/dev/etherdev.cc 2785517Snate@binkert.org encumbered/dev/scsi.cc 2795517Snate@binkert.org encumbered/dev/scsi_ctrl.cc 2805517Snate@binkert.org encumbered/dev/scsi_disk.cc 2815517Snate@binkert.org encumbered/dev/scsi_none.cc 2825517Snate@binkert.org encumbered/dev/tlaser_clock.cc 2835517Snate@binkert.org encumbered/dev/tlaser_ipi.cc 2845517Snate@binkert.org encumbered/dev/tlaser_mbox.cc 2855517Snate@binkert.org encumbered/dev/tlaser_mc146818.cc 2865517Snate@binkert.org encumbered/dev/tlaser_node.cc 2875517Snate@binkert.org encumbered/dev/tlaser_pcia.cc 2885517Snate@binkert.org encumbered/dev/tlaser_pcidev.cc 2895517Snate@binkert.org encumbered/dev/tlaser_serial.cc 2905517Snate@binkert.org encumbered/dev/turbolaser.cc 2915517Snate@binkert.org encumbered/dev/uart8530.cc 2925517Snate@binkert.org ''') 2935517Snate@binkert.org 2945798Snate@binkert.org# Syscall emulation (non-full-system) sources 2955798Snate@binkert.orgsyscall_emulation_sources = Split(''' 2965517Snate@binkert.org cpu/memtest/memtest.cc 2975517Snate@binkert.org encumbered/eio/eio.cc 2985517Snate@binkert.org encumbered/eio/exolex.cc 2995517Snate@binkert.org encumbered/eio/libexo.cc 3005517Snate@binkert.org kern/linux/linux.cc 3015517Snate@binkert.org kern/tru64/tru64.cc 3025517Snate@binkert.org sim/process.cc 3035517Snate@binkert.org sim/syscall_emul.cc 3045517Snate@binkert.org ''') 3055517Snate@binkert.org 3065517Snate@binkert.org# Add a flag defining what THE_ISA should be for all compilation 3075517Snate@binkert.orgenv.Append(CPPDEFINES=[('THE_ISA','%s_ISA' % env['TARGET_ISA'].upper())]) 3085517Snate@binkert.org 3095522Snate@binkert.orgarch_sources = SConscript('arch/SConscript', 3105517Snate@binkert.org exports = 'env', duplicate = False) 3115517Snate@binkert.org 3125517Snate@binkert.orgcpu_sources = SConscript('cpu/SConscript', 3135517Snate@binkert.org exports = 'env', duplicate = False) 3144762Snate@binkert.org 3155517Snate@binkert.org# This is outside of cpu/SConscript since the source directory isn't 3165517Snate@binkert.org# underneath 'cpu'. 3174762Snate@binkert.orgif 'FullCPU' in env['CPU_MODELS']: 3185517Snate@binkert.org cpu_sources += full_cpu_sources 3194762Snate@binkert.org 3205517Snate@binkert.org# Set up complete list of sources based on configuration. 3215517Snate@binkert.orgsources = base_sources + arch_sources + cpu_sources 3225517Snate@binkert.org 3235517Snate@binkert.orgif env['FULL_SYSTEM']: 3245517Snate@binkert.org sources += full_system_sources 3255517Snate@binkert.org if env['ALPHA_TLASER']: 3265517Snate@binkert.org sources += turbolaser_sources 3275517Snate@binkert.orgelse: 3285517Snate@binkert.org sources += syscall_emulation_sources 3295517Snate@binkert.org 3305517Snate@binkert.orgif env['USE_MYSQL']: 3315517Snate@binkert.org sources += mysql_sources 3325517Snate@binkert.org 3335517Snate@binkert.orgfor opt in env.ExportOptions: 3345517Snate@binkert.org env.ConfigFile(opt) 3355517Snate@binkert.org 3365517Snate@binkert.org################################################### 3375517Snate@binkert.org# 3385517Snate@binkert.org# Special build rules. 3395517Snate@binkert.org# 3405517Snate@binkert.org################################################### 3415517Snate@binkert.org 3425517Snate@binkert.org# base/traceflags.{cc,hh} are generated from base/traceflags.py. 3434762Snate@binkert.org# $TARGET.base will expand to "<build-dir>/base/traceflags". 3444762Snate@binkert.orgenv.Command(Split('base/traceflags.hh base/traceflags.cc'), 3454762Snate@binkert.org 'base/traceflags.py', 3464762Snate@binkert.org 'python $SOURCE $TARGET.base') 3474762Snate@binkert.org 3484762Snate@binkert.org# libelf build is described in its own SConscript file. 3495517Snate@binkert.org# SConscript-local is the per-config build, which just copies some 3504762Snate@binkert.org# header files into a place where they can be found. 3514762Snate@binkert.orgSConscript('libelf/SConscript-local', exports = 'env', duplicate=0) 3524762Snate@binkert.orgSConscript('python/SConscript', exports = ['env'], duplicate=0) 3534762Snate@binkert.org 3544382Sbinkertn@umich.edu# This function adds the specified sources to the given build 3554382Sbinkertn@umich.edu# environment, and returns a list of all the corresponding SCons 3565798Snate@binkert.org# Object nodes (including an extra one for date.cc). We explicitly 3575798Snate@binkert.org# add the Object nodes so we can set up special dependencies for 3585824Ssaidi@eecs.umich.edu# date.cc. 3595798Snate@binkert.orgdef make_objs(sources, env): 3605798Snate@binkert.org objs = [env.Object(s) for s in sources] 3615798Snate@binkert.org # make date.cc depend on all other objects so it always gets 3625798Snate@binkert.org # recompiled whenever anything else does 3635798Snate@binkert.org date_obj = env.Object('base/date.cc') 3645824Ssaidi@eecs.umich.edu env.Depends(date_obj, objs) 3655824Ssaidi@eecs.umich.edu objs.append(date_obj) 3665824Ssaidi@eecs.umich.edu return objs 3675824Ssaidi@eecs.umich.edu 3685798Snate@binkert.org################################################### 3695798Snate@binkert.org# 3705798Snate@binkert.org# Define binaries. Each different build type (debug, opt, etc.) gets 3715798Snate@binkert.org# a slightly different build environment. 3725798Snate@binkert.org# 3735798Snate@binkert.org################################################### 3745798Snate@binkert.org 3755517Snate@binkert.org# Include file paths are rooted in this directory. SCons will 3765517Snate@binkert.org# automatically expand '.' to refer to both the source directory and 3775517Snate@binkert.org# the corresponding build directory to pick up generated include 3785517Snate@binkert.org# files. 3795798Snate@binkert.orgenv.Append(CPPPATH='.') 3805798Snate@binkert.orgenv.Append(CPPPATH='./libelf') 3815824Ssaidi@eecs.umich.edu 3825517Snate@binkert.org# Debug binary 3835517Snate@binkert.orgdebugEnv = env.Copy(OBJSUFFIX='.do') 3845798Snate@binkert.orgdebugEnv.Label = 'debug' 3855798Snate@binkert.orgdebugEnv.Append(CCFLAGS=Split('-g -gdwarf-2 -O0')) 3865798Snate@binkert.orgdebugEnv.Append(CPPDEFINES='DEBUG') 3875798Snate@binkert.orgtlist = debugEnv.Program(target = 'm5.debug', 3885798Snate@binkert.org source = make_objs(sources, debugEnv)) 3895517Snate@binkert.orgdebugEnv.M5Binary = tlist[0] 3905517Snate@binkert.org 3915517Snate@binkert.org# Optimized binary 3925517Snate@binkert.orgoptEnv = env.Copy() 3935517Snate@binkert.orgoptEnv.Label = 'opt' 3945517Snate@binkert.orgoptEnv.Append(CCFLAGS=Split('-g -O5')) 3955517Snate@binkert.orgtlist = optEnv.Program(target = 'm5.opt', 3965517Snate@binkert.org source = make_objs(sources, optEnv)) 3975798Snate@binkert.orgoptEnv.M5Binary = tlist[0] 3985798Snate@binkert.org 3995798Snate@binkert.org# "Fast" binary 4005798Snate@binkert.orgfastEnv = env.Copy(OBJSUFFIX='.fo') 4015798Snate@binkert.orgfastEnv.Label = 'fast' 4025798Snate@binkert.orgfastEnv.Append(CCFLAGS=Split('-O5')) 4035517Snate@binkert.orgfastEnv.Append(CPPDEFINES='NDEBUG') 4045517Snate@binkert.orgfastEnv.Program(target = 'm5.fast.unstripped', 4055517Snate@binkert.org source = make_objs(sources, fastEnv)) 4065517Snate@binkert.orgtlist = fastEnv.Command(target = 'm5.fast', 4075517Snate@binkert.org source = 'm5.fast.unstripped', 4085517Snate@binkert.org action = 'strip $SOURCE -o $TARGET') 4095517Snate@binkert.orgfastEnv.M5Binary = tlist[0] 4105517Snate@binkert.org 4115517Snate@binkert.org# Profiled binary 4124762Snate@binkert.orgprofEnv = env.Copy(OBJSUFFIX='.po') 4134382Sbinkertn@umich.eduprofEnv.Label = 'prof' 4144762Snate@binkert.orgprofEnv.Append(CCFLAGS=Split('-O5 -g -pg'), LINKFLAGS='-pg') 4155517Snate@binkert.orgtlist = profEnv.Program(target = 'm5.prof', 4164382Sbinkertn@umich.edu source = make_objs(sources, profEnv)) 4174382Sbinkertn@umich.eduprofEnv.M5Binary = tlist[0] 4184762Snate@binkert.org 4194762Snate@binkert.orgenvList = [debugEnv, optEnv, fastEnv, profEnv] 4204762Snate@binkert.org 4214762Snate@binkert.orgReturn('envList') 4224762Snate@binkert.org