SConscript revision 1742
1955SN/A# -*- mode:python -*-
2955SN/A
37816Ssteve.reinhardt@amd.com# Copyright (c) 2004 The Regents of The University of Michigan
45871Snate@binkert.org# All rights reserved.
51762SN/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.
28955SN/A
29955SN/Aimport os
302665Ssaidi@eecs.umich.eduimport sys
312665Ssaidi@eecs.umich.edufrom os.path import isdir
325863Snate@binkert.org
33955SN/A# This file defines how to build a particular configuration of M5
34955SN/A# based on variable settings in the 'env' build environment.
35955SN/A
36955SN/A# Import build environment variable from SConstruct.
37955SN/AImport('env')
388878Ssteve.reinhardt@amd.com
392632Sstever@eecs.umich.edu###################################################
408878Ssteve.reinhardt@amd.com#
412632Sstever@eecs.umich.edu# Define needed sources.
42955SN/A#
438878Ssteve.reinhardt@amd.com###################################################
442632Sstever@eecs.umich.edu
452761Sstever@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
492761Sstever@eecs.umich.edu	arch/alpha/fast_cpu_exec.cc
502761Sstever@eecs.umich.edu	arch/alpha/simple_cpu_exec.cc
512761Sstever@eecs.umich.edu	arch/alpha/full_cpu_exec.cc
528878Ssteve.reinhardt@amd.com	arch/alpha/faults.cc
538878Ssteve.reinhardt@amd.com	arch/alpha/isa_traits.cc
542761Sstever@eecs.umich.edu
552761Sstever@eecs.umich.edu	base/circlebuf.cc
562761Sstever@eecs.umich.edu	base/copyright.cc
572761Sstever@eecs.umich.edu	base/cprintf.cc
582761Sstever@eecs.umich.edu        base/embedfile.cc
598878Ssteve.reinhardt@amd.com	base/fast_alloc.cc
608878Ssteve.reinhardt@amd.com	base/fifo_buffer.cc
612632Sstever@eecs.umich.edu	base/hostinfo.cc
622632Sstever@eecs.umich.edu	base/hybrid_pred.cc
638878Ssteve.reinhardt@amd.com	base/inifile.cc
648878Ssteve.reinhardt@amd.com	base/intmath.cc
652632Sstever@eecs.umich.edu	base/match.cc
66955SN/A	base/misc.cc
67955SN/A	base/output.cc
68955SN/A	base/pollevent.cc
695863Snate@binkert.org	base/python.cc
705863Snate@binkert.org	base/range.cc
715863Snate@binkert.org	base/random.cc
725863Snate@binkert.org	base/sat_counter.cc
735863Snate@binkert.org	base/socket.cc
745863Snate@binkert.org	base/statistics.cc
755863Snate@binkert.org	base/str.cc
765863Snate@binkert.org	base/time.cc
775863Snate@binkert.org	base/trace.cc
785863Snate@binkert.org	base/traceflags.cc
795863Snate@binkert.org	base/userinfo.cc
808878Ssteve.reinhardt@amd.com	base/compression/lzss_compression.cc
815863Snate@binkert.org	base/loader/aout_object.cc
825863Snate@binkert.org	base/loader/ecoff_object.cc
835863Snate@binkert.org	base/loader/elf_object.cc
845863Snate@binkert.org	base/loader/object_file.cc
855863Snate@binkert.org	base/loader/symtab.cc
865863Snate@binkert.org	base/stats/events.cc
875863Snate@binkert.org	base/stats/python.cc
885863Snate@binkert.org	base/stats/statdb.cc
895863Snate@binkert.org	base/stats/visit.cc
905863Snate@binkert.org	base/stats/text.cc
915863Snate@binkert.org
925863Snate@binkert.org	cpu/base.cc
935863Snate@binkert.org        cpu/base_dyn_inst.cc
945863Snate@binkert.org	cpu/exec_context.cc
955863Snate@binkert.org	cpu/exetrace.cc
968878Ssteve.reinhardt@amd.com	cpu/pc_event.cc
975863Snate@binkert.org	cpu/static_inst.cc
985863Snate@binkert.org        cpu/o3/2bit_local_pred.cc
995863Snate@binkert.org        cpu/o3/alpha_dyn_inst.cc
1006654Snate@binkert.org        cpu/o3/alpha_cpu.cc
101955SN/A        cpu/o3/alpha_cpu_builder.cc
1025396Ssaidi@eecs.umich.edu        cpu/o3/bpred_unit.cc
1035863Snate@binkert.org        cpu/o3/btb.cc
1045863Snate@binkert.org        cpu/o3/commit.cc
1054202Sbinkertn@umich.edu        cpu/o3/decode.cc
1065863Snate@binkert.org        cpu/o3/fetch.cc
1075863Snate@binkert.org        cpu/o3/free_list.cc
1085863Snate@binkert.org        cpu/o3/cpu.cc
1095863Snate@binkert.org        cpu/o3/iew.cc
110955SN/A        cpu/o3/inst_queue.cc
1116654Snate@binkert.org        cpu/o3/ldstq.cc
1125273Sstever@gmail.com        cpu/o3/mem_dep_unit.cc
1135871Snate@binkert.org        cpu/o3/ras.cc
1145273Sstever@gmail.com        cpu/o3/rename.cc
1156655Snate@binkert.org        cpu/o3/rename_map.cc
1168878Ssteve.reinhardt@amd.com        cpu/o3/rob.cc
1176655Snate@binkert.org        cpu/o3/sat_counter.cc
1186655Snate@binkert.org        cpu/o3/store_set.cc
1199219Spower.jg@gmail.com        cpu/o3/tournament_pred.cc
1206655Snate@binkert.org	cpu/fast/cpu.cc
1215871Snate@binkert.org        cpu/sampler/sampler.cc
1226654Snate@binkert.org        cpu/simple/cpu.cc
1238947Sandreas.hansson@arm.com        cpu/trace/reader/mem_trace_reader.cc
1245396Ssaidi@eecs.umich.edu        cpu/trace/reader/ibm_reader.cc
1258120Sgblack@eecs.umich.edu        cpu/trace/reader/itx_reader.cc
1268120Sgblack@eecs.umich.edu        cpu/trace/reader/m5_reader.cc
1278120Sgblack@eecs.umich.edu
1288120Sgblack@eecs.umich.edu	encumbered/cpu/full/bpred.cc
1298120Sgblack@eecs.umich.edu	encumbered/cpu/full/commit.cc
1308120Sgblack@eecs.umich.edu	encumbered/cpu/full/cpu.cc
1318120Sgblack@eecs.umich.edu	encumbered/cpu/full/create_vector.cc
1328120Sgblack@eecs.umich.edu	encumbered/cpu/full/cv_spec_state.cc
1338879Ssteve.reinhardt@amd.com	encumbered/cpu/full/dd_queue.cc
1348879Ssteve.reinhardt@amd.com	encumbered/cpu/full/dep_link.cc
1358879Ssteve.reinhardt@amd.com	encumbered/cpu/full/dispatch.cc
1368879Ssteve.reinhardt@amd.com	encumbered/cpu/full/dyn_inst.cc
1378879Ssteve.reinhardt@amd.com	encumbered/cpu/full/execute.cc
1388879Ssteve.reinhardt@amd.com	encumbered/cpu/full/fetch.cc
1398879Ssteve.reinhardt@amd.com	encumbered/cpu/full/floss_reasons.cc
1408879Ssteve.reinhardt@amd.com	encumbered/cpu/full/fu_pool.cc
1418879Ssteve.reinhardt@amd.com	encumbered/cpu/full/inst_fifo.cc
1428879Ssteve.reinhardt@amd.com	encumbered/cpu/full/instpipe.cc
1438879Ssteve.reinhardt@amd.com	encumbered/cpu/full/issue.cc
1448879Ssteve.reinhardt@amd.com	encumbered/cpu/full/ls_queue.cc
1458879Ssteve.reinhardt@amd.com	encumbered/cpu/full/machine_queue.cc
1468120Sgblack@eecs.umich.edu        encumbered/cpu/full/pc_sample_profile.cc
1478120Sgblack@eecs.umich.edu        encumbered/cpu/full/pipetrace.cc
1488120Sgblack@eecs.umich.edu        encumbered/cpu/full/readyq.cc
1498120Sgblack@eecs.umich.edu        encumbered/cpu/full/reg_info.cc
1508120Sgblack@eecs.umich.edu        encumbered/cpu/full/rob_station.cc
1518120Sgblack@eecs.umich.edu        encumbered/cpu/full/spec_memory.cc
1528120Sgblack@eecs.umich.edu        encumbered/cpu/full/spec_state.cc
1538120Sgblack@eecs.umich.edu        encumbered/cpu/full/storebuffer.cc
1548120Sgblack@eecs.umich.edu        encumbered/cpu/full/writeback.cc
1558120Sgblack@eecs.umich.edu        encumbered/cpu/full/iq/iq_station.cc
1568120Sgblack@eecs.umich.edu        encumbered/cpu/full/iq/iqueue.cc
1578120Sgblack@eecs.umich.edu        encumbered/cpu/full/iq/segmented/chain_info.cc
1588120Sgblack@eecs.umich.edu        encumbered/cpu/full/iq/segmented/chain_wire.cc
1598120Sgblack@eecs.umich.edu        encumbered/cpu/full/iq/segmented/iq_seg.cc
1608879Ssteve.reinhardt@amd.com        encumbered/cpu/full/iq/segmented/iq_segmented.cc
1618879Ssteve.reinhardt@amd.com        encumbered/cpu/full/iq/segmented/seg_chain.cc
1628879Ssteve.reinhardt@amd.com        encumbered/cpu/full/iq/seznec/iq_seznec.cc
1638879Ssteve.reinhardt@amd.com        encumbered/cpu/full/iq/standard/iq_standard.cc
1648879Ssteve.reinhardt@amd.com	encumbered/mem/functional/main.cc
1658879Ssteve.reinhardt@amd.com
1668879Ssteve.reinhardt@amd.com	mem/base_hier.cc
1678879Ssteve.reinhardt@amd.com	mem/base_mem.cc
1689227Sandreas.hansson@arm.com	mem/hier_params.cc
1699227Sandreas.hansson@arm.com	mem/mem_cmd.cc
1708879Ssteve.reinhardt@amd.com	mem/mem_debug.cc
1718879Ssteve.reinhardt@amd.com	mem/mem_req.cc
1728879Ssteve.reinhardt@amd.com	mem/memory_interface.cc
1738879Ssteve.reinhardt@amd.com	mem/bus/base_interface.cc
1748120Sgblack@eecs.umich.edu	mem/bus/bus.cc
1758947Sandreas.hansson@arm.com	mem/bus/bus_bridge.cc
1767816Ssteve.reinhardt@amd.com	mem/bus/bus_bridge_master.cc
1775871Snate@binkert.org	mem/bus/bus_bridge_slave.cc
1785871Snate@binkert.org	mem/bus/bus_interface.cc
1796121Snate@binkert.org	mem/bus/dma_bus_interface.cc
1805871Snate@binkert.org	mem/bus/dma_interface.cc
1815871Snate@binkert.org	mem/bus/master_interface.cc
1829119Sandreas.hansson@arm.com	mem/bus/slave_interface.cc
1839396Sandreas.hansson@arm.com	mem/cache/base_cache.cc
1849396Sandreas.hansson@arm.com	mem/cache/cache.cc
185955SN/A	mem/cache/cache_builder.cc
1869416SAndreas.Sandberg@ARM.com	mem/cache/coherence/coherence_protocol.cc
1879416SAndreas.Sandberg@ARM.com	mem/cache/coherence/uni_coherence.cc
1889416SAndreas.Sandberg@ARM.com	mem/cache/miss/blocking_buffer.cc
1899416SAndreas.Sandberg@ARM.com	mem/cache/miss/miss_queue.cc
1909416SAndreas.Sandberg@ARM.com	mem/cache/miss/mshr.cc
1919416SAndreas.Sandberg@ARM.com	mem/cache/miss/mshr_queue.cc
1929416SAndreas.Sandberg@ARM.com        mem/cache/prefetch/base_prefetcher.cc
1935871Snate@binkert.org        mem/cache/prefetch/ghb_prefetcher.cc
1945871Snate@binkert.org        mem/cache/prefetch/prefetcher.cc
1959416SAndreas.Sandberg@ARM.com        mem/cache/prefetch/stride_prefetcher.cc
1969416SAndreas.Sandberg@ARM.com        mem/cache/prefetch/tagged_prefetcher.cc
1975871Snate@binkert.org	mem/cache/tags/base_tags.cc
198955SN/A	mem/cache/tags/cache_tags.cc
1996121Snate@binkert.org	mem/cache/tags/fa_lru.cc
2008881Smarc.orr@gmail.com	mem/cache/tags/iic.cc
2016121Snate@binkert.org	mem/cache/tags/lru.cc
2026121Snate@binkert.org	mem/cache/tags/split.cc
2031533SN/A	mem/cache/tags/split_lifo.cc
2049239Sandreas.hansson@arm.com	mem/cache/tags/split_lru.cc
2059239Sandreas.hansson@arm.com	mem/cache/tags/repl/gen.cc
2069239Sandreas.hansson@arm.com	mem/cache/tags/repl/repl.cc
2079239Sandreas.hansson@arm.com	mem/functional/functional.cc
2089239Sandreas.hansson@arm.com	mem/timing/base_memory.cc
2099239Sandreas.hansson@arm.com	mem/timing/memory_builder.cc
2109239Sandreas.hansson@arm.com	mem/timing/simple_mem_bank.cc
2119239Sandreas.hansson@arm.com        mem/trace/itx_writer.cc
2129239Sandreas.hansson@arm.com	mem/trace/mem_trace_writer.cc
2139239Sandreas.hansson@arm.com	mem/trace/m5_writer.cc
2149239Sandreas.hansson@arm.com
2159239Sandreas.hansson@arm.com        python/pyconfig.cc
2166655Snate@binkert.org        python/embedded_py.cc
2176655Snate@binkert.org
2186655Snate@binkert.org	sim/builder.cc
2196655Snate@binkert.org	sim/configfile.cc
2205871Snate@binkert.org	sim/debug.cc
2215871Snate@binkert.org	sim/eventq.cc
2225863Snate@binkert.org	sim/main.cc
2235871Snate@binkert.org	sim/param.cc
2248878Ssteve.reinhardt@amd.com	sim/profile.cc
2255871Snate@binkert.org	sim/root.cc
2265871Snate@binkert.org	sim/serialize.cc
2275871Snate@binkert.org	sim/sim_events.cc
2285863Snate@binkert.org	sim/sim_exit.cc
2296121Snate@binkert.org	sim/sim_object.cc
2305863Snate@binkert.org	sim/startup.cc
2315871Snate@binkert.org	sim/stat_context.cc
2328336Ssteve.reinhardt@amd.com	sim/stat_control.cc
2338336Ssteve.reinhardt@amd.com	sim/trace_context.cc
2348336Ssteve.reinhardt@amd.com        ''')
2358336Ssteve.reinhardt@amd.com
2364678Snate@binkert.org# MySql sources
2378336Ssteve.reinhardt@amd.commysql_sources = Split('''
2388336Ssteve.reinhardt@amd.com	base/mysql.cc
2398336Ssteve.reinhardt@amd.com	base/stats/mysql.cc
2404678Snate@binkert.org        ''')
2414678Snate@binkert.org
2424678Snate@binkert.org# Full-system sources
2434678Snate@binkert.orgfull_system_sources = Split('''
2447827Snate@binkert.org	arch/alpha/alpha_memory.cc
2457827Snate@binkert.org	arch/alpha/arguments.cc
2468336Ssteve.reinhardt@amd.com	arch/alpha/ev5.cc
2474678Snate@binkert.org	arch/alpha/osfpal.cc
2488336Ssteve.reinhardt@amd.com	arch/alpha/pseudo_inst.cc
2498336Ssteve.reinhardt@amd.com	arch/alpha/vtophys.cc
2508336Ssteve.reinhardt@amd.com
2518336Ssteve.reinhardt@amd.com	base/crc.cc
2528336Ssteve.reinhardt@amd.com	base/inet.cc
2538336Ssteve.reinhardt@amd.com	base/remote_gdb.cc
2545871Snate@binkert.org
2555871Snate@binkert.org	cpu/intr_control.cc
2568336Ssteve.reinhardt@amd.com
2578336Ssteve.reinhardt@amd.com	dev/alpha_console.cc
2588336Ssteve.reinhardt@amd.com	dev/baddev.cc
2598336Ssteve.reinhardt@amd.com        dev/simconsole.cc
2608336Ssteve.reinhardt@amd.com	dev/disk_image.cc
2615871Snate@binkert.org	dev/etherbus.cc
2628336Ssteve.reinhardt@amd.com	dev/etherdump.cc
2638336Ssteve.reinhardt@amd.com	dev/etherint.cc
2648336Ssteve.reinhardt@amd.com	dev/etherlink.cc
2658336Ssteve.reinhardt@amd.com	dev/etherpkt.cc
2668336Ssteve.reinhardt@amd.com	dev/ethertap.cc
2674678Snate@binkert.org	dev/ide_ctrl.cc
2685871Snate@binkert.org	dev/ide_disk.cc
2694678Snate@binkert.org	dev/io_device.cc
2708336Ssteve.reinhardt@amd.com	dev/ns_gige.cc
2718336Ssteve.reinhardt@amd.com	dev/pciconfigall.cc
2728336Ssteve.reinhardt@amd.com	dev/pcidev.cc
2738336Ssteve.reinhardt@amd.com	dev/pktfifo.cc
2748336Ssteve.reinhardt@amd.com        dev/platform.cc
2758336Ssteve.reinhardt@amd.com	dev/sinic.cc
2768336Ssteve.reinhardt@amd.com	dev/simple_disk.cc
2778336Ssteve.reinhardt@amd.com	dev/tsunami.cc
2788336Ssteve.reinhardt@amd.com	dev/tsunami_cchip.cc
2798336Ssteve.reinhardt@amd.com	dev/tsunami_fake.cc
2808336Ssteve.reinhardt@amd.com	dev/tsunami_io.cc
2818336Ssteve.reinhardt@amd.com	dev/tsunami_pchip.cc
2828336Ssteve.reinhardt@amd.com	dev/uart.cc
2838336Ssteve.reinhardt@amd.com	dev/uart8250.cc
2848336Ssteve.reinhardt@amd.com
2858336Ssteve.reinhardt@amd.com	kern/kernel_binning.cc
2868336Ssteve.reinhardt@amd.com	kern/kernel_stats.cc
2875871Snate@binkert.org	kern/system_events.cc
2886121Snate@binkert.org	kern/linux/linux_events.cc
289955SN/A	kern/linux/linux_syscalls.cc
290955SN/A	kern/linux/linux_system.cc
2912632Sstever@eecs.umich.edu	kern/linux/printk.cc
2922632Sstever@eecs.umich.edu	kern/tru64/dump_mbuf.cc
293955SN/A	kern/tru64/printf.cc
294955SN/A	kern/tru64/tru64_events.cc
295955SN/A	kern/tru64/tru64_syscalls.cc
296955SN/A	kern/tru64/tru64_system.cc
2978878Ssteve.reinhardt@amd.com
298955SN/A	mem/functional/memory_control.cc
2992632Sstever@eecs.umich.edu	mem/functional/physical.cc
3002632Sstever@eecs.umich.edu
3012632Sstever@eecs.umich.edu	sim/system.cc
3022632Sstever@eecs.umich.edu        ''')
3032632Sstever@eecs.umich.edu
3042632Sstever@eecs.umich.edu# turbolaser encumbered sources
3052632Sstever@eecs.umich.eduturbolaser_sources = Split('''
3068268Ssteve.reinhardt@amd.com	encumbered/dev/dma.cc
3078268Ssteve.reinhardt@amd.com	encumbered/dev/etherdev.cc
3088268Ssteve.reinhardt@amd.com	encumbered/dev/scsi.cc
3098268Ssteve.reinhardt@amd.com	encumbered/dev/scsi_ctrl.cc
3108268Ssteve.reinhardt@amd.com	encumbered/dev/scsi_disk.cc
3118268Ssteve.reinhardt@amd.com	encumbered/dev/scsi_none.cc
3128268Ssteve.reinhardt@amd.com	encumbered/dev/tlaser_clock.cc
3132632Sstever@eecs.umich.edu	encumbered/dev/tlaser_ipi.cc
3142632Sstever@eecs.umich.edu	encumbered/dev/tlaser_mbox.cc
3152632Sstever@eecs.umich.edu	encumbered/dev/tlaser_mc146818.cc
3162632Sstever@eecs.umich.edu	encumbered/dev/tlaser_node.cc
3178268Ssteve.reinhardt@amd.com	encumbered/dev/tlaser_pcia.cc
3182632Sstever@eecs.umich.edu	encumbered/dev/tlaser_pcidev.cc
3198268Ssteve.reinhardt@amd.com	encumbered/dev/tlaser_serial.cc
3208268Ssteve.reinhardt@amd.com	encumbered/dev/turbolaser.cc
3218268Ssteve.reinhardt@amd.com	encumbered/dev/uart8530.cc
3228268Ssteve.reinhardt@amd.com        ''')
3233718Sstever@eecs.umich.edu
3242634Sstever@eecs.umich.edu# Syscall emulation (non-full-system) sources
3252634Sstever@eecs.umich.edusyscall_emulation_sources = Split('''
3265863Snate@binkert.org	arch/alpha/alpha_common_syscall_emul.cc
3272638Sstever@eecs.umich.edu	arch/alpha/alpha_linux_process.cc
3288268Ssteve.reinhardt@amd.com	arch/alpha/alpha_tru64_process.cc
3292632Sstever@eecs.umich.edu	cpu/memtest/memtest.cc
3302632Sstever@eecs.umich.edu        cpu/trace/opt_cpu.cc
3312632Sstever@eecs.umich.edu	cpu/trace/trace_cpu.cc
3322632Sstever@eecs.umich.edu	eio/eio.cc
3332632Sstever@eecs.umich.edu	eio/exolex.cc
3341858SN/A	eio/libexo.cc
3353716Sstever@eecs.umich.edu	sim/process.cc
3362638Sstever@eecs.umich.edu	sim/syscall_emul.cc
3372638Sstever@eecs.umich.edu        ''')
3382638Sstever@eecs.umich.edu
3392638Sstever@eecs.umich.edutargetarch_files = Split('''
3402638Sstever@eecs.umich.edu        alpha_common_syscall_emul.hh
3412638Sstever@eecs.umich.edu        alpha_linux_process.hh
3422638Sstever@eecs.umich.edu        alpha_memory.hh
3435863Snate@binkert.org        alpha_tru64_process.hh
3445863Snate@binkert.org        aout_machdep.h
3455863Snate@binkert.org        arguments.hh
346955SN/A        byte_swap.hh
3475341Sstever@gmail.com        ecoff_machdep.h
3485341Sstever@gmail.com        elf_machdep.h
3495863Snate@binkert.org        ev5.hh
3507756SAli.Saidi@ARM.com        faults.hh
3515341Sstever@gmail.com        isa_fullsys_traits.hh
3526121Snate@binkert.org        isa_traits.hh
3534494Ssaidi@eecs.umich.edu        machine_exo.h
3546121Snate@binkert.org        osfpal.hh
3551105SN/A        pseudo_inst.hh
3562667Sstever@eecs.umich.edu        vptr.hh
3572667Sstever@eecs.umich.edu        vtophys.hh
3582667Sstever@eecs.umich.edu        ''')
3592667Sstever@eecs.umich.edu
3606121Snate@binkert.orgfor f in targetarch_files:
3612667Sstever@eecs.umich.edu    env.Command('targetarch/' + f, 'arch/alpha/' + f,
3625341Sstever@gmail.com                '''echo '#include "arch/alpha/%s"' > $TARGET''' % f)
3635863Snate@binkert.org
3645341Sstever@gmail.com
3655341Sstever@gmail.com# Set up complete list of sources based on configuration.
3665341Sstever@gmail.comsources = base_sources
3678120Sgblack@eecs.umich.edu
3685341Sstever@gmail.comif env['FULL_SYSTEM']:
3698120Sgblack@eecs.umich.edu    sources += full_system_sources
3705341Sstever@gmail.com    if env['ALPHA_TLASER']:
3718120Sgblack@eecs.umich.edu        sources += turbolaser_sources
3726121Snate@binkert.orgelse:
3736121Snate@binkert.org    sources += syscall_emulation_sources
3748980Ssteve.reinhardt@amd.com
3759396Sandreas.hansson@arm.comextra_libraries = []
3765397Ssaidi@eecs.umich.eduenv.Append(LIBS=['z'])
3775397Ssaidi@eecs.umich.eduif isdir('/usr/lib64/mysql') or isdir('/usr/lib/mysql') or \
3787727SAli.Saidi@ARM.com   isdir('/usr/local/lib/mysql'):
3798268Ssteve.reinhardt@amd.com    print 'Compiling with MySQL support!'
3806168Snate@binkert.org    env.Append(LIBPATH=['/usr/lib64/mysql', '/usr/local/lib/mysql/',
3815341Sstever@gmail.com                        '/usr/lib/mysql'])
3828120Sgblack@eecs.umich.edu    env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql'])
3838120Sgblack@eecs.umich.edu    sources += mysql_sources
3848120Sgblack@eecs.umich.edu    env.Append(CPPDEFINES = 'USE_MYSQL')
3856814Sgblack@eecs.umich.edu    env.Append(CPPDEFINES = 'STATS_BINNING')
3865863Snate@binkert.org    env.Append(LIBS=['mysqlclient'])
3878120Sgblack@eecs.umich.edu
3885341Sstever@gmail.com###################################################
3895863Snate@binkert.org#
3908268Ssteve.reinhardt@amd.com# Special build rules.
3916121Snate@binkert.org#
3926121Snate@binkert.org###################################################
3938268Ssteve.reinhardt@amd.com
3945742Snate@binkert.org# base/traceflags.{cc,hh} are generated from base/traceflags.py.
3955742Snate@binkert.org# $TARGET.base will expand to "<build-dir>/base/traceflags".
3965341Sstever@gmail.comenv.Command(Split('base/traceflags.hh base/traceflags.cc'),
3975742Snate@binkert.org            'base/traceflags.py',
3985742Snate@binkert.org            'python $SOURCE $TARGET.base')
3995341Sstever@gmail.com
4006017Snate@binkert.org# several files are generated from arch/$TARGET_ISA/isa_desc.
4016121Snate@binkert.orgenv.Command(Split('''arch/alpha/decoder.cc
4026017Snate@binkert.org		     arch/alpha/decoder.hh
4037816Ssteve.reinhardt@amd.com                     arch/alpha/alpha_o3_exec.cc
4047756SAli.Saidi@ARM.com		     arch/alpha/fast_cpu_exec.cc
4057756SAli.Saidi@ARM.com                     arch/alpha/simple_cpu_exec.cc
4067756SAli.Saidi@ARM.com                     arch/alpha/full_cpu_exec.cc'''),
4077756SAli.Saidi@ARM.com            Split('''arch/alpha/isa_desc
4087756SAli.Saidi@ARM.com		     arch/isa_parser.py'''),
4097756SAli.Saidi@ARM.com            '$SRCDIR/arch/isa_parser.py $SOURCE $TARGET.dir arch/alpha')
4107756SAli.Saidi@ARM.com
4117756SAli.Saidi@ARM.com
4127816Ssteve.reinhardt@amd.com# libelf build is described in its own SConscript file.
4137816Ssteve.reinhardt@amd.com# SConscript-local is the per-config build, which just copies some
4147816Ssteve.reinhardt@amd.com# header files into a place where they can be found.
4157816Ssteve.reinhardt@amd.comSConscript('libelf/SConscript-local', exports = 'env', duplicate=0)
4167816Ssteve.reinhardt@amd.comSConscript('python/SConscript', exports = ['env'], duplicate=0)
4177816Ssteve.reinhardt@amd.com
4187816Ssteve.reinhardt@amd.com# This function adds the specified sources to the given build
4197816Ssteve.reinhardt@amd.com# environment, and returns a list of all the corresponding SCons
4207816Ssteve.reinhardt@amd.com# Object nodes (including an extra one for date.cc).  We explicitly
4217816Ssteve.reinhardt@amd.com# add the Object nodes so we can set up special dependencies for
4227756SAli.Saidi@ARM.com# date.cc.
4237816Ssteve.reinhardt@amd.comdef make_objs(sources, env):
4247816Ssteve.reinhardt@amd.com    objs = [env.Object(s) for s in sources]
4257816Ssteve.reinhardt@amd.com    # make date.cc depend on all other objects so it always gets
4267816Ssteve.reinhardt@amd.com    # recompiled whenever anything else does
4277816Ssteve.reinhardt@amd.com    date_obj = env.Object('base/date.cc')
4287816Ssteve.reinhardt@amd.com    env.Depends(date_obj, objs)
4297816Ssteve.reinhardt@amd.com    objs.append(date_obj)
4307816Ssteve.reinhardt@amd.com    objs.extend(extra_libraries)
4317816Ssteve.reinhardt@amd.com    return objs
4327816Ssteve.reinhardt@amd.com
4337816Ssteve.reinhardt@amd.com###################################################
4347816Ssteve.reinhardt@amd.com#
4357816Ssteve.reinhardt@amd.com# Define binaries.  Each different build type (debug, opt, etc.) gets
4367816Ssteve.reinhardt@amd.com# a slightly different build environment.
4377816Ssteve.reinhardt@amd.com#
4387816Ssteve.reinhardt@amd.com###################################################
4397816Ssteve.reinhardt@amd.com
4407816Ssteve.reinhardt@amd.com# Include file paths are rooted in this directory.  SCons will
4417816Ssteve.reinhardt@amd.com# automatically expand '.' to refer to both the source directory and
4427816Ssteve.reinhardt@amd.com# the corresponding build directory to pick up generated include
4437816Ssteve.reinhardt@amd.com# files.
4447816Ssteve.reinhardt@amd.comenv.Append(CPPPATH='.')
4457816Ssteve.reinhardt@amd.com
4467816Ssteve.reinhardt@amd.com# Debug binary
4477816Ssteve.reinhardt@amd.comdebug = env.Copy(OBJSUFFIX='.do')
4487816Ssteve.reinhardt@amd.comdebug.Append(CCFLAGS=Split('-g -gstabs+ -O0'))
4497816Ssteve.reinhardt@amd.comdebug.Append(CPPDEFINES='DEBUG')
4507816Ssteve.reinhardt@amd.comdebug.Program(target = 'm5.debug', source = make_objs(sources, debug))
4517816Ssteve.reinhardt@amd.com
4527816Ssteve.reinhardt@amd.com# Optimized binary
4537816Ssteve.reinhardt@amd.comopt = env.Copy()
4547816Ssteve.reinhardt@amd.comopt.Append(CCFLAGS=Split('-g -O5'))
4557816Ssteve.reinhardt@amd.comopt.Program(target = 'm5.opt', source = make_objs(sources, opt))
4567816Ssteve.reinhardt@amd.com
4577816Ssteve.reinhardt@amd.com# "Fast" binary
4587816Ssteve.reinhardt@amd.comfast = env.Copy(OBJSUFFIX='.fo')
4597816Ssteve.reinhardt@amd.comfast.Append(CCFLAGS=Split('-O5'))
4607816Ssteve.reinhardt@amd.comfast.Append(CPPDEFINES='NDEBUG')
4617816Ssteve.reinhardt@amd.comfast.Program(target = 'm5.fast.unstripped', source = make_objs(sources, fast))
4627816Ssteve.reinhardt@amd.comfast.Command(target = 'm5.fast', source = 'm5.fast.unstripped',
4637816Ssteve.reinhardt@amd.com             action = 'strip $SOURCE -o $TARGET')
4647816Ssteve.reinhardt@amd.com
4657816Ssteve.reinhardt@amd.com# Profiled binary
4667816Ssteve.reinhardt@amd.comprof = env.Copy(OBJSUFFIX='.po')
4677816Ssteve.reinhardt@amd.comprof.Append(CCFLAGS=Split('-O5 -g -pg'), LINKFLAGS='-pg')
4687816Ssteve.reinhardt@amd.comprof.Program(target = 'm5.prof', source = make_objs(sources, prof))
4697816Ssteve.reinhardt@amd.com