SConscript revision 1762
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 292665Ssaidi@eecs.umich.eduimport os 30955SN/Aimport sys 31955SN/Afrom os.path import isdir 32955SN/A 33955SN/A# This file defines how to build a particular configuration of M5 34955SN/A# based on variable settings in the 'env' build environment. 352632Sstever@eecs.umich.edu 362632Sstever@eecs.umich.edu# Import build environment variable from SConstruct. 372632Sstever@eecs.umich.eduImport('env') 382632Sstever@eecs.umich.edu 39955SN/A################################################### 402632Sstever@eecs.umich.edu# 412632Sstever@eecs.umich.edu# Define needed sources. 422632Sstever@eecs.umich.edu# 432632Sstever@eecs.umich.edu################################################### 442632Sstever@eecs.umich.edu 452632Sstever@eecs.umich.edu# Base sources used by all configurations. 462632Sstever@eecs.umich.edubase_sources = Split(''' 472632Sstever@eecs.umich.edu arch/alpha/decoder.cc 482632Sstever@eecs.umich.edu arch/alpha/alpha_o3_exec.cc 492632Sstever@eecs.umich.edu arch/alpha/fast_cpu_exec.cc 502632Sstever@eecs.umich.edu arch/alpha/simple_cpu_exec.cc 512632Sstever@eecs.umich.edu arch/alpha/full_cpu_exec.cc 522632Sstever@eecs.umich.edu arch/alpha/faults.cc 532632Sstever@eecs.umich.edu arch/alpha/isa_traits.cc 542632Sstever@eecs.umich.edu 552632Sstever@eecs.umich.edu base/circlebuf.cc 562632Sstever@eecs.umich.edu base/copyright.cc 572632Sstever@eecs.umich.edu base/cprintf.cc 582632Sstever@eecs.umich.edu base/embedfile.cc 592632Sstever@eecs.umich.edu base/fast_alloc.cc 60955SN/A base/fifo_buffer.cc 61955SN/A base/hostinfo.cc 62955SN/A base/hybrid_pred.cc 63955SN/A base/inifile.cc 64955SN/A base/intmath.cc 65955SN/A base/match.cc 66955SN/A base/misc.cc 672656Sstever@eecs.umich.edu base/output.cc 682656Sstever@eecs.umich.edu base/pollevent.cc 692656Sstever@eecs.umich.edu base/python.cc 702656Sstever@eecs.umich.edu base/range.cc 712656Sstever@eecs.umich.edu base/random.cc 722656Sstever@eecs.umich.edu base/sat_counter.cc 732656Sstever@eecs.umich.edu base/socket.cc 742653Sstever@eecs.umich.edu base/statistics.cc 752653Sstever@eecs.umich.edu base/str.cc 762653Sstever@eecs.umich.edu base/time.cc 772653Sstever@eecs.umich.edu base/trace.cc 782653Sstever@eecs.umich.edu base/traceflags.cc 792653Sstever@eecs.umich.edu base/userinfo.cc 802653Sstever@eecs.umich.edu base/compression/lzss_compression.cc 812653Sstever@eecs.umich.edu base/loader/aout_object.cc 822653Sstever@eecs.umich.edu base/loader/ecoff_object.cc 832653Sstever@eecs.umich.edu base/loader/elf_object.cc 842653Sstever@eecs.umich.edu base/loader/object_file.cc 851852SN/A base/loader/symtab.cc 86955SN/A base/stats/events.cc 87955SN/A base/stats/python.cc 88955SN/A base/stats/statdb.cc 892632Sstever@eecs.umich.edu base/stats/visit.cc 902632Sstever@eecs.umich.edu base/stats/text.cc 91955SN/A 921533SN/A cpu/base.cc 932632Sstever@eecs.umich.edu cpu/base_dyn_inst.cc 941533SN/A cpu/exec_context.cc 95955SN/A cpu/exetrace.cc 96955SN/A cpu/pc_event.cc 972632Sstever@eecs.umich.edu cpu/static_inst.cc 982632Sstever@eecs.umich.edu cpu/o3/2bit_local_pred.cc 99955SN/A cpu/o3/alpha_dyn_inst.cc 100955SN/A cpu/o3/alpha_cpu.cc 101955SN/A cpu/o3/alpha_cpu_builder.cc 102955SN/A cpu/o3/bpred_unit.cc 1032632Sstever@eecs.umich.edu cpu/o3/btb.cc 104955SN/A cpu/o3/commit.cc 1052632Sstever@eecs.umich.edu cpu/o3/decode.cc 106955SN/A cpu/o3/fetch.cc 107955SN/A cpu/o3/free_list.cc 1082632Sstever@eecs.umich.edu cpu/o3/cpu.cc 1092632Sstever@eecs.umich.edu cpu/o3/iew.cc 1102632Sstever@eecs.umich.edu cpu/o3/inst_queue.cc 1112632Sstever@eecs.umich.edu cpu/o3/ldstq.cc 1122632Sstever@eecs.umich.edu cpu/o3/mem_dep_unit.cc 1132632Sstever@eecs.umich.edu cpu/o3/ras.cc 1142632Sstever@eecs.umich.edu cpu/o3/rename.cc 1152632Sstever@eecs.umich.edu cpu/o3/rename_map.cc 1162632Sstever@eecs.umich.edu cpu/o3/rob.cc 1172632Sstever@eecs.umich.edu cpu/o3/sat_counter.cc 1182632Sstever@eecs.umich.edu cpu/o3/store_set.cc 1192632Sstever@eecs.umich.edu cpu/o3/tournament_pred.cc 1202632Sstever@eecs.umich.edu cpu/fast/cpu.cc 1212632Sstever@eecs.umich.edu cpu/sampler/sampler.cc 1222632Sstever@eecs.umich.edu cpu/simple/cpu.cc 1232632Sstever@eecs.umich.edu cpu/trace/reader/mem_trace_reader.cc 1242632Sstever@eecs.umich.edu cpu/trace/reader/ibm_reader.cc 1252634Sstever@eecs.umich.edu cpu/trace/reader/itx_reader.cc 1262634Sstever@eecs.umich.edu cpu/trace/reader/m5_reader.cc 1272632Sstever@eecs.umich.edu 1282638Sstever@eecs.umich.edu encumbered/cpu/full/bpred.cc 1292632Sstever@eecs.umich.edu encumbered/cpu/full/commit.cc 1302632Sstever@eecs.umich.edu encumbered/cpu/full/cpu.cc 1312632Sstever@eecs.umich.edu encumbered/cpu/full/create_vector.cc 1322632Sstever@eecs.umich.edu encumbered/cpu/full/cv_spec_state.cc 1332632Sstever@eecs.umich.edu encumbered/cpu/full/dd_queue.cc 1342632Sstever@eecs.umich.edu encumbered/cpu/full/dep_link.cc 1351858SN/A encumbered/cpu/full/dispatch.cc 1362638Sstever@eecs.umich.edu encumbered/cpu/full/dyn_inst.cc 1372638Sstever@eecs.umich.edu encumbered/cpu/full/execute.cc 1382638Sstever@eecs.umich.edu encumbered/cpu/full/fetch.cc 1392638Sstever@eecs.umich.edu encumbered/cpu/full/floss_reasons.cc 1402638Sstever@eecs.umich.edu encumbered/cpu/full/fu_pool.cc 1412638Sstever@eecs.umich.edu encumbered/cpu/full/inst_fifo.cc 1422638Sstever@eecs.umich.edu encumbered/cpu/full/instpipe.cc 1432638Sstever@eecs.umich.edu encumbered/cpu/full/issue.cc 1442634Sstever@eecs.umich.edu encumbered/cpu/full/ls_queue.cc 1452634Sstever@eecs.umich.edu encumbered/cpu/full/machine_queue.cc 1462634Sstever@eecs.umich.edu encumbered/cpu/full/pc_sample_profile.cc 147955SN/A encumbered/cpu/full/pipetrace.cc 148955SN/A encumbered/cpu/full/readyq.cc 149955SN/A encumbered/cpu/full/reg_info.cc 150955SN/A encumbered/cpu/full/rob_station.cc 151955SN/A encumbered/cpu/full/spec_memory.cc 152955SN/A encumbered/cpu/full/spec_state.cc 153955SN/A encumbered/cpu/full/storebuffer.cc 154955SN/A encumbered/cpu/full/writeback.cc 1551858SN/A encumbered/cpu/full/iq/iq_station.cc 1561858SN/A encumbered/cpu/full/iq/iqueue.cc 1572632Sstever@eecs.umich.edu encumbered/cpu/full/iq/segmented/chain_info.cc 158955SN/A encumbered/cpu/full/iq/segmented/chain_wire.cc 1591858SN/A encumbered/cpu/full/iq/segmented/iq_seg.cc 1601105SN/A encumbered/cpu/full/iq/segmented/iq_segmented.cc 1611869SN/A encumbered/cpu/full/iq/segmented/seg_chain.cc 1621869SN/A encumbered/cpu/full/iq/seznec/iq_seznec.cc 1631869SN/A encumbered/cpu/full/iq/standard/iq_standard.cc 1641869SN/A encumbered/mem/functional/main.cc 1651869SN/A 1661065SN/A mem/base_hier.cc 1672632Sstever@eecs.umich.edu mem/base_mem.cc 1682632Sstever@eecs.umich.edu mem/hier_params.cc 169955SN/A mem/mem_cmd.cc 1701858SN/A mem/mem_debug.cc 1711858SN/A mem/mem_req.cc 1721858SN/A mem/memory_interface.cc 1731858SN/A mem/bus/base_interface.cc 1741851SN/A mem/bus/bus.cc 1751851SN/A mem/bus/bus_bridge.cc 1761858SN/A mem/bus/bus_bridge_master.cc 1772632Sstever@eecs.umich.edu mem/bus/bus_bridge_slave.cc 178955SN/A mem/bus/bus_interface.cc 1792656Sstever@eecs.umich.edu mem/bus/dma_bus_interface.cc 1802656Sstever@eecs.umich.edu mem/bus/dma_interface.cc 1812656Sstever@eecs.umich.edu mem/bus/master_interface.cc 1822656Sstever@eecs.umich.edu mem/bus/slave_interface.cc 1832656Sstever@eecs.umich.edu mem/cache/base_cache.cc 1842656Sstever@eecs.umich.edu mem/cache/cache.cc 1852656Sstever@eecs.umich.edu mem/cache/cache_builder.cc 1862656Sstever@eecs.umich.edu mem/cache/coherence/coherence_protocol.cc 1872656Sstever@eecs.umich.edu mem/cache/coherence/uni_coherence.cc 1882656Sstever@eecs.umich.edu mem/cache/miss/blocking_buffer.cc 1892656Sstever@eecs.umich.edu mem/cache/miss/miss_queue.cc 1902656Sstever@eecs.umich.edu mem/cache/miss/mshr.cc 1912656Sstever@eecs.umich.edu mem/cache/miss/mshr_queue.cc 1922656Sstever@eecs.umich.edu mem/cache/prefetch/base_prefetcher.cc 1932656Sstever@eecs.umich.edu mem/cache/prefetch/ghb_prefetcher.cc 1942656Sstever@eecs.umich.edu mem/cache/prefetch/prefetcher.cc 1952655Sstever@eecs.umich.edu mem/cache/prefetch/stride_prefetcher.cc 1962655Sstever@eecs.umich.edu mem/cache/prefetch/tagged_prefetcher.cc 1971858SN/A mem/cache/tags/base_tags.cc 1981858SN/A mem/cache/tags/cache_tags.cc 1992638Sstever@eecs.umich.edu mem/cache/tags/fa_lru.cc 2002638Sstever@eecs.umich.edu mem/cache/tags/iic.cc 2012638Sstever@eecs.umich.edu mem/cache/tags/lru.cc 2022638Sstever@eecs.umich.edu mem/cache/tags/split.cc 2032638Sstever@eecs.umich.edu mem/cache/tags/split_lifo.cc 2041858SN/A mem/cache/tags/split_lru.cc 2051858SN/A mem/cache/tags/repl/gen.cc 2061858SN/A mem/cache/tags/repl/repl.cc 2071858SN/A mem/functional/functional.cc 2081858SN/A mem/timing/base_memory.cc 2091858SN/A mem/timing/memory_builder.cc 2101858SN/A mem/timing/simple_mem_bank.cc 2111859SN/A mem/trace/itx_writer.cc 2121858SN/A mem/trace/mem_trace_writer.cc 2131858SN/A mem/trace/m5_writer.cc 2141858SN/A 2151859SN/A python/pyconfig.cc 2161859SN/A python/embedded_py.cc 2171862SN/A 2181862SN/A sim/builder.cc 2191862SN/A sim/configfile.cc 2201862SN/A sim/debug.cc 2211859SN/A sim/eventq.cc 2221859SN/A sim/main.cc 2231963SN/A sim/param.cc 2241963SN/A sim/profile.cc 2251859SN/A sim/root.cc 2261859SN/A sim/serialize.cc 2271859SN/A sim/sim_events.cc 2281859SN/A sim/sim_exit.cc 2291859SN/A sim/sim_object.cc 2301859SN/A sim/startup.cc 2311859SN/A sim/stat_context.cc 2321859SN/A sim/stat_control.cc 2331862SN/A sim/trace_context.cc 2341859SN/A ''') 2351859SN/A 2361859SN/A# MySql sources 2371858SN/Amysql_sources = Split(''' 2381858SN/A base/mysql.cc 2392139SN/A base/stats/mysql.cc 2402139SN/A ''') 2412139SN/A 2422155SN/A# Full-system sources 2432623SN/Afull_system_sources = Split(''' 2442637Sstever@eecs.umich.edu arch/alpha/alpha_memory.cc 2452155SN/A arch/alpha/arguments.cc 2461869SN/A arch/alpha/ev5.cc 2471869SN/A arch/alpha/osfpal.cc 2481869SN/A arch/alpha/pseudo_inst.cc 2491869SN/A arch/alpha/vtophys.cc 2501869SN/A 2512139SN/A base/crc.cc 2521869SN/A base/inet.cc 2532508SN/A base/remote_gdb.cc 2542508SN/A 2552508SN/A cpu/intr_control.cc 2562508SN/A 2572635Sstever@eecs.umich.edu dev/alpha_console.cc 2582635Sstever@eecs.umich.edu dev/baddev.cc 2591869SN/A dev/simconsole.cc 2601869SN/A dev/disk_image.cc 2611869SN/A dev/etherbus.cc 2621869SN/A dev/etherdump.cc 2631869SN/A dev/etherint.cc 2641869SN/A dev/etherlink.cc 2651869SN/A dev/etherpkt.cc 2661869SN/A dev/ethertap.cc 2671965SN/A dev/ide_ctrl.cc 2681965SN/A dev/ide_disk.cc 2691965SN/A dev/io_device.cc 2701869SN/A dev/ns_gige.cc 2711869SN/A dev/pciconfigall.cc 2721869SN/A dev/pcidev.cc 2731869SN/A dev/pktfifo.cc 2741884SN/A dev/platform.cc 2751884SN/A dev/sinic.cc 2761884SN/A dev/simple_disk.cc 2771869SN/A dev/tsunami.cc 2781858SN/A dev/tsunami_cchip.cc 2791869SN/A dev/tsunami_fake.cc 2801869SN/A dev/tsunami_io.cc 2811869SN/A dev/tsunami_pchip.cc 2821869SN/A dev/uart.cc 2831869SN/A dev/uart8250.cc 2841858SN/A 2851869SN/A kern/kernel_binning.cc 2861869SN/A kern/kernel_stats.cc 2871869SN/A kern/system_events.cc 2881869SN/A kern/linux/linux_events.cc 2891869SN/A kern/linux/linux_syscalls.cc 2901869SN/A kern/linux/linux_system.cc 2911869SN/A kern/linux/printk.cc 2921869SN/A kern/tru64/dump_mbuf.cc 2931869SN/A kern/tru64/printf.cc 2941869SN/A kern/tru64/tru64_events.cc 2951858SN/A kern/tru64/tru64_syscalls.cc 296955SN/A kern/tru64/tru64_system.cc 297955SN/A 2981869SN/A mem/functional/memory_control.cc 2991869SN/A mem/functional/physical.cc 3001869SN/A 3011869SN/A sim/system.cc 3021869SN/A ''') 3031869SN/A 3041869SN/A# turbolaser encumbered sources 3051869SN/Aturbolaser_sources = Split(''' 3061869SN/A encumbered/dev/dma.cc 3071869SN/A encumbered/dev/etherdev.cc 3081869SN/A encumbered/dev/scsi.cc 3091869SN/A encumbered/dev/scsi_ctrl.cc 3101869SN/A encumbered/dev/scsi_disk.cc 3111869SN/A encumbered/dev/scsi_none.cc 3121869SN/A encumbered/dev/tlaser_clock.cc 3131869SN/A encumbered/dev/tlaser_ipi.cc 3141869SN/A encumbered/dev/tlaser_mbox.cc 3151869SN/A encumbered/dev/tlaser_mc146818.cc 3161869SN/A encumbered/dev/tlaser_node.cc 3171869SN/A encumbered/dev/tlaser_pcia.cc 3181869SN/A encumbered/dev/tlaser_pcidev.cc 3191869SN/A encumbered/dev/tlaser_serial.cc 3201869SN/A encumbered/dev/turbolaser.cc 3211869SN/A encumbered/dev/uart8530.cc 3221869SN/A ''') 3231869SN/A 3241869SN/A# Syscall emulation (non-full-system) sources 3251869SN/Asyscall_emulation_sources = Split(''' 3261869SN/A arch/alpha/alpha_common_syscall_emul.cc 3271869SN/A arch/alpha/alpha_linux_process.cc 3281869SN/A arch/alpha/alpha_tru64_process.cc 3291869SN/A cpu/memtest/memtest.cc 3301869SN/A cpu/trace/opt_cpu.cc 3311869SN/A cpu/trace/trace_cpu.cc 3321869SN/A encumbered/eio/eio.cc 3331869SN/A encumbered/eio/exolex.cc 3341869SN/A encumbered/eio/libexo.cc 3351869SN/A sim/process.cc 3361869SN/A sim/syscall_emul.cc 3372655Sstever@eecs.umich.edu ''') 3382655Sstever@eecs.umich.edu 3392655Sstever@eecs.umich.edutargetarch_files = Split(''' 3402655Sstever@eecs.umich.edu alpha_common_syscall_emul.hh 3412655Sstever@eecs.umich.edu alpha_linux_process.hh 3422655Sstever@eecs.umich.edu alpha_memory.hh 3432655Sstever@eecs.umich.edu alpha_tru64_process.hh 3442655Sstever@eecs.umich.edu aout_machdep.h 3452655Sstever@eecs.umich.edu arguments.hh 3462655Sstever@eecs.umich.edu byte_swap.hh 3472655Sstever@eecs.umich.edu ecoff_machdep.h 3482655Sstever@eecs.umich.edu elf_machdep.h 3492655Sstever@eecs.umich.edu ev5.hh 3502655Sstever@eecs.umich.edu faults.hh 3512655Sstever@eecs.umich.edu isa_fullsys_traits.hh 3522655Sstever@eecs.umich.edu isa_traits.hh 3532655Sstever@eecs.umich.edu osfpal.hh 3542655Sstever@eecs.umich.edu pseudo_inst.hh 3552655Sstever@eecs.umich.edu vptr.hh 3562655Sstever@eecs.umich.edu vtophys.hh 3572655Sstever@eecs.umich.edu ''') 3582655Sstever@eecs.umich.edu 3592655Sstever@eecs.umich.edufor f in targetarch_files: 3602655Sstever@eecs.umich.edu env.Command('targetarch/' + f, 'arch/alpha/' + f, 3612655Sstever@eecs.umich.edu '''echo '#include "arch/alpha/%s"' > $TARGET''' % f) 3622655Sstever@eecs.umich.edu 3632634Sstever@eecs.umich.edu 3642634Sstever@eecs.umich.edu# Set up complete list of sources based on configuration. 3652634Sstever@eecs.umich.edusources = base_sources 3662634Sstever@eecs.umich.edu 3672634Sstever@eecs.umich.eduif env['FULL_SYSTEM']: 3682634Sstever@eecs.umich.edu sources += full_system_sources 3692638Sstever@eecs.umich.edu if env['ALPHA_TLASER']: 3702638Sstever@eecs.umich.edu sources += turbolaser_sources 3712638Sstever@eecs.umich.eduelse: 3722638Sstever@eecs.umich.edu sources += syscall_emulation_sources 3732638Sstever@eecs.umich.edu 3741869SN/Aextra_libraries = [] 3751869SN/Aenv.Append(LIBS=['z']) 376955SN/Aif isdir('/usr/lib64/mysql') or isdir('/usr/lib/mysql') or \ 377955SN/A isdir('/usr/local/lib/mysql'): 378955SN/A print 'Compiling with MySQL support!' 379955SN/A env.Append(LIBPATH=['/usr/lib64/mysql', '/usr/local/lib/mysql/', 3801858SN/A '/usr/lib/mysql']) 3811858SN/A env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql']) 3821858SN/A sources += mysql_sources 3832632Sstever@eecs.umich.edu env.Append(CPPDEFINES = 'USE_MYSQL') 3842632Sstever@eecs.umich.edu env.Append(CPPDEFINES = 'STATS_BINNING') 3852632Sstever@eecs.umich.edu env.Append(LIBS=['mysqlclient']) 3862632Sstever@eecs.umich.edu 3872632Sstever@eecs.umich.edu################################################### 3882634Sstever@eecs.umich.edu# 3892638Sstever@eecs.umich.edu# Special build rules. 3902023SN/A# 3912632Sstever@eecs.umich.edu################################################### 3922632Sstever@eecs.umich.edu 3932632Sstever@eecs.umich.edu# base/traceflags.{cc,hh} are generated from base/traceflags.py. 3942632Sstever@eecs.umich.edu# $TARGET.base will expand to "<build-dir>/base/traceflags". 3952632Sstever@eecs.umich.eduenv.Command(Split('base/traceflags.hh base/traceflags.cc'), 3962632Sstever@eecs.umich.edu 'base/traceflags.py', 3972632Sstever@eecs.umich.edu 'python $SOURCE $TARGET.base') 3982632Sstever@eecs.umich.edu 3992632Sstever@eecs.umich.edu# several files are generated from arch/$TARGET_ISA/isa_desc. 4002632Sstever@eecs.umich.eduenv.Command(Split('''arch/alpha/decoder.cc 4012632Sstever@eecs.umich.edu arch/alpha/decoder.hh 4022023SN/A arch/alpha/alpha_o3_exec.cc 4032632Sstever@eecs.umich.edu arch/alpha/fast_cpu_exec.cc 4042632Sstever@eecs.umich.edu arch/alpha/simple_cpu_exec.cc 4051889SN/A arch/alpha/full_cpu_exec.cc'''), 4061889SN/A Split('''arch/alpha/isa_desc 4072632Sstever@eecs.umich.edu arch/isa_parser.py'''), 4082632Sstever@eecs.umich.edu '$SRCDIR/arch/isa_parser.py $SOURCE $TARGET.dir arch/alpha') 4092632Sstever@eecs.umich.edu 4102632Sstever@eecs.umich.edu 4112632Sstever@eecs.umich.edu# libelf build is described in its own SConscript file. 4122632Sstever@eecs.umich.edu# SConscript-local is the per-config build, which just copies some 4132632Sstever@eecs.umich.edu# header files into a place where they can be found. 4142632Sstever@eecs.umich.eduSConscript('libelf/SConscript-local', exports = 'env', duplicate=0) 4152632Sstever@eecs.umich.eduSConscript('python/SConscript', exports = ['env'], duplicate=0) 4162632Sstever@eecs.umich.edu 4172632Sstever@eecs.umich.edu# This function adds the specified sources to the given build 4182632Sstever@eecs.umich.edu# environment, and returns a list of all the corresponding SCons 4192632Sstever@eecs.umich.edu# Object nodes (including an extra one for date.cc). We explicitly 4202632Sstever@eecs.umich.edu# add the Object nodes so we can set up special dependencies for 4211888SN/A# date.cc. 4221888SN/Adef make_objs(sources, env): 4231869SN/A objs = [env.Object(s) for s in sources] 4241869SN/A # make date.cc depend on all other objects so it always gets 4251858SN/A # recompiled whenever anything else does 4262598SN/A date_obj = env.Object('base/date.cc') 4272598SN/A env.Depends(date_obj, objs) 4282598SN/A objs.append(date_obj) 4292598SN/A objs.extend(extra_libraries) 4302598SN/A return objs 4311858SN/A 4321858SN/A################################################### 4331858SN/A# 4341858SN/A# Define binaries. Each different build type (debug, opt, etc.) gets 4351858SN/A# a slightly different build environment. 4361858SN/A# 4371858SN/A################################################### 4381858SN/A 4391858SN/A# Include file paths are rooted in this directory. SCons will 4401871SN/A# automatically expand '.' to refer to both the source directory and 4411858SN/A# the corresponding build directory to pick up generated include 4421858SN/A# files. 4431858SN/Aenv.Append(CPPPATH='.') 4441858SN/A 4451858SN/A# Debug binary 4461858SN/Adebug = env.Copy(OBJSUFFIX='.do') 4471858SN/Adebug.Append(CCFLAGS=Split('-g -gstabs+ -O0')) 4481858SN/Adebug.Append(CPPDEFINES='DEBUG') 4491858SN/Adebug.Program(target = 'm5.debug', source = make_objs(sources, debug)) 4501858SN/A 4511858SN/A# Optimized binary 4521859SN/Aopt = env.Copy() 4531859SN/Aopt.Append(CCFLAGS=Split('-g -O5')) 4541869SN/Aopt.Program(target = 'm5.opt', source = make_objs(sources, opt)) 4551888SN/A 4562632Sstever@eecs.umich.edu# "Fast" binary 4571869SN/Afast = env.Copy(OBJSUFFIX='.fo') 4581884SN/Afast.Append(CCFLAGS=Split('-O5')) 4591884SN/Afast.Append(CPPDEFINES='NDEBUG') 4601884SN/Afast.Program(target = 'm5.fast.unstripped', source = make_objs(sources, fast)) 4611884SN/Afast.Command(target = 'm5.fast', source = 'm5.fast.unstripped', 4621884SN/A action = 'strip $SOURCE -o $TARGET') 4631884SN/A 4641965SN/A# Profiled binary 4651965SN/Aprof = env.Copy(OBJSUFFIX='.po') 4661965SN/Aprof.Append(CCFLAGS=Split('-O5 -g -pg'), LINKFLAGS='-pg') 467955SN/Aprof.Program(target = 'm5.prof', source = make_objs(sources, prof)) 4681869SN/A