SConscript revision 1762
17161Sgblack@eecs.umich.edu# -*- mode:python -*- 27161Sgblack@eecs.umich.edu 37161Sgblack@eecs.umich.edu# Copyright (c) 2004-2005 The Regents of The University of Michigan 47161Sgblack@eecs.umich.edu# All rights reserved. 57161Sgblack@eecs.umich.edu# 67161Sgblack@eecs.umich.edu# Redistribution and use in source and binary forms, with or without 77161Sgblack@eecs.umich.edu# modification, are permitted provided that the following conditions are 87161Sgblack@eecs.umich.edu# met: redistributions of source code must retain the above copyright 97161Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer; 107161Sgblack@eecs.umich.edu# redistributions in binary form must reproduce the above copyright 117161Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer in the 127161Sgblack@eecs.umich.edu# documentation and/or other materials provided with the distribution; 137161Sgblack@eecs.umich.edu# neither the name of the copyright holders nor the names of its 147161Sgblack@eecs.umich.edu# contributors may be used to endorse or promote products derived from 157161Sgblack@eecs.umich.edu# this software without specific prior written permission. 167161Sgblack@eecs.umich.edu# 177161Sgblack@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 187161Sgblack@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 197161Sgblack@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 207161Sgblack@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 217161Sgblack@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 227161Sgblack@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 237161Sgblack@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 247161Sgblack@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 257161Sgblack@eecs.umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 267161Sgblack@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 277161Sgblack@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 287161Sgblack@eecs.umich.edu 297161Sgblack@eecs.umich.eduimport os 307161Sgblack@eecs.umich.eduimport sys 317161Sgblack@eecs.umich.edufrom os.path import isdir 327161Sgblack@eecs.umich.edu 337161Sgblack@eecs.umich.edu# This file defines how to build a particular configuration of M5 347161Sgblack@eecs.umich.edu# based on variable settings in the 'env' build environment. 357161Sgblack@eecs.umich.edu 367161Sgblack@eecs.umich.edu# Import build environment variable from SConstruct. 377161Sgblack@eecs.umich.eduImport('env') 387161Sgblack@eecs.umich.edu 397161Sgblack@eecs.umich.edu################################################### 407161Sgblack@eecs.umich.edu# 417161Sgblack@eecs.umich.edu# Define needed sources. 427161Sgblack@eecs.umich.edu# 437161Sgblack@eecs.umich.edu################################################### 447161Sgblack@eecs.umich.edu 457161Sgblack@eecs.umich.edu# Base sources used by all configurations. 467161Sgblack@eecs.umich.edubase_sources = Split(''' 477161Sgblack@eecs.umich.edu arch/alpha/decoder.cc 487161Sgblack@eecs.umich.edu arch/alpha/alpha_o3_exec.cc 497161Sgblack@eecs.umich.edu arch/alpha/fast_cpu_exec.cc 507161Sgblack@eecs.umich.edu arch/alpha/simple_cpu_exec.cc 517161Sgblack@eecs.umich.edu arch/alpha/full_cpu_exec.cc 527162Sgblack@eecs.umich.edu arch/alpha/faults.cc 537161Sgblack@eecs.umich.edu arch/alpha/isa_traits.cc 547162Sgblack@eecs.umich.edu 557161Sgblack@eecs.umich.edu base/circlebuf.cc 567161Sgblack@eecs.umich.edu base/copyright.cc 577161Sgblack@eecs.umich.edu base/cprintf.cc 587162Sgblack@eecs.umich.edu base/embedfile.cc 597161Sgblack@eecs.umich.edu base/fast_alloc.cc 607162Sgblack@eecs.umich.edu base/fifo_buffer.cc 617161Sgblack@eecs.umich.edu base/hostinfo.cc 627161Sgblack@eecs.umich.edu base/hybrid_pred.cc 637162Sgblack@eecs.umich.edu base/inifile.cc 647161Sgblack@eecs.umich.edu base/intmath.cc 657162Sgblack@eecs.umich.edu base/match.cc 667161Sgblack@eecs.umich.edu base/misc.cc 677161Sgblack@eecs.umich.edu base/output.cc 687162Sgblack@eecs.umich.edu base/pollevent.cc 697161Sgblack@eecs.umich.edu base/python.cc 707162Sgblack@eecs.umich.edu base/range.cc 717161Sgblack@eecs.umich.edu base/random.cc 727161Sgblack@eecs.umich.edu base/sat_counter.cc 737161Sgblack@eecs.umich.edu base/socket.cc 747162Sgblack@eecs.umich.edu base/statistics.cc 757161Sgblack@eecs.umich.edu base/str.cc 767162Sgblack@eecs.umich.edu base/time.cc 777161Sgblack@eecs.umich.edu base/trace.cc 787161Sgblack@eecs.umich.edu base/traceflags.cc 797161Sgblack@eecs.umich.edu base/userinfo.cc 807162Sgblack@eecs.umich.edu base/compression/lzss_compression.cc 817161Sgblack@eecs.umich.edu base/loader/aout_object.cc 827162Sgblack@eecs.umich.edu base/loader/ecoff_object.cc 837161Sgblack@eecs.umich.edu base/loader/elf_object.cc 847161Sgblack@eecs.umich.edu base/loader/object_file.cc 857161Sgblack@eecs.umich.edu base/loader/symtab.cc 867162Sgblack@eecs.umich.edu base/stats/events.cc 877161Sgblack@eecs.umich.edu base/stats/python.cc 887162Sgblack@eecs.umich.edu base/stats/statdb.cc 897161Sgblack@eecs.umich.edu base/stats/visit.cc 907161Sgblack@eecs.umich.edu base/stats/text.cc 917161Sgblack@eecs.umich.edu 927161Sgblack@eecs.umich.edu cpu/base.cc 937161Sgblack@eecs.umich.edu cpu/base_dyn_inst.cc 947161Sgblack@eecs.umich.edu cpu/exec_context.cc 957161Sgblack@eecs.umich.edu cpu/exetrace.cc 967161Sgblack@eecs.umich.edu cpu/pc_event.cc 977161Sgblack@eecs.umich.edu cpu/static_inst.cc 987161Sgblack@eecs.umich.edu cpu/o3/2bit_local_pred.cc 997161Sgblack@eecs.umich.edu cpu/o3/alpha_dyn_inst.cc 1007161Sgblack@eecs.umich.edu cpu/o3/alpha_cpu.cc 1017161Sgblack@eecs.umich.edu cpu/o3/alpha_cpu_builder.cc 1027161Sgblack@eecs.umich.edu cpu/o3/bpred_unit.cc 1037161Sgblack@eecs.umich.edu cpu/o3/btb.cc 1047161Sgblack@eecs.umich.edu cpu/o3/commit.cc 1057161Sgblack@eecs.umich.edu cpu/o3/decode.cc 1067161Sgblack@eecs.umich.edu cpu/o3/fetch.cc 1077161Sgblack@eecs.umich.edu cpu/o3/free_list.cc 1087162Sgblack@eecs.umich.edu cpu/o3/cpu.cc 1097161Sgblack@eecs.umich.edu cpu/o3/iew.cc 1107162Sgblack@eecs.umich.edu cpu/o3/inst_queue.cc 1117161Sgblack@eecs.umich.edu cpu/o3/ldstq.cc 1127162Sgblack@eecs.umich.edu cpu/o3/mem_dep_unit.cc 1137161Sgblack@eecs.umich.edu cpu/o3/ras.cc 1147162Sgblack@eecs.umich.edu cpu/o3/rename.cc 1157161Sgblack@eecs.umich.edu cpu/o3/rename_map.cc 1167161Sgblack@eecs.umich.edu cpu/o3/rob.cc 1177161Sgblack@eecs.umich.edu cpu/o3/sat_counter.cc 1187161Sgblack@eecs.umich.edu cpu/o3/store_set.cc 1197162Sgblack@eecs.umich.edu cpu/o3/tournament_pred.cc 1207161Sgblack@eecs.umich.edu cpu/fast/cpu.cc 1217162Sgblack@eecs.umich.edu cpu/sampler/sampler.cc 1227161Sgblack@eecs.umich.edu cpu/simple/cpu.cc 1237161Sgblack@eecs.umich.edu cpu/trace/reader/mem_trace_reader.cc 1247161Sgblack@eecs.umich.edu cpu/trace/reader/ibm_reader.cc 1257162Sgblack@eecs.umich.edu cpu/trace/reader/itx_reader.cc 1267161Sgblack@eecs.umich.edu cpu/trace/reader/m5_reader.cc 1277162Sgblack@eecs.umich.edu 1287161Sgblack@eecs.umich.edu encumbered/cpu/full/bpred.cc 1297161Sgblack@eecs.umich.edu encumbered/cpu/full/commit.cc 1307161Sgblack@eecs.umich.edu encumbered/cpu/full/cpu.cc 1317161Sgblack@eecs.umich.edu encumbered/cpu/full/create_vector.cc 1327161Sgblack@eecs.umich.edu encumbered/cpu/full/cv_spec_state.cc 1337162Sgblack@eecs.umich.edu encumbered/cpu/full/dd_queue.cc 1347161Sgblack@eecs.umich.edu encumbered/cpu/full/dep_link.cc 1357162Sgblack@eecs.umich.edu encumbered/cpu/full/dispatch.cc 1367161Sgblack@eecs.umich.edu encumbered/cpu/full/dyn_inst.cc 1377162Sgblack@eecs.umich.edu encumbered/cpu/full/execute.cc 1387161Sgblack@eecs.umich.edu encumbered/cpu/full/fetch.cc 1397162Sgblack@eecs.umich.edu encumbered/cpu/full/floss_reasons.cc 1407161Sgblack@eecs.umich.edu encumbered/cpu/full/fu_pool.cc 1417161Sgblack@eecs.umich.edu encumbered/cpu/full/inst_fifo.cc 1427161Sgblack@eecs.umich.edu encumbered/cpu/full/instpipe.cc 1437161Sgblack@eecs.umich.edu encumbered/cpu/full/issue.cc 1447162Sgblack@eecs.umich.edu encumbered/cpu/full/ls_queue.cc 1457161Sgblack@eecs.umich.edu encumbered/cpu/full/machine_queue.cc 1467162Sgblack@eecs.umich.edu encumbered/cpu/full/pc_sample_profile.cc 1477161Sgblack@eecs.umich.edu encumbered/cpu/full/pipetrace.cc 1487162Sgblack@eecs.umich.edu encumbered/cpu/full/readyq.cc 1497161Sgblack@eecs.umich.edu encumbered/cpu/full/reg_info.cc 1507162Sgblack@eecs.umich.edu encumbered/cpu/full/rob_station.cc 1517161Sgblack@eecs.umich.edu encumbered/cpu/full/spec_memory.cc 1527161Sgblack@eecs.umich.edu encumbered/cpu/full/spec_state.cc 1537161Sgblack@eecs.umich.edu encumbered/cpu/full/storebuffer.cc 1547161Sgblack@eecs.umich.edu encumbered/cpu/full/writeback.cc 1557161Sgblack@eecs.umich.edu encumbered/cpu/full/iq/iq_station.cc 1567161Sgblack@eecs.umich.edu encumbered/cpu/full/iq/iqueue.cc 1577161Sgblack@eecs.umich.edu encumbered/cpu/full/iq/segmented/chain_info.cc 1587161Sgblack@eecs.umich.edu encumbered/cpu/full/iq/segmented/chain_wire.cc 1597161Sgblack@eecs.umich.edu encumbered/cpu/full/iq/segmented/iq_seg.cc 1607161Sgblack@eecs.umich.edu encumbered/cpu/full/iq/segmented/iq_segmented.cc 1617161Sgblack@eecs.umich.edu encumbered/cpu/full/iq/segmented/seg_chain.cc 1627161Sgblack@eecs.umich.edu encumbered/cpu/full/iq/seznec/iq_seznec.cc 1637161Sgblack@eecs.umich.edu encumbered/cpu/full/iq/standard/iq_standard.cc 1647161Sgblack@eecs.umich.edu encumbered/mem/functional/main.cc 1657161Sgblack@eecs.umich.edu 1667161Sgblack@eecs.umich.edu mem/base_hier.cc 1677161Sgblack@eecs.umich.edu mem/base_mem.cc 1687161Sgblack@eecs.umich.edu mem/hier_params.cc 1697161Sgblack@eecs.umich.edu mem/mem_cmd.cc 1707161Sgblack@eecs.umich.edu mem/mem_debug.cc 1717161Sgblack@eecs.umich.edu mem/mem_req.cc 1727161Sgblack@eecs.umich.edu mem/memory_interface.cc 1737162Sgblack@eecs.umich.edu mem/bus/base_interface.cc 1747161Sgblack@eecs.umich.edu mem/bus/bus.cc 1757162Sgblack@eecs.umich.edu mem/bus/bus_bridge.cc 1767161Sgblack@eecs.umich.edu mem/bus/bus_bridge_master.cc 1777161Sgblack@eecs.umich.edu mem/bus/bus_bridge_slave.cc 1787162Sgblack@eecs.umich.edu mem/bus/bus_interface.cc 1797161Sgblack@eecs.umich.edu mem/bus/dma_bus_interface.cc 1807161Sgblack@eecs.umich.edu mem/bus/dma_interface.cc 1817161Sgblack@eecs.umich.edu mem/bus/master_interface.cc 1827161Sgblack@eecs.umich.edu mem/bus/slave_interface.cc 1837161Sgblack@eecs.umich.edu mem/cache/base_cache.cc 1847162Sgblack@eecs.umich.edu mem/cache/cache.cc 1857161Sgblack@eecs.umich.edu mem/cache/cache_builder.cc 1867162Sgblack@eecs.umich.edu mem/cache/coherence/coherence_protocol.cc 1877161Sgblack@eecs.umich.edu mem/cache/coherence/uni_coherence.cc 1887162Sgblack@eecs.umich.edu mem/cache/miss/blocking_buffer.cc 1897161Sgblack@eecs.umich.edu mem/cache/miss/miss_queue.cc 1907162Sgblack@eecs.umich.edu mem/cache/miss/mshr.cc 1917161Sgblack@eecs.umich.edu mem/cache/miss/mshr_queue.cc 1927161Sgblack@eecs.umich.edu mem/cache/prefetch/base_prefetcher.cc 1937161Sgblack@eecs.umich.edu mem/cache/prefetch/ghb_prefetcher.cc 1947161Sgblack@eecs.umich.edu mem/cache/prefetch/prefetcher.cc 1957162Sgblack@eecs.umich.edu mem/cache/prefetch/stride_prefetcher.cc 1967161Sgblack@eecs.umich.edu mem/cache/prefetch/tagged_prefetcher.cc 1977162Sgblack@eecs.umich.edu mem/cache/tags/base_tags.cc 1987161Sgblack@eecs.umich.edu mem/cache/tags/cache_tags.cc 1997162Sgblack@eecs.umich.edu mem/cache/tags/fa_lru.cc 2007161Sgblack@eecs.umich.edu mem/cache/tags/iic.cc 2017162Sgblack@eecs.umich.edu mem/cache/tags/lru.cc 2027161Sgblack@eecs.umich.edu mem/cache/tags/split.cc 2037161Sgblack@eecs.umich.edu mem/cache/tags/split_lifo.cc 2047161Sgblack@eecs.umich.edu mem/cache/tags/split_lru.cc 2057161Sgblack@eecs.umich.edu mem/cache/tags/repl/gen.cc 2067161Sgblack@eecs.umich.edu mem/cache/tags/repl/repl.cc 2077162Sgblack@eecs.umich.edu mem/functional/functional.cc 2087161Sgblack@eecs.umich.edu mem/timing/base_memory.cc 2097162Sgblack@eecs.umich.edu mem/timing/memory_builder.cc 2107161Sgblack@eecs.umich.edu mem/timing/simple_mem_bank.cc 2117161Sgblack@eecs.umich.edu mem/trace/itx_writer.cc 2127161Sgblack@eecs.umich.edu mem/trace/mem_trace_writer.cc 2137162Sgblack@eecs.umich.edu mem/trace/m5_writer.cc 2147161Sgblack@eecs.umich.edu 2157162Sgblack@eecs.umich.edu python/pyconfig.cc 2167161Sgblack@eecs.umich.edu python/embedded_py.cc 2177161Sgblack@eecs.umich.edu 2187161Sgblack@eecs.umich.edu sim/builder.cc 2197161Sgblack@eecs.umich.edu sim/configfile.cc 2207161Sgblack@eecs.umich.edu sim/debug.cc 2217162Sgblack@eecs.umich.edu sim/eventq.cc 2227161Sgblack@eecs.umich.edu sim/main.cc 2237162Sgblack@eecs.umich.edu sim/param.cc 2247161Sgblack@eecs.umich.edu sim/profile.cc 2257161Sgblack@eecs.umich.edu sim/root.cc 2267161Sgblack@eecs.umich.edu sim/serialize.cc 2277162Sgblack@eecs.umich.edu sim/sim_events.cc 2287161Sgblack@eecs.umich.edu sim/sim_exit.cc 2297162Sgblack@eecs.umich.edu sim/sim_object.cc 2307161Sgblack@eecs.umich.edu sim/startup.cc 2317161Sgblack@eecs.umich.edu sim/stat_context.cc 2327161Sgblack@eecs.umich.edu sim/stat_control.cc 2337161Sgblack@eecs.umich.edu sim/trace_context.cc 2347161Sgblack@eecs.umich.edu ''') 2357162Sgblack@eecs.umich.edu 2367161Sgblack@eecs.umich.edu# MySql sources 2377162Sgblack@eecs.umich.edumysql_sources = Split(''' 2387161Sgblack@eecs.umich.edu base/mysql.cc 2397161Sgblack@eecs.umich.edu base/stats/mysql.cc 2407161Sgblack@eecs.umich.edu ''') 2417162Sgblack@eecs.umich.edu 2427161Sgblack@eecs.umich.edu# Full-system sources 2437162Sgblack@eecs.umich.edufull_system_sources = Split(''' 2447161Sgblack@eecs.umich.edu arch/alpha/alpha_memory.cc 2457161Sgblack@eecs.umich.edu arch/alpha/arguments.cc 2467161Sgblack@eecs.umich.edu arch/alpha/ev5.cc 2477161Sgblack@eecs.umich.edu arch/alpha/osfpal.cc 2487161Sgblack@eecs.umich.edu arch/alpha/pseudo_inst.cc 2497162Sgblack@eecs.umich.edu arch/alpha/vtophys.cc 2507161Sgblack@eecs.umich.edu 2517162Sgblack@eecs.umich.edu base/crc.cc 2527161Sgblack@eecs.umich.edu base/inet.cc 2537161Sgblack@eecs.umich.edu base/remote_gdb.cc 2547161Sgblack@eecs.umich.edu 2557162Sgblack@eecs.umich.edu cpu/intr_control.cc 2567161Sgblack@eecs.umich.edu 2577162Sgblack@eecs.umich.edu dev/alpha_console.cc 2587161Sgblack@eecs.umich.edu dev/baddev.cc 2597161Sgblack@eecs.umich.edu dev/simconsole.cc 2607161Sgblack@eecs.umich.edu dev/disk_image.cc 2617161Sgblack@eecs.umich.edu dev/etherbus.cc 2627162Sgblack@eecs.umich.edu dev/etherdump.cc 2637161Sgblack@eecs.umich.edu dev/etherint.cc 2647162Sgblack@eecs.umich.edu dev/etherlink.cc 2657161Sgblack@eecs.umich.edu dev/etherpkt.cc 2667161Sgblack@eecs.umich.edu dev/ethertap.cc 2677161Sgblack@eecs.umich.edu dev/ide_ctrl.cc 2687161Sgblack@eecs.umich.edu dev/ide_disk.cc 2697161Sgblack@eecs.umich.edu dev/io_device.cc 2707243Sgblack@eecs.umich.edu dev/ns_gige.cc 2717161Sgblack@eecs.umich.edu dev/pciconfigall.cc 2727243Sgblack@eecs.umich.edu dev/pcidev.cc 2737161Sgblack@eecs.umich.edu dev/pktfifo.cc 2747161Sgblack@eecs.umich.edu dev/platform.cc 2757161Sgblack@eecs.umich.edu dev/sinic.cc 2767161Sgblack@eecs.umich.edu dev/simple_disk.cc 2777161Sgblack@eecs.umich.edu dev/tsunami.cc 2787161Sgblack@eecs.umich.edu dev/tsunami_cchip.cc 2797161Sgblack@eecs.umich.edu dev/tsunami_fake.cc 2807161Sgblack@eecs.umich.edu dev/tsunami_io.cc 2817161Sgblack@eecs.umich.edu dev/tsunami_pchip.cc 2827161Sgblack@eecs.umich.edu dev/uart.cc 2837161Sgblack@eecs.umich.edu dev/uart8250.cc 2847161Sgblack@eecs.umich.edu 2857161Sgblack@eecs.umich.edu kern/kernel_binning.cc 2867161Sgblack@eecs.umich.edu kern/kernel_stats.cc 2877161Sgblack@eecs.umich.edu kern/system_events.cc 2887161Sgblack@eecs.umich.edu kern/linux/linux_events.cc 2897161Sgblack@eecs.umich.edu kern/linux/linux_syscalls.cc 2907161Sgblack@eecs.umich.edu kern/linux/linux_system.cc 2917162Sgblack@eecs.umich.edu kern/linux/printk.cc 2927161Sgblack@eecs.umich.edu kern/tru64/dump_mbuf.cc 2937161Sgblack@eecs.umich.edu kern/tru64/printf.cc 2947161Sgblack@eecs.umich.edu kern/tru64/tru64_events.cc 2957161Sgblack@eecs.umich.edu kern/tru64/tru64_syscalls.cc 2967318Sgblack@eecs.umich.edu kern/tru64/tru64_system.cc 2977161Sgblack@eecs.umich.edu 2987161Sgblack@eecs.umich.edu mem/functional/memory_control.cc 2997161Sgblack@eecs.umich.edu mem/functional/physical.cc 3007161Sgblack@eecs.umich.edu 3017162Sgblack@eecs.umich.edu sim/system.cc 3027161Sgblack@eecs.umich.edu ''') 3037161Sgblack@eecs.umich.edu 3047161Sgblack@eecs.umich.edu# turbolaser encumbered sources 3057161Sgblack@eecs.umich.eduturbolaser_sources = Split(''' 3067161Sgblack@eecs.umich.edu encumbered/dev/dma.cc 3077161Sgblack@eecs.umich.edu encumbered/dev/etherdev.cc 3087161Sgblack@eecs.umich.edu encumbered/dev/scsi.cc 3097161Sgblack@eecs.umich.edu encumbered/dev/scsi_ctrl.cc 3107161Sgblack@eecs.umich.edu encumbered/dev/scsi_disk.cc 3117162Sgblack@eecs.umich.edu encumbered/dev/scsi_none.cc 3127161Sgblack@eecs.umich.edu encumbered/dev/tlaser_clock.cc 3137161Sgblack@eecs.umich.edu encumbered/dev/tlaser_ipi.cc 3147161Sgblack@eecs.umich.edu encumbered/dev/tlaser_mbox.cc 3157162Sgblack@eecs.umich.edu encumbered/dev/tlaser_mc146818.cc 3167161Sgblack@eecs.umich.edu encumbered/dev/tlaser_node.cc 3177162Sgblack@eecs.umich.edu encumbered/dev/tlaser_pcia.cc 3187161Sgblack@eecs.umich.edu encumbered/dev/tlaser_pcidev.cc 3197162Sgblack@eecs.umich.edu encumbered/dev/tlaser_serial.cc 3207161Sgblack@eecs.umich.edu encumbered/dev/turbolaser.cc 3217162Sgblack@eecs.umich.edu encumbered/dev/uart8530.cc 3227161Sgblack@eecs.umich.edu ''') 3237161Sgblack@eecs.umich.edu 3247161Sgblack@eecs.umich.edu# Syscall emulation (non-full-system) sources 3257162Sgblack@eecs.umich.edusyscall_emulation_sources = Split(''' 3267161Sgblack@eecs.umich.edu arch/alpha/alpha_common_syscall_emul.cc 3277162Sgblack@eecs.umich.edu arch/alpha/alpha_linux_process.cc 3287161Sgblack@eecs.umich.edu arch/alpha/alpha_tru64_process.cc 3297161Sgblack@eecs.umich.edu cpu/memtest/memtest.cc 3307161Sgblack@eecs.umich.edu cpu/trace/opt_cpu.cc 3317161Sgblack@eecs.umich.edu cpu/trace/trace_cpu.cc 3327161Sgblack@eecs.umich.edu encumbered/eio/eio.cc 3337161Sgblack@eecs.umich.edu encumbered/eio/exolex.cc 3347162Sgblack@eecs.umich.edu encumbered/eio/libexo.cc 3357161Sgblack@eecs.umich.edu sim/process.cc 3367162Sgblack@eecs.umich.edu sim/syscall_emul.cc 3377161Sgblack@eecs.umich.edu ''') 3387161Sgblack@eecs.umich.edu 3397290Sgblack@eecs.umich.edutargetarch_files = Split(''' 3407161Sgblack@eecs.umich.edu alpha_common_syscall_emul.hh 3417161Sgblack@eecs.umich.edu alpha_linux_process.hh 3427162Sgblack@eecs.umich.edu alpha_memory.hh 3437161Sgblack@eecs.umich.edu alpha_tru64_process.hh 3447162Sgblack@eecs.umich.edu aout_machdep.h 3457161Sgblack@eecs.umich.edu arguments.hh 3467161Sgblack@eecs.umich.edu byte_swap.hh 3477161Sgblack@eecs.umich.edu ecoff_machdep.h 3487161Sgblack@eecs.umich.edu elf_machdep.h 3497161Sgblack@eecs.umich.edu ev5.hh 3507161Sgblack@eecs.umich.edu faults.hh 3517161Sgblack@eecs.umich.edu isa_fullsys_traits.hh 3527161Sgblack@eecs.umich.edu isa_traits.hh 3537161Sgblack@eecs.umich.edu osfpal.hh 3547161Sgblack@eecs.umich.edu pseudo_inst.hh 3557161Sgblack@eecs.umich.edu vptr.hh 3567161Sgblack@eecs.umich.edu vtophys.hh 3577161Sgblack@eecs.umich.edu ''') 3587161Sgblack@eecs.umich.edu 3597161Sgblack@eecs.umich.edufor f in targetarch_files: 3607161Sgblack@eecs.umich.edu env.Command('targetarch/' + f, 'arch/alpha/' + f, 3617161Sgblack@eecs.umich.edu '''echo '#include "arch/alpha/%s"' > $TARGET''' % f) 3627161Sgblack@eecs.umich.edu 3637161Sgblack@eecs.umich.edu 3647161Sgblack@eecs.umich.edu# Set up complete list of sources based on configuration. 3657161Sgblack@eecs.umich.edusources = base_sources 3667161Sgblack@eecs.umich.edu 3677161Sgblack@eecs.umich.eduif env['FULL_SYSTEM']: 3687161Sgblack@eecs.umich.edu sources += full_system_sources 3697161Sgblack@eecs.umich.edu if env['ALPHA_TLASER']: 3707162Sgblack@eecs.umich.edu sources += turbolaser_sources 3717161Sgblack@eecs.umich.eduelse: 3727162Sgblack@eecs.umich.edu sources += syscall_emulation_sources 3737161Sgblack@eecs.umich.edu 3747161Sgblack@eecs.umich.eduextra_libraries = [] 3757161Sgblack@eecs.umich.eduenv.Append(LIBS=['z']) 3767162Sgblack@eecs.umich.eduif isdir('/usr/lib64/mysql') or isdir('/usr/lib/mysql') or \ 3777161Sgblack@eecs.umich.edu isdir('/usr/local/lib/mysql'): 3787162Sgblack@eecs.umich.edu print 'Compiling with MySQL support!' 3797161Sgblack@eecs.umich.edu env.Append(LIBPATH=['/usr/lib64/mysql', '/usr/local/lib/mysql/', 3807161Sgblack@eecs.umich.edu '/usr/lib/mysql']) 3817161Sgblack@eecs.umich.edu env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql']) 3827161Sgblack@eecs.umich.edu sources += mysql_sources 3837161Sgblack@eecs.umich.edu env.Append(CPPDEFINES = 'USE_MYSQL') 3847162Sgblack@eecs.umich.edu env.Append(CPPDEFINES = 'STATS_BINNING') 3857161Sgblack@eecs.umich.edu env.Append(LIBS=['mysqlclient']) 3867162Sgblack@eecs.umich.edu 3877161Sgblack@eecs.umich.edu################################################### 3887161Sgblack@eecs.umich.edu# 3897161Sgblack@eecs.umich.edu# Special build rules. 3907162Sgblack@eecs.umich.edu# 3917161Sgblack@eecs.umich.edu################################################### 3927162Sgblack@eecs.umich.edu 3937161Sgblack@eecs.umich.edu# base/traceflags.{cc,hh} are generated from base/traceflags.py. 3947161Sgblack@eecs.umich.edu# $TARGET.base will expand to "<build-dir>/base/traceflags". 3957161Sgblack@eecs.umich.eduenv.Command(Split('base/traceflags.hh base/traceflags.cc'), 3967161Sgblack@eecs.umich.edu 'base/traceflags.py', 3977161Sgblack@eecs.umich.edu 'python $SOURCE $TARGET.base') 3987161Sgblack@eecs.umich.edu 3997161Sgblack@eecs.umich.edu# several files are generated from arch/$TARGET_ISA/isa_desc. 4007162Sgblack@eecs.umich.eduenv.Command(Split('''arch/alpha/decoder.cc 4017161Sgblack@eecs.umich.edu arch/alpha/decoder.hh 4027162Sgblack@eecs.umich.edu arch/alpha/alpha_o3_exec.cc 4037161Sgblack@eecs.umich.edu arch/alpha/fast_cpu_exec.cc 4047161Sgblack@eecs.umich.edu arch/alpha/simple_cpu_exec.cc 4057161Sgblack@eecs.umich.edu arch/alpha/full_cpu_exec.cc'''), 4067162Sgblack@eecs.umich.edu Split('''arch/alpha/isa_desc 4077161Sgblack@eecs.umich.edu arch/isa_parser.py'''), 4087162Sgblack@eecs.umich.edu '$SRCDIR/arch/isa_parser.py $SOURCE $TARGET.dir arch/alpha') 4097161Sgblack@eecs.umich.edu 4107161Sgblack@eecs.umich.edu 4117161Sgblack@eecs.umich.edu# libelf build is described in its own SConscript file. 4127161Sgblack@eecs.umich.edu# SConscript-local is the per-config build, which just copies some 4137161Sgblack@eecs.umich.edu# header files into a place where they can be found. 4147161Sgblack@eecs.umich.eduSConscript('libelf/SConscript-local', exports = 'env', duplicate=0) 4157161Sgblack@eecs.umich.eduSConscript('python/SConscript', exports = ['env'], duplicate=0) 4167162Sgblack@eecs.umich.edu 4177161Sgblack@eecs.umich.edu# This function adds the specified sources to the given build 4187162Sgblack@eecs.umich.edu# environment, and returns a list of all the corresponding SCons 4197161Sgblack@eecs.umich.edu# Object nodes (including an extra one for date.cc). We explicitly 4207161Sgblack@eecs.umich.edu# add the Object nodes so we can set up special dependencies for 4217161Sgblack@eecs.umich.edu# date.cc. 4227162Sgblack@eecs.umich.edudef make_objs(sources, env): 4237161Sgblack@eecs.umich.edu objs = [env.Object(s) for s in sources] 4247162Sgblack@eecs.umich.edu # make date.cc depend on all other objects so it always gets 4257161Sgblack@eecs.umich.edu # recompiled whenever anything else does 4267161Sgblack@eecs.umich.edu date_obj = env.Object('base/date.cc') 4277161Sgblack@eecs.umich.edu env.Depends(date_obj, objs) 4287161Sgblack@eecs.umich.edu objs.append(date_obj) 4297162Sgblack@eecs.umich.edu objs.extend(extra_libraries) 4307161Sgblack@eecs.umich.edu return objs 4317162Sgblack@eecs.umich.edu 4327161Sgblack@eecs.umich.edu################################################### 4337161Sgblack@eecs.umich.edu# 4347161Sgblack@eecs.umich.edu# Define binaries. Each different build type (debug, opt, etc.) gets 4357161Sgblack@eecs.umich.edu# a slightly different build environment. 4367161Sgblack@eecs.umich.edu# 4377161Sgblack@eecs.umich.edu################################################### 4387161Sgblack@eecs.umich.edu 4397161Sgblack@eecs.umich.edu# Include file paths are rooted in this directory. SCons will 4407161Sgblack@eecs.umich.edu# automatically expand '.' to refer to both the source directory and 4417161Sgblack@eecs.umich.edu# the corresponding build directory to pick up generated include 442# files. 443env.Append(CPPPATH='.') 444 445# Debug binary 446debug = env.Copy(OBJSUFFIX='.do') 447debug.Append(CCFLAGS=Split('-g -gstabs+ -O0')) 448debug.Append(CPPDEFINES='DEBUG') 449debug.Program(target = 'm5.debug', source = make_objs(sources, debug)) 450 451# Optimized binary 452opt = env.Copy() 453opt.Append(CCFLAGS=Split('-g -O5')) 454opt.Program(target = 'm5.opt', source = make_objs(sources, opt)) 455 456# "Fast" binary 457fast = env.Copy(OBJSUFFIX='.fo') 458fast.Append(CCFLAGS=Split('-O5')) 459fast.Append(CPPDEFINES='NDEBUG') 460fast.Program(target = 'm5.fast.unstripped', source = make_objs(sources, fast)) 461fast.Command(target = 'm5.fast', source = 'm5.fast.unstripped', 462 action = 'strip $SOURCE -o $TARGET') 463 464# Profiled binary 465prof = env.Copy(OBJSUFFIX='.po') 466prof.Append(CCFLAGS=Split('-O5 -g -pg'), LINKFLAGS='-pg') 467prof.Program(target = 'm5.prof', source = make_objs(sources, prof)) 468