SConscript revision 2395
12632Sstever@eecs.umich.edu# -*- mode:python -*- 22632Sstever@eecs.umich.edu 32632Sstever@eecs.umich.edu# Copyright (c) 2004-2005 The Regents of The University of Michigan 42632Sstever@eecs.umich.edu# All rights reserved. 52632Sstever@eecs.umich.edu# 62632Sstever@eecs.umich.edu# Redistribution and use in source and binary forms, with or without 72632Sstever@eecs.umich.edu# modification, are permitted provided that the following conditions are 84479Sbinkertn@umich.edu# met: redistributions of source code must retain the above copyright 92632Sstever@eecs.umich.edu# notice, this list of conditions and the following disclaimer; 102632Sstever@eecs.umich.edu# redistributions in binary form must reproduce the above copyright 114479Sbinkertn@umich.edu# notice, this list of conditions and the following disclaimer in the 122632Sstever@eecs.umich.edu# documentation and/or other materials provided with the distribution; 132632Sstever@eecs.umich.edu# neither the name of the copyright holders nor the names of its 142632Sstever@eecs.umich.edu# contributors may be used to endorse or promote products derived from 156498Snate@binkert.org# this software without specific prior written permission. 162632Sstever@eecs.umich.edu# 174479Sbinkertn@umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 184479Sbinkertn@umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 194479Sbinkertn@umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 204479Sbinkertn@umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 216498Snate@binkert.org# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 224479Sbinkertn@umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 234479Sbinkertn@umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 244479Sbinkertn@umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 254479Sbinkertn@umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 264479Sbinkertn@umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 274479Sbinkertn@umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 284479Sbinkertn@umich.edu 294479Sbinkertn@umich.eduimport os 304479Sbinkertn@umich.eduimport sys 314479Sbinkertn@umich.edufrom os.path import isdir 324479Sbinkertn@umich.edu 334479Sbinkertn@umich.edu# This file defines how to build a particular configuration of M5 344479Sbinkertn@umich.edu# based on variable settings in the 'env' build environment. 354479Sbinkertn@umich.edu 364479Sbinkertn@umich.edu# Import build environment variable from SConstruct. 374479Sbinkertn@umich.eduImport('env') 384479Sbinkertn@umich.edu 394479Sbinkertn@umich.edu################################################### 404479Sbinkertn@umich.edu# 416498Snate@binkert.org# Define needed sources. 424479Sbinkertn@umich.edu# 434479Sbinkertn@umich.edu################################################### 444479Sbinkertn@umich.edu 454479Sbinkertn@umich.edu# Base sources used by all configurations. 464479Sbinkertn@umich.edubase_sources = Split(''' 476498Snate@binkert.org arch/alpha/decoder.cc 484479Sbinkertn@umich.edu arch/alpha/alpha_o3_exec.cc 494479Sbinkertn@umich.edu arch/alpha/fast_cpu_exec.cc 504479Sbinkertn@umich.edu arch/alpha/simple_cpu_exec.cc 514479Sbinkertn@umich.edu arch/alpha/faults.cc 524479Sbinkertn@umich.edu arch/alpha/isa_traits.cc 534479Sbinkertn@umich.edu 544479Sbinkertn@umich.edu base/circlebuf.cc 554479Sbinkertn@umich.edu base/copyright.cc 564479Sbinkertn@umich.edu base/cprintf.cc 574479Sbinkertn@umich.edu base/embedfile.cc 584479Sbinkertn@umich.edu base/fast_alloc.cc 594479Sbinkertn@umich.edu base/fifo_buffer.cc 606498Snate@binkert.org base/hostinfo.cc 614479Sbinkertn@umich.edu base/hybrid_pred.cc 624479Sbinkertn@umich.edu base/inifile.cc 634479Sbinkertn@umich.edu base/intmath.cc 644479Sbinkertn@umich.edu base/match.cc 654479Sbinkertn@umich.edu base/misc.cc 666498Snate@binkert.org base/output.cc 674479Sbinkertn@umich.edu base/pollevent.cc 686498Snate@binkert.org base/range.cc 694479Sbinkertn@umich.edu base/random.cc 706498Snate@binkert.org base/sat_counter.cc 716498Snate@binkert.org base/socket.cc 726498Snate@binkert.org base/statistics.cc 736498Snate@binkert.org base/str.cc 746498Snate@binkert.org base/time.cc 754479Sbinkertn@umich.edu base/trace.cc 764479Sbinkertn@umich.edu base/traceflags.cc 774479Sbinkertn@umich.edu base/userinfo.cc 784479Sbinkertn@umich.edu base/compression/lzss_compression.cc 794479Sbinkertn@umich.edu base/loader/aout_object.cc 804479Sbinkertn@umich.edu base/loader/ecoff_object.cc 814479Sbinkertn@umich.edu base/loader/elf_object.cc 826498Snate@binkert.org base/loader/object_file.cc 836498Snate@binkert.org base/loader/symtab.cc 846498Snate@binkert.org base/stats/events.cc 856498Snate@binkert.org base/stats/statdb.cc 866498Snate@binkert.org base/stats/visit.cc 876498Snate@binkert.org base/stats/text.cc 886498Snate@binkert.org 896498Snate@binkert.org cpu/base.cc 906498Snate@binkert.org cpu/base_dyn_inst.cc 916498Snate@binkert.org cpu/exec_context.cc 926498Snate@binkert.org cpu/exetrace.cc 936498Snate@binkert.org cpu/pc_event.cc 946498Snate@binkert.org cpu/static_inst.cc 956498Snate@binkert.org cpu/o3/2bit_local_pred.cc 966498Snate@binkert.org cpu/o3/alpha_dyn_inst.cc 976498Snate@binkert.org cpu/o3/alpha_cpu.cc 986498Snate@binkert.org cpu/o3/alpha_cpu_builder.cc 996498Snate@binkert.org cpu/o3/bpred_unit.cc 1006498Snate@binkert.org cpu/o3/btb.cc 1016498Snate@binkert.org cpu/o3/commit.cc 1024479Sbinkertn@umich.edu cpu/o3/decode.cc 1034479Sbinkertn@umich.edu cpu/o3/fetch.cc 1044479Sbinkertn@umich.edu cpu/o3/free_list.cc 1054479Sbinkertn@umich.edu cpu/o3/cpu.cc 1064479Sbinkertn@umich.edu cpu/o3/iew.cc 1074479Sbinkertn@umich.edu cpu/o3/inst_queue.cc 1084479Sbinkertn@umich.edu cpu/o3/ldstq.cc 1094479Sbinkertn@umich.edu cpu/o3/mem_dep_unit.cc 1104479Sbinkertn@umich.edu cpu/o3/ras.cc 1114479Sbinkertn@umich.edu cpu/o3/rename.cc 1124479Sbinkertn@umich.edu cpu/o3/rename_map.cc 1134479Sbinkertn@umich.edu cpu/o3/rob.cc 1144479Sbinkertn@umich.edu cpu/o3/sat_counter.cc 1152632Sstever@eecs.umich.edu cpu/o3/store_set.cc 1162632Sstever@eecs.umich.edu cpu/o3/tournament_pred.cc 1172632Sstever@eecs.umich.edu cpu/fast/cpu.cc 1182632Sstever@eecs.umich.edu cpu/sampler/sampler.cc 1192632Sstever@eecs.umich.edu cpu/simple/cpu.cc 1204479Sbinkertn@umich.edu cpu/trace/reader/mem_trace_reader.cc 1216498Snate@binkert.org cpu/trace/reader/ibm_reader.cc 1226498Snate@binkert.org cpu/trace/reader/itx_reader.cc 1236498Snate@binkert.org cpu/trace/reader/m5_reader.cc 1246498Snate@binkert.org cpu/trace/opt_cpu.cc 1252632Sstever@eecs.umich.edu cpu/trace/trace_cpu.cc 1262632Sstever@eecs.umich.edu 1274479Sbinkertn@umich.edu encumbered/mem/functional/main.cc 1284479Sbinkertn@umich.edu 1294479Sbinkertn@umich.edu mem/memory.cc 1302632Sstever@eecs.umich.edu mem/page_table.cc 1312632Sstever@eecs.umich.edu mem/physical.cc 1322632Sstever@eecs.umich.edu mem/proxy.cc 1334479Sbinkertn@umich.edu 1344479Sbinkertn@umich.edu python/pyconfig.cc 1354479Sbinkertn@umich.edu python/embedded_py.cc 1364479Sbinkertn@umich.edu 1372632Sstever@eecs.umich.edu sim/builder.cc 1382632Sstever@eecs.umich.edu sim/configfile.cc 1392632Sstever@eecs.umich.edu sim/debug.cc 1402632Sstever@eecs.umich.edu sim/eventq.cc 1414479Sbinkertn@umich.edu sim/main.cc 1424479Sbinkertn@umich.edu sim/param.cc 1434479Sbinkertn@umich.edu sim/profile.cc 1444479Sbinkertn@umich.edu sim/root.cc 1454479Sbinkertn@umich.edu sim/serialize.cc 1464479Sbinkertn@umich.edu sim/sim_events.cc 1474479Sbinkertn@umich.edu sim/sim_exit.cc 1484479Sbinkertn@umich.edu sim/sim_object.cc 1496498Snate@binkert.org sim/startup.cc 1504479Sbinkertn@umich.edu sim/stat_context.cc 1514479Sbinkertn@umich.edu sim/stat_control.cc 1524479Sbinkertn@umich.edu sim/system.cc 1534479Sbinkertn@umich.edu sim/trace_context.cc 1544479Sbinkertn@umich.edu ''') 1552632Sstever@eecs.umich.edu 1562632Sstever@eecs.umich.edufull_cpu_sources = Split(''' 1574479Sbinkertn@umich.edu arch/alpha/full_cpu_exec.cc 1584479Sbinkertn@umich.edu encumbered/cpu/full/bpred.cc 1592632Sstever@eecs.umich.edu encumbered/cpu/full/commit.cc 1602632Sstever@eecs.umich.edu encumbered/cpu/full/cpu.cc 1612632Sstever@eecs.umich.edu encumbered/cpu/full/create_vector.cc 1622632Sstever@eecs.umich.edu encumbered/cpu/full/cv_spec_state.cc 1632632Sstever@eecs.umich.edu encumbered/cpu/full/dd_queue.cc 1642632Sstever@eecs.umich.edu encumbered/cpu/full/dep_link.cc 1652632Sstever@eecs.umich.edu encumbered/cpu/full/dispatch.cc 1662632Sstever@eecs.umich.edu encumbered/cpu/full/dyn_inst.cc 1672632Sstever@eecs.umich.edu encumbered/cpu/full/execute.cc 1684479Sbinkertn@umich.edu encumbered/cpu/full/fetch.cc 1692632Sstever@eecs.umich.edu encumbered/cpu/full/floss_reasons.cc 1702632Sstever@eecs.umich.edu encumbered/cpu/full/inst_fifo.cc 1712632Sstever@eecs.umich.edu encumbered/cpu/full/instpipe.cc 1722632Sstever@eecs.umich.edu encumbered/cpu/full/issue.cc 1732632Sstever@eecs.umich.edu encumbered/cpu/full/ls_queue.cc 1744479Sbinkertn@umich.edu encumbered/cpu/full/machine_queue.cc 1754479Sbinkertn@umich.edu encumbered/cpu/full/pipetrace.cc 1762632Sstever@eecs.umich.edu encumbered/cpu/full/readyq.cc 1772632Sstever@eecs.umich.edu encumbered/cpu/full/reg_info.cc 1784479Sbinkertn@umich.edu encumbered/cpu/full/rob_station.cc 1794479Sbinkertn@umich.edu encumbered/cpu/full/spec_memory.cc 1804479Sbinkertn@umich.edu encumbered/cpu/full/spec_state.cc 1814479Sbinkertn@umich.edu encumbered/cpu/full/storebuffer.cc 1824479Sbinkertn@umich.edu encumbered/cpu/full/writeback.cc 1834479Sbinkertn@umich.edu encumbered/cpu/full/iq/iq_station.cc 1844479Sbinkertn@umich.edu encumbered/cpu/full/iq/iqueue.cc 1854479Sbinkertn@umich.edu encumbered/cpu/full/iq/segmented/chain_info.cc 1864479Sbinkertn@umich.edu encumbered/cpu/full/iq/segmented/chain_wire.cc 1874479Sbinkertn@umich.edu encumbered/cpu/full/iq/segmented/iq_seg.cc 1884479Sbinkertn@umich.edu encumbered/cpu/full/iq/segmented/iq_segmented.cc 1894479Sbinkertn@umich.edu encumbered/cpu/full/iq/segmented/seg_chain.cc 1904479Sbinkertn@umich.edu encumbered/cpu/full/iq/seznec/iq_seznec.cc 1914479Sbinkertn@umich.edu encumbered/cpu/full/iq/standard/iq_standard.cc 1926498Snate@binkert.org ''') 1934479Sbinkertn@umich.edu 1944479Sbinkertn@umich.edu# MySql sources 1954479Sbinkertn@umich.edumysql_sources = Split(''' 1964479Sbinkertn@umich.edu base/mysql.cc 1974479Sbinkertn@umich.edu base/stats/mysql.cc 1984479Sbinkertn@umich.edu ''') 1994479Sbinkertn@umich.edu 2004479Sbinkertn@umich.edu# Full-system sources 2014479Sbinkertn@umich.edufull_system_sources = Split(''' 2024479Sbinkertn@umich.edu arch/alpha/alpha_memory.cc 2034479Sbinkertn@umich.edu arch/alpha/arguments.cc 2044479Sbinkertn@umich.edu arch/alpha/ev5.cc 2054479Sbinkertn@umich.edu arch/alpha/osfpal.cc 2064479Sbinkertn@umich.edu arch/alpha/pseudo_inst.cc 2074479Sbinkertn@umich.edu arch/alpha/stacktrace.cc 2084479Sbinkertn@umich.edu arch/alpha/vtophys.cc 2094479Sbinkertn@umich.edu 2104479Sbinkertn@umich.edu base/crc.cc 2114479Sbinkertn@umich.edu base/inet.cc 2124479Sbinkertn@umich.edu base/remote_gdb.cc 2134479Sbinkertn@umich.edu 2144479Sbinkertn@umich.edu cpu/intr_control.cc 2154479Sbinkertn@umich.edu cpu/profile.cc 2164479Sbinkertn@umich.edu 2174479Sbinkertn@umich.edu dev/alpha_console.cc 2184479Sbinkertn@umich.edu dev/baddev.cc 2194479Sbinkertn@umich.edu dev/simconsole.cc 2204479Sbinkertn@umich.edu dev/disk_image.cc 2214479Sbinkertn@umich.edu dev/etherbus.cc 2224479Sbinkertn@umich.edu dev/etherdump.cc 2234479Sbinkertn@umich.edu dev/etherint.cc 2244479Sbinkertn@umich.edu dev/etherlink.cc 2254479Sbinkertn@umich.edu dev/etherpkt.cc 2264479Sbinkertn@umich.edu dev/ethertap.cc 2274479Sbinkertn@umich.edu dev/ide_ctrl.cc 2284479Sbinkertn@umich.edu dev/ide_disk.cc 2294479Sbinkertn@umich.edu dev/io_device.cc 2304479Sbinkertn@umich.edu dev/ns_gige.cc 2314479Sbinkertn@umich.edu dev/pciconfigall.cc 2324479Sbinkertn@umich.edu dev/pcidev.cc 2334479Sbinkertn@umich.edu dev/pcifake.cc 2344479Sbinkertn@umich.edu dev/pktfifo.cc 2356498Snate@binkert.org dev/platform.cc 2364479Sbinkertn@umich.edu dev/sinic.cc 2374479Sbinkertn@umich.edu dev/simple_disk.cc 2384479Sbinkertn@umich.edu dev/tsunami.cc 2392632Sstever@eecs.umich.edu dev/tsunami_cchip.cc 2402632Sstever@eecs.umich.edu dev/isa_fake.cc 2412632Sstever@eecs.umich.edu dev/tsunami_io.cc 2422632Sstever@eecs.umich.edu dev/tsunami_pchip.cc 2432632Sstever@eecs.umich.edu dev/uart.cc 2442632Sstever@eecs.umich.edu dev/uart8250.cc 2452632Sstever@eecs.umich.edu 2462632Sstever@eecs.umich.edu kern/kernel_binning.cc 2472632Sstever@eecs.umich.edu kern/kernel_stats.cc 2484479Sbinkertn@umich.edu kern/system_events.cc 2492632Sstever@eecs.umich.edu kern/freebsd/freebsd_system.cc 2502632Sstever@eecs.umich.edu kern/linux/linux_syscalls.cc 2512632Sstever@eecs.umich.edu kern/linux/linux_system.cc 2522632Sstever@eecs.umich.edu kern/linux/printk.cc 2532632Sstever@eecs.umich.edu kern/tru64/dump_mbuf.cc 2542632Sstever@eecs.umich.edu kern/tru64/printf.cc 2552632Sstever@eecs.umich.edu kern/tru64/tru64_events.cc 2562632Sstever@eecs.umich.edu kern/tru64/tru64_syscalls.cc 2572632Sstever@eecs.umich.edu kern/tru64/tru64_system.cc 2582632Sstever@eecs.umich.edu 2592632Sstever@eecs.umich.edu mem/functional/memory_control.cc 2602632Sstever@eecs.umich.edu ''') 2612632Sstever@eecs.umich.edu 2622632Sstever@eecs.umich.edu# turbolaser encumbered sources 2632632Sstever@eecs.umich.eduturbolaser_sources = Split(''' 2642632Sstever@eecs.umich.edu encumbered/dev/dma.cc 2652632Sstever@eecs.umich.edu encumbered/dev/etherdev.cc 2662632Sstever@eecs.umich.edu encumbered/dev/scsi.cc 2672632Sstever@eecs.umich.edu encumbered/dev/scsi_ctrl.cc 2682632Sstever@eecs.umich.edu encumbered/dev/scsi_disk.cc 2692632Sstever@eecs.umich.edu encumbered/dev/scsi_none.cc 2702632Sstever@eecs.umich.edu encumbered/dev/tlaser_clock.cc 2712632Sstever@eecs.umich.edu encumbered/dev/tlaser_ipi.cc 2726498Snate@binkert.org encumbered/dev/tlaser_mbox.cc 2732632Sstever@eecs.umich.edu encumbered/dev/tlaser_mc146818.cc 2742632Sstever@eecs.umich.edu encumbered/dev/tlaser_node.cc 2752632Sstever@eecs.umich.edu encumbered/dev/tlaser_pcia.cc 2762632Sstever@eecs.umich.edu encumbered/dev/tlaser_pcidev.cc 2772632Sstever@eecs.umich.edu encumbered/dev/tlaser_serial.cc 2784479Sbinkertn@umich.edu encumbered/dev/turbolaser.cc 2792632Sstever@eecs.umich.edu encumbered/dev/uart8530.cc 2802632Sstever@eecs.umich.edu ''') 2812632Sstever@eecs.umich.edu 2822632Sstever@eecs.umich.edu# Syscall emulation (non-full-system) sources 2832632Sstever@eecs.umich.edusyscall_emulation_sources = Split(''' 2842632Sstever@eecs.umich.edu arch/alpha/alpha_common_syscall_emul.cc 2852632Sstever@eecs.umich.edu arch/alpha/alpha_linux_process.cc 2864479Sbinkertn@umich.edu arch/alpha/alpha_tru64_process.cc 2872632Sstever@eecs.umich.edu cpu/memtest/memtest.cc 2882632Sstever@eecs.umich.edu encumbered/eio/eio.cc 2896498Snate@binkert.org encumbered/eio/exolex.cc 2902632Sstever@eecs.umich.edu encumbered/eio/libexo.cc 2914479Sbinkertn@umich.edu sim/process.cc 2924479Sbinkertn@umich.edu sim/syscall_emul.cc 2936498Snate@binkert.org ''') 2946498Snate@binkert.org 2956498Snate@binkert.orgtargetarch_files = Split(''' 2966498Snate@binkert.org alpha_common_syscall_emul.hh 2974479Sbinkertn@umich.edu alpha_linux_process.hh 2984479Sbinkertn@umich.edu alpha_memory.hh 2994479Sbinkertn@umich.edu alpha_tru64_process.hh 3004479Sbinkertn@umich.edu aout_machdep.h 3012632Sstever@eecs.umich.edu arguments.hh 3022632Sstever@eecs.umich.edu byte_swap.hh 3032632Sstever@eecs.umich.edu ecoff_machdep.h 3042632Sstever@eecs.umich.edu ev5.hh 3052632Sstever@eecs.umich.edu faults.hh 3062632Sstever@eecs.umich.edu isa_fullsys_traits.hh 3072632Sstever@eecs.umich.edu isa_traits.hh 3086498Snate@binkert.org osfpal.hh 3092632Sstever@eecs.umich.edu pseudo_inst.hh 3102632Sstever@eecs.umich.edu stacktrace.hh 3116498Snate@binkert.org vptr.hh 3126498Snate@binkert.org vtophys.hh 3132632Sstever@eecs.umich.edu ''') 3142632Sstever@eecs.umich.edu 3152632Sstever@eecs.umich.edufor f in targetarch_files: 3162632Sstever@eecs.umich.edu env.Command('targetarch/' + f, 'arch/alpha/' + f, 3172632Sstever@eecs.umich.edu '''echo '#include "arch/alpha/%s"' > $TARGET''' % f) 3184479Sbinkertn@umich.edu 3194479Sbinkertn@umich.edu 3204479Sbinkertn@umich.edu# Set up complete list of sources based on configuration. 3214479Sbinkertn@umich.edusources = base_sources 3224479Sbinkertn@umich.edu 3234479Sbinkertn@umich.eduif env['FULL_SYSTEM']: 3244479Sbinkertn@umich.edu sources += full_system_sources 3254479Sbinkertn@umich.edu if env['ALPHA_TLASER']: 3264479Sbinkertn@umich.edu sources += turbolaser_sources 3274479Sbinkertn@umich.eduelse: 3284479Sbinkertn@umich.edu sources += syscall_emulation_sources 3294479Sbinkertn@umich.edu 3304479Sbinkertn@umich.eduif env['USE_MYSQL']: 3314479Sbinkertn@umich.edu sources += mysql_sources 3324479Sbinkertn@umich.edu 3334479Sbinkertn@umich.edufor opt in env.ExportOptions: 3344479Sbinkertn@umich.edu env.ConfigFile(opt) 3354479Sbinkertn@umich.edu 3366498Snate@binkert.org################################################### 3376498Snate@binkert.org# 3386498Snate@binkert.org# Special build rules. 3396498Snate@binkert.org# 3406498Snate@binkert.org################################################### 3416498Snate@binkert.org 3426498Snate@binkert.org# base/traceflags.{cc,hh} are generated from base/traceflags.py. 3436498Snate@binkert.org# $TARGET.base will expand to "<build-dir>/base/traceflags". 3446498Snate@binkert.orgenv.Command(Split('base/traceflags.hh base/traceflags.cc'), 3456498Snate@binkert.org 'base/traceflags.py', 3464479Sbinkertn@umich.edu 'python $SOURCE $TARGET.base') 3474479Sbinkertn@umich.edu 3484479Sbinkertn@umich.edu# several files are generated from arch/$TARGET_ISA/isa_desc. 3494479Sbinkertn@umich.eduenv.Command(Split('''arch/alpha/decoder.cc 3504479Sbinkertn@umich.edu arch/alpha/decoder.hh 3514479Sbinkertn@umich.edu arch/alpha/alpha_o3_exec.cc 3524479Sbinkertn@umich.edu arch/alpha/fast_cpu_exec.cc 3534479Sbinkertn@umich.edu arch/alpha/simple_cpu_exec.cc'''), 3546498Snate@binkert.org Split('''arch/alpha/isa_desc 3556498Snate@binkert.org arch/isa_parser.py'''), 3564479Sbinkertn@umich.edu '$SRCDIR/arch/isa_parser.py $SOURCE $TARGET.dir arch/alpha') 3574479Sbinkertn@umich.edu 3584479Sbinkertn@umich.edu 3594479Sbinkertn@umich.edu# libelf build is described in its own SConscript file. 3604479Sbinkertn@umich.edu# SConscript-local is the per-config build, which just copies some 3614479Sbinkertn@umich.edu# header files into a place where they can be found. 3624479Sbinkertn@umich.eduSConscript('libelf/SConscript-local', exports = 'env', duplicate=0) 3634479Sbinkertn@umich.eduSConscript('python/SConscript', exports = ['env'], duplicate=0) 3644479Sbinkertn@umich.edu 3654479Sbinkertn@umich.edu# This function adds the specified sources to the given build 3664479Sbinkertn@umich.edu# environment, and returns a list of all the corresponding SCons 3676498Snate@binkert.org# Object nodes (including an extra one for date.cc). We explicitly 3684479Sbinkertn@umich.edu# add the Object nodes so we can set up special dependencies for 3694479Sbinkertn@umich.edu# date.cc. 3704479Sbinkertn@umich.edudef make_objs(sources, env): 3714479Sbinkertn@umich.edu objs = [env.Object(s) for s in sources] 3724479Sbinkertn@umich.edu # make date.cc depend on all other objects so it always gets 3734479Sbinkertn@umich.edu # recompiled whenever anything else does 3744479Sbinkertn@umich.edu date_obj = env.Object('base/date.cc') 3754479Sbinkertn@umich.edu env.Depends(date_obj, objs) 3764479Sbinkertn@umich.edu objs.append(date_obj) 3774479Sbinkertn@umich.edu return objs 3784479Sbinkertn@umich.edu 3794479Sbinkertn@umich.edu################################################### 3804479Sbinkertn@umich.edu# 3814479Sbinkertn@umich.edu# Define binaries. Each different build type (debug, opt, etc.) gets 3824479Sbinkertn@umich.edu# a slightly different build environment. 3834479Sbinkertn@umich.edu# 3844479Sbinkertn@umich.edu################################################### 3854479Sbinkertn@umich.edu 3864479Sbinkertn@umich.edu# Include file paths are rooted in this directory. SCons will 3874479Sbinkertn@umich.edu# automatically expand '.' to refer to both the source directory and 3884479Sbinkertn@umich.edu# the corresponding build directory to pick up generated include 3894479Sbinkertn@umich.edu# files. 3904479Sbinkertn@umich.eduenv.Append(CPPPATH='.') 3914479Sbinkertn@umich.edu 3926498Snate@binkert.org# Debug binary 3934479Sbinkertn@umich.edudebugEnv = env.Copy(OBJSUFFIX='.do') 3944479Sbinkertn@umich.edudebugEnv.Label = 'debug' 3954479Sbinkertn@umich.edudebugEnv.Append(CCFLAGS=Split('-g -gstabs+ -O0')) 3964479Sbinkertn@umich.edudebugEnv.Append(CPPDEFINES='DEBUG') 3972632Sstever@eecs.umich.edutlist = debugEnv.Program(target = 'm5.debug', 3982632Sstever@eecs.umich.edu source = make_objs(sources, debugEnv)) 3992632Sstever@eecs.umich.edudebugEnv.M5Binary = tlist[0] 4002632Sstever@eecs.umich.edu 4012632Sstever@eecs.umich.edu# Optimized binary 4022632Sstever@eecs.umich.eduoptEnv = env.Copy() 4032632Sstever@eecs.umich.eduoptEnv.Label = 'opt' 4042632Sstever@eecs.umich.eduoptEnv.Append(CCFLAGS=Split('-g -O5')) 4052632Sstever@eecs.umich.edutlist = optEnv.Program(target = 'm5.opt', 4062632Sstever@eecs.umich.edu source = make_objs(sources, optEnv)) 4072632Sstever@eecs.umich.eduoptEnv.M5Binary = tlist[0] 4082632Sstever@eecs.umich.edu 4094479Sbinkertn@umich.edu# "Fast" binary 4104479Sbinkertn@umich.edufastEnv = env.Copy(OBJSUFFIX='.fo') 4112632Sstever@eecs.umich.edufastEnv.Label = 'fast' 4122632Sstever@eecs.umich.edufastEnv.Append(CCFLAGS=Split('-O5')) 4132632Sstever@eecs.umich.edufastEnv.Append(CPPDEFINES='NDEBUG') 4142632Sstever@eecs.umich.edufastEnv.Program(target = 'm5.fast.unstripped', 4152632Sstever@eecs.umich.edu source = make_objs(sources, fastEnv)) 4166498Snate@binkert.orgtlist = fastEnv.Command(target = 'm5.fast', 4172632Sstever@eecs.umich.edu source = 'm5.fast.unstripped', 4182632Sstever@eecs.umich.edu action = 'strip $SOURCE -o $TARGET') 4192632Sstever@eecs.umich.edufastEnv.M5Binary = tlist[0] 4202632Sstever@eecs.umich.edu 4214479Sbinkertn@umich.edu# Profiled binary 4222632Sstever@eecs.umich.eduprofEnv = env.Copy(OBJSUFFIX='.po') 4234479Sbinkertn@umich.eduprofEnv.Label = 'prof' 4244479Sbinkertn@umich.eduprofEnv.Append(CCFLAGS=Split('-O5 -g -pg'), LINKFLAGS='-pg') 4254479Sbinkertn@umich.edutlist = profEnv.Program(target = 'm5.prof', 4262632Sstever@eecs.umich.edu source = make_objs(sources, profEnv)) 4272632Sstever@eecs.umich.eduprofEnv.M5Binary = tlist[0] 4282632Sstever@eecs.umich.edu 4292632Sstever@eecs.umich.eduenvList = [debugEnv, optEnv, fastEnv, profEnv] 4302632Sstever@eecs.umich.edu 4312632Sstever@eecs.umich.eduReturn('envList') 4324479Sbinkertn@umich.edu