SConscript revision 1296
1955SN/A# -*- mode:python -*- 2955SN/A 31762SN/A# Copyright (c) 2004 The Regents of The University of Michigan 4955SN/A# All rights reserved. 5955SN/A# 6955SN/A# Redistribution and use in source and binary forms, with or without 7955SN/A# modification, are permitted provided that the following conditions are 8955SN/A# met: redistributions of source code must retain the above copyright 9955SN/A# notice, this list of conditions and the following disclaimer; 10955SN/A# redistributions in binary form must reproduce the above copyright 11955SN/A# notice, this list of conditions and the following disclaimer in the 12955SN/A# documentation and/or other materials provided with the distribution; 13955SN/A# neither the name of the copyright holders nor the names of its 14955SN/A# contributors may be used to endorse or promote products derived from 15955SN/A# this software without specific prior written permission. 16955SN/A# 17955SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18955SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19955SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20955SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21955SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22955SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23955SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24955SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25955SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26955SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27955SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282665Ssaidi@eecs.umich.edu 294762Snate@binkert.orgimport os 30955SN/Aimport sys 315522Snate@binkert.org 326143Snate@binkert.org# This file defines how to build a particular configuration of M5 334762Snate@binkert.org# based on variable settings in the 'env' build environment. 345522Snate@binkert.org 35955SN/A# Import build environment variable from SConstruct. 365522Snate@binkert.orgImport('env') 37955SN/A 385522Snate@binkert.org################################################### 394202Sbinkertn@umich.edu# 405742Snate@binkert.org# Define needed sources. 41955SN/A# 424381Sbinkertn@umich.edu################################################### 434381Sbinkertn@umich.edu 448334Snate@binkert.org# Base sources used by all configurations. 45955SN/Abase_sources = Split(''' 46955SN/A arch/alpha/decoder.cc 474202Sbinkertn@umich.edu arch/alpha/fast_cpu_exec.cc 48955SN/A arch/alpha/simple_cpu_exec.cc 494382Sbinkertn@umich.edu arch/alpha/inorder_cpu_exec.cc 504382Sbinkertn@umich.edu arch/alpha/full_cpu_exec.cc 514382Sbinkertn@umich.edu arch/alpha/faults.cc 526654Snate@binkert.org arch/alpha/isa_traits.cc 535517Snate@binkert.org 548614Sgblack@eecs.umich.edu base/circlebuf.cc 557674Snate@binkert.org base/copyright.cc 566143Snate@binkert.org base/cprintf.cc 576143Snate@binkert.org base/fast_alloc.cc 586143Snate@binkert.org base/fifo_buffer.cc 598233Snate@binkert.org base/hostinfo.cc 608233Snate@binkert.org base/hybrid_pred.cc 618233Snate@binkert.org base/inifile.cc 628233Snate@binkert.org base/intmath.cc 638233Snate@binkert.org base/match.cc 648334Snate@binkert.org base/misc.cc 658334Snate@binkert.org base/pollevent.cc 6610453SAndrew.Bardsley@arm.com base/python.cc 6710453SAndrew.Bardsley@arm.com base/range.cc 688233Snate@binkert.org base/random.cc 698233Snate@binkert.org base/sat_counter.cc 708233Snate@binkert.org base/socket.cc 718233Snate@binkert.org base/statistics.cc 728233Snate@binkert.org base/str.cc 738233Snate@binkert.org base/time.cc 746143Snate@binkert.org base/trace.cc 758233Snate@binkert.org base/traceflags.cc 768233Snate@binkert.org base/userinfo.cc 778233Snate@binkert.org base/compression/lzss_compression.cc 786143Snate@binkert.org base/loader/aout_object.cc 796143Snate@binkert.org base/loader/ecoff_object.cc 806143Snate@binkert.org base/loader/elf_object.cc 8111308Santhony.gutierrez@amd.com base/loader/object_file.cc 828233Snate@binkert.org base/loader/symtab.cc 838233Snate@binkert.org base/stats/events.cc 848233Snate@binkert.org base/stats/python.cc 856143Snate@binkert.org base/stats/statdb.cc 868233Snate@binkert.org base/stats/visit.cc 878233Snate@binkert.org base/stats/text.cc 888233Snate@binkert.org 898233Snate@binkert.org cpu/base_cpu.cc 906143Snate@binkert.org cpu/exec_context.cc 916143Snate@binkert.org cpu/exetrace.cc 926143Snate@binkert.org cpu/pc_event.cc 934762Snate@binkert.org cpu/static_inst.cc 946143Snate@binkert.org cpu/fast_cpu/fast_cpu.cc 958233Snate@binkert.org cpu/full_cpu/bpred.cc 968233Snate@binkert.org cpu/full_cpu/commit.cc 978233Snate@binkert.org cpu/full_cpu/create_vector.cc 988233Snate@binkert.org cpu/full_cpu/cv_spec_state.cc 998233Snate@binkert.org cpu/full_cpu/dd_queue.cc 1006143Snate@binkert.org cpu/full_cpu/dep_link.cc 1018233Snate@binkert.org cpu/full_cpu/dispatch.cc 1028233Snate@binkert.org cpu/full_cpu/dyn_inst.cc 1038233Snate@binkert.org cpu/full_cpu/execute.cc 1048233Snate@binkert.org cpu/full_cpu/fetch.cc 1056143Snate@binkert.org cpu/full_cpu/floss_reasons.cc 1066143Snate@binkert.org cpu/full_cpu/fu_pool.cc 1076143Snate@binkert.org cpu/full_cpu/full_cpu.cc 1086143Snate@binkert.org cpu/full_cpu/inst_fifo.cc 1096143Snate@binkert.org cpu/full_cpu/instpipe.cc 1106143Snate@binkert.org cpu/full_cpu/issue.cc 1116143Snate@binkert.org cpu/full_cpu/ls_queue.cc 1126143Snate@binkert.org cpu/full_cpu/machine_queue.cc 1136143Snate@binkert.org cpu/full_cpu/pc_sample_profile.cc 1147065Snate@binkert.org cpu/full_cpu/pipetrace.cc 1156143Snate@binkert.org cpu/full_cpu/readyq.cc 1168233Snate@binkert.org cpu/full_cpu/reg_info.cc 1178233Snate@binkert.org cpu/full_cpu/rob_station.cc 1188233Snate@binkert.org cpu/full_cpu/spec_memory.cc 1198233Snate@binkert.org cpu/full_cpu/spec_state.cc 1208233Snate@binkert.org cpu/full_cpu/storebuffer.cc 1218233Snate@binkert.org cpu/full_cpu/writeback.cc 1228233Snate@binkert.org cpu/full_cpu/iq/iq_station.cc 1238233Snate@binkert.org cpu/full_cpu/iq/iqueue.cc 1248233Snate@binkert.org cpu/full_cpu/iq/segmented/chain_info.cc 1258233Snate@binkert.org cpu/full_cpu/iq/segmented/chain_wire.cc 1268233Snate@binkert.org cpu/full_cpu/iq/segmented/iq_seg.cc 1278233Snate@binkert.org cpu/full_cpu/iq/segmented/iq_segmented.cc 1288233Snate@binkert.org cpu/full_cpu/iq/segmented/seg_chain.cc 1298233Snate@binkert.org cpu/full_cpu/iq/seznec/iq_seznec.cc 1308233Snate@binkert.org cpu/full_cpu/iq/standard/iq_standard.cc 1318233Snate@binkert.org cpu/sampling_cpu/sampling_cpu.cc 1328233Snate@binkert.org cpu/simple_cpu/simple_cpu.cc 1338233Snate@binkert.org cpu/inorder_cpu/inorder_cpu.cc 1348233Snate@binkert.org cpu/trace/reader/mem_trace_reader.cc 1358233Snate@binkert.org cpu/trace/reader/ibm_reader.cc 1368233Snate@binkert.org cpu/trace/reader/itx_reader.cc 1378233Snate@binkert.org cpu/trace/reader/m5_reader.cc 1388233Snate@binkert.org 1398233Snate@binkert.org mem/base_hier.cc 1408233Snate@binkert.org mem/base_mem.cc 1418233Snate@binkert.org mem/hier_params.cc 1428233Snate@binkert.org mem/mem_cmd.cc 1438233Snate@binkert.org mem/mem_debug.cc 1448233Snate@binkert.org mem/mem_req.cc 1458233Snate@binkert.org mem/memory_interface.cc 1468233Snate@binkert.org mem/bus/base_interface.cc 1476143Snate@binkert.org mem/bus/bus.cc 1486143Snate@binkert.org mem/bus/bus_bridge.cc 1496143Snate@binkert.org mem/bus/bus_bridge_master.cc 1506143Snate@binkert.org mem/bus/bus_bridge_slave.cc 1516143Snate@binkert.org mem/bus/bus_interface.cc 1526143Snate@binkert.org mem/bus/dma_bus_interface.cc 1539982Satgutier@umich.edu mem/bus/dma_interface.cc 15410196SCurtis.Dunham@arm.com mem/bus/master_interface.cc 15510196SCurtis.Dunham@arm.com mem/bus/slave_interface.cc 15610196SCurtis.Dunham@arm.com mem/cache/base_cache.cc 15710196SCurtis.Dunham@arm.com mem/cache/cache.cc 15810196SCurtis.Dunham@arm.com mem/cache/cache_builder.cc 15910196SCurtis.Dunham@arm.com mem/cache/coherence/coherence_protocol.cc 16010196SCurtis.Dunham@arm.com mem/cache/coherence/uni_coherence.cc 16110196SCurtis.Dunham@arm.com mem/cache/miss/blocking_buffer.cc 1626143Snate@binkert.org mem/cache/miss/miss_queue.cc 1636143Snate@binkert.org mem/cache/miss/mshr.cc 1648945Ssteve.reinhardt@amd.com mem/cache/miss/mshr_queue.cc 1658233Snate@binkert.org mem/cache/tags/base_tags.cc 1668233Snate@binkert.org mem/cache/tags/cache_tags.cc 1676143Snate@binkert.org mem/cache/tags/fa_lru.cc 1688945Ssteve.reinhardt@amd.com mem/cache/tags/iic.cc 1696143Snate@binkert.org mem/cache/tags/lru.cc 1706143Snate@binkert.org mem/cache/tags/split.cc 1716143Snate@binkert.org mem/cache/tags/split_lifo.cc 1726143Snate@binkert.org mem/cache/tags/split_lru.cc 1735522Snate@binkert.org mem/cache/tags/repl/gen.cc 1746143Snate@binkert.org mem/cache/tags/repl/repl.cc 1756143Snate@binkert.org mem/functional_mem/functional_memory.cc 1766143Snate@binkert.org mem/functional_mem/main_memory.cc 1779982Satgutier@umich.edu mem/timing_mem/base_memory.cc 1788233Snate@binkert.org mem/timing_mem/memory_builder.cc 1798233Snate@binkert.org mem/timing_mem/simple_mem_bank.cc 1808233Snate@binkert.org mem/trace/itx_writer.cc 1816143Snate@binkert.org mem/trace/mem_trace_writer.cc 1826143Snate@binkert.org mem/trace/m5_writer.cc 1836143Snate@binkert.org 1846143Snate@binkert.org sim/builder.cc 1855522Snate@binkert.org sim/configfile.cc 1865522Snate@binkert.org sim/debug.cc 1875522Snate@binkert.org sim/eventq.cc 1885522Snate@binkert.org sim/main.cc 1895604Snate@binkert.org sim/param.cc 1905604Snate@binkert.org sim/profile.cc 1916143Snate@binkert.org sim/serialize.cc 1926143Snate@binkert.org sim/sim_events.cc 1934762Snate@binkert.org sim/sim_exit.cc 1944762Snate@binkert.org sim/sim_object.cc 1956143Snate@binkert.org sim/startup.cc 1966727Ssteve.reinhardt@amd.com sim/stat_context.cc 1976727Ssteve.reinhardt@amd.com sim/stat_control.cc 1986727Ssteve.reinhardt@amd.com sim/trace_context.cc 1994762Snate@binkert.org sim/universe.cc 2006143Snate@binkert.org sim/pyconfig/pyconfig.cc 2016143Snate@binkert.org sim/pyconfig/code.cc 2026143Snate@binkert.org ''') 2036143Snate@binkert.org 2046727Ssteve.reinhardt@amd.combase_obj_desc_files = Split(''' 2056143Snate@binkert.org cpu/full_cpu/iq/segmented/SegmentedIQ.od 2067674Snate@binkert.org cpu/full_cpu/iq/seznec/SeznecIQ.od 2077674Snate@binkert.org cpu/full_cpu/iq/standard/StandardIQ.od 2085604Snate@binkert.org cpu/full_cpu/iq/BaseIQ.od 2096143Snate@binkert.org cpu/full_cpu/BranchPred.od 2106143Snate@binkert.org cpu/full_cpu/FUDesc.od 2116143Snate@binkert.org cpu/full_cpu/FullCPU.od 2124762Snate@binkert.org cpu/full_cpu/FuncUnitPool.od 2136143Snate@binkert.org cpu/full_cpu/OpDesc.od 2144762Snate@binkert.org cpu/full_cpu/PipeTrace.od 2154762Snate@binkert.org cpu/sampling_cpu/SamplingCPU.od 2164762Snate@binkert.org cpu/simple_cpu/SimpleCPU.od 2176143Snate@binkert.org cpu/inorder_cpu/InorderCPU.od 2186143Snate@binkert.org cpu/BaseCPU.od 2194762Snate@binkert.org cpu/IntrControl.od 2208233Snate@binkert.org mem/bus/Bus.od 2218233Snate@binkert.org mem/bus/BusBridge.od 2228233Snate@binkert.org mem/cache/coherence/CoherenceProtocol.od 2238233Snate@binkert.org mem/cache/tags/repl/GenRepl.od 2246143Snate@binkert.org mem/cache/tags/repl/Repl.od 2256143Snate@binkert.org mem/cache/BaseCache.od 2264762Snate@binkert.org mem/functional_mem/FunctionalMemory.od 2276143Snate@binkert.org mem/functional_mem/MainMemory.od 2284762Snate@binkert.org mem/functional_mem/MemoryController.od 2296143Snate@binkert.org mem/functional_mem/PhysicalMemory.od 2304762Snate@binkert.org mem/timing_mem/BaseMemory.od 2316143Snate@binkert.org mem/BaseHier.od 2328233Snate@binkert.org mem/BaseMem.od 2338233Snate@binkert.org mem/HierParams.od 23410453SAndrew.Bardsley@arm.com ''') 2356143Snate@binkert.org 2366143Snate@binkert.org 2376143Snate@binkert.org# MySql sources 2386143Snate@binkert.orgmysql_sources = Split(''' 23911548Sandreas.hansson@arm.com base/mysql.cc 2406143Snate@binkert.org base/stats/mysql.cc 2416143Snate@binkert.org ''') 2426143Snate@binkert.org 2436143Snate@binkert.org# Full-system sources 24410453SAndrew.Bardsley@arm.comfull_system_sources = Split(''' 24510453SAndrew.Bardsley@arm.com arch/alpha/alpha_memory.cc 246955SN/A arch/alpha/arguments.cc 2479396Sandreas.hansson@arm.com arch/alpha/ev5.cc 2489396Sandreas.hansson@arm.com arch/alpha/osfpal.cc 2499396Sandreas.hansson@arm.com arch/alpha/pseudo_inst.cc 2509396Sandreas.hansson@arm.com arch/alpha/vtophys.cc 2519396Sandreas.hansson@arm.com 2529396Sandreas.hansson@arm.com base/crc.cc 2539396Sandreas.hansson@arm.com base/inet.cc 2549396Sandreas.hansson@arm.com base/remote_gdb.cc 2559396Sandreas.hansson@arm.com 2569396Sandreas.hansson@arm.com cpu/intr_control.cc 2579396Sandreas.hansson@arm.com 2589396Sandreas.hansson@arm.com dev/alpha_console.cc 2599396Sandreas.hansson@arm.com dev/baddev.cc 2609930Sandreas.hansson@arm.com dev/simconsole.cc 2619930Sandreas.hansson@arm.com dev/disk_image.cc 2629396Sandreas.hansson@arm.com dev/dma.cc 2638235Snate@binkert.org dev/etherbus.cc 2648235Snate@binkert.org dev/etherdump.cc 2656143Snate@binkert.org dev/etherint.cc 2668235Snate@binkert.org dev/etherlink.cc 2679003SAli.Saidi@ARM.com dev/etherpkt.cc 2688235Snate@binkert.org dev/ethertap.cc 2698235Snate@binkert.org dev/ide_ctrl.cc 2708235Snate@binkert.org dev/ide_disk.cc 2718235Snate@binkert.org dev/io_device.cc 2728235Snate@binkert.org dev/ns_gige.cc 2738235Snate@binkert.org dev/etherdev.cc 2748235Snate@binkert.org dev/pciconfigall.cc 2758235Snate@binkert.org dev/pcidev.cc 2768235Snate@binkert.org dev/pktfifo.cc 2778235Snate@binkert.org dev/scsi.cc 2788235Snate@binkert.org dev/scsi_ctrl.cc 2798235Snate@binkert.org dev/scsi_disk.cc 2808235Snate@binkert.org dev/scsi_none.cc 2818235Snate@binkert.org dev/sinic.cc 2829003SAli.Saidi@ARM.com dev/simple_disk.cc 2838235Snate@binkert.org dev/tlaser_clock.cc 2845584Snate@binkert.org dev/tlaser_ipi.cc 2854382Sbinkertn@umich.edu dev/tlaser_mbox.cc 2864202Sbinkertn@umich.edu dev/tlaser_mc146818.cc 2874382Sbinkertn@umich.edu dev/tlaser_node.cc 2884382Sbinkertn@umich.edu dev/tlaser_pcia.cc 2894382Sbinkertn@umich.edu dev/tlaser_pcidev.cc 2909396Sandreas.hansson@arm.com dev/tlaser_serial.cc 2915584Snate@binkert.org dev/turbolaser.cc 2924382Sbinkertn@umich.edu dev/tsunami.cc 2934382Sbinkertn@umich.edu dev/tsunami_cchip.cc 2944382Sbinkertn@umich.edu dev/tsunami_fake.cc 2958232Snate@binkert.org dev/tsunami_io.cc 2965192Ssaidi@eecs.umich.edu dev/tsunami_pchip.cc 2978232Snate@binkert.org dev/uart.cc 2988232Snate@binkert.org 2998232Snate@binkert.org kern/kernel_binning.cc 3005192Ssaidi@eecs.umich.edu kern/kernel_stats.cc 3018232Snate@binkert.org kern/system_events.cc 3025192Ssaidi@eecs.umich.edu kern/linux/linux_events.cc 3035799Snate@binkert.org kern/linux/linux_syscalls.cc 3048232Snate@binkert.org kern/linux/linux_system.cc 3055192Ssaidi@eecs.umich.edu kern/linux/printk.cc 3065192Ssaidi@eecs.umich.edu kern/tru64/dump_mbuf.cc 3075192Ssaidi@eecs.umich.edu kern/tru64/printf.cc 3088232Snate@binkert.org kern/tru64/tru64_events.cc 3095192Ssaidi@eecs.umich.edu kern/tru64/tru64_syscalls.cc 3108232Snate@binkert.org kern/tru64/tru64_system.cc 3115192Ssaidi@eecs.umich.edu 3125192Ssaidi@eecs.umich.edu mem/functional_mem/memory_control.cc 3135192Ssaidi@eecs.umich.edu mem/functional_mem/physical_memory.cc 3145192Ssaidi@eecs.umich.edu dev/platform.cc 3154382Sbinkertn@umich.edu 3164382Sbinkertn@umich.edu sim/system.cc 3174382Sbinkertn@umich.edu ''') 3182667Sstever@eecs.umich.edu 3192667Sstever@eecs.umich.edufull_system_obj_desc_files = Split(''' 3202667Sstever@eecs.umich.edu arch/alpha/AlphaDTB.od 3212667Sstever@eecs.umich.edu arch/alpha/AlphaITB.od 3222667Sstever@eecs.umich.edu arch/alpha/AlphaTLB.od 3232667Sstever@eecs.umich.edu dev/AlphaConsole.od 3245742Snate@binkert.org dev/ConsoleListener.od 3255742Snate@binkert.org dev/CowDiskImage.od 3265742Snate@binkert.org dev/DiskImage.od 3275793Snate@binkert.org dev/DmaDevice.od 3288334Snate@binkert.org dev/DmaEngine.od 3295793Snate@binkert.org dev/EtherBus.od 3305793Snate@binkert.org dev/EtherDev.od 3315793Snate@binkert.org dev/EtherDevInt.od 3324382Sbinkertn@umich.edu dev/EtherDump.od 3334762Snate@binkert.org dev/EtherInt.od 3345344Sstever@gmail.com dev/EtherLink.od 3354382Sbinkertn@umich.edu dev/EtherTap.od 3365341Sstever@gmail.com dev/PioDevice.od 3375742Snate@binkert.org dev/RawDiskImage.od 3385742Snate@binkert.org dev/ScsiController.od 3395742Snate@binkert.org dev/ScsiDevice.od 3405742Snate@binkert.org dev/ScsiDisk.od 3415742Snate@binkert.org dev/SimConsole.od 3424762Snate@binkert.org dev/SimpleDisk.od 3435742Snate@binkert.org dev/TlaserClock.od 3445742Snate@binkert.org dev/TlaserIpi.od 3457722Sgblack@eecs.umich.edu dev/TlaserMBox.od 3465742Snate@binkert.org dev/TlaserMC146818.od 3475742Snate@binkert.org dev/TlaserNode.od 3485742Snate@binkert.org dev/TlaserPciDev.od 3499930Sandreas.hansson@arm.com dev/TlaserPcia.od 3509930Sandreas.hansson@arm.com dev/TlaserSerial.od 3519930Sandreas.hansson@arm.com dev/TlaserUart.od 3529930Sandreas.hansson@arm.com dev/Turbolaser.od 3539930Sandreas.hansson@arm.com kern/tru64/Tru64System.od 3545742Snate@binkert.org sim/System.od 3558242Sbradley.danofsky@amd.com ''') 3568242Sbradley.danofsky@amd.com 3578242Sbradley.danofsky@amd.com# Syscall emulation (non-full-system) sources 3588242Sbradley.danofsky@amd.comsyscall_emulation_sources = Split(''' 3595341Sstever@gmail.com arch/alpha/alpha_common_syscall_emul.cc 3605742Snate@binkert.org arch/alpha/alpha_linux_process.cc 3617722Sgblack@eecs.umich.edu arch/alpha/alpha_tru64_process.cc 3624773Snate@binkert.org cpu/memtest/memtest.cc 3636108Snate@binkert.org cpu/trace/opt_cpu.cc 3641858SN/A cpu/trace/trace_cpu.cc 3651085SN/A eio/eio.cc 3666658Snate@binkert.org eio/exolex.cc 3676658Snate@binkert.org eio/libexo.cc 3687673Snate@binkert.org sim/process.cc 3696658Snate@binkert.org sim/syscall_emul.cc 3706658Snate@binkert.org ''') 37111308Santhony.gutierrez@amd.com 3726658Snate@binkert.orgsyscall_emulation_obj_desc_files = Split(''' 37311308Santhony.gutierrez@amd.com cpu/memtest/MemTest.od 3746658Snate@binkert.org eio/EioProcess.od 3756658Snate@binkert.org sim/LiveProcess.od 3767673Snate@binkert.org sim/Process.od 3777673Snate@binkert.org ''') 3787673Snate@binkert.org 3797673Snate@binkert.orgtargetarch_files = Split(''' 3807673Snate@binkert.org alpha_common_syscall_emul.hh 3817673Snate@binkert.org alpha_linux_process.hh 3827673Snate@binkert.org alpha_memory.hh 38310467Sandreas.hansson@arm.com alpha_tru64_process.hh 3846658Snate@binkert.org aout_machdep.h 3857673Snate@binkert.org arguments.hh 38610467Sandreas.hansson@arm.com byte_swap.hh 38710467Sandreas.hansson@arm.com ecoff_machdep.h 38810467Sandreas.hansson@arm.com elf_machdep.h 38910467Sandreas.hansson@arm.com ev5.hh 39010467Sandreas.hansson@arm.com faults.hh 39110467Sandreas.hansson@arm.com isa_fullsys_traits.hh 39210467Sandreas.hansson@arm.com isa_traits.hh 39310467Sandreas.hansson@arm.com machine_exo.h 39410467Sandreas.hansson@arm.com osfpal.hh 39510467Sandreas.hansson@arm.com pseudo_inst.hh 39610467Sandreas.hansson@arm.com vptr.hh 3977673Snate@binkert.org vtophys.hh 3987673Snate@binkert.org ''') 3997673Snate@binkert.org 4007673Snate@binkert.orgfor f in targetarch_files: 4017673Snate@binkert.org env.Command('targetarch/' + f, 'arch/alpha/' + f, 4029048SAli.Saidi@ARM.com '''echo '#include "arch/alpha/%s"' > $TARGET''' % f) 4037673Snate@binkert.org 4047673Snate@binkert.org 4057673Snate@binkert.org# Set up complete list of sources based on configuration. 4067673Snate@binkert.orgsources = base_sources 4076658Snate@binkert.orgobj_desc_files = base_obj_desc_files 4087756SAli.Saidi@ARM.com 4097816Ssteve.reinhardt@amd.comif env['FULL_SYSTEM']: 4106658Snate@binkert.org sources += full_system_sources 41111308Santhony.gutierrez@amd.com obj_desc_files += full_system_obj_desc_files 41211308Santhony.gutierrez@amd.comelse: 41311308Santhony.gutierrez@amd.com sources += syscall_emulation_sources 41411308Santhony.gutierrez@amd.com obj_desc_files += syscall_emulation_obj_desc_files 41511308Santhony.gutierrez@amd.com 41611308Santhony.gutierrez@amd.comextra_libraries = [] 41711308Santhony.gutierrez@amd.comenv.Append(LIBS=['z']) 41811308Santhony.gutierrez@amd.comif env['USE_MYSQL']: 41911308Santhony.gutierrez@amd.com sources += mysql_sources 42011308Santhony.gutierrez@amd.com env.Append(CPPDEFINES = 'USE_MYSQL') 42111308Santhony.gutierrez@amd.com env.Append(CPPDEFINES = 'STATS_BINNING') 42211308Santhony.gutierrez@amd.com env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql']) 42311308Santhony.gutierrez@amd.com if os.path.isdir('/usr/lib64'): 42411308Santhony.gutierrez@amd.com env.Append(LIBPATH=['/usr/lib64/mysql']) 42511308Santhony.gutierrez@amd.com else: 42611308Santhony.gutierrez@amd.com env.Append(LIBPATH=['/usr/lib/mysql/']) 42711308Santhony.gutierrez@amd.com env.Append(LIBS=['mysqlclient']) 42811308Santhony.gutierrez@amd.com 42911308Santhony.gutierrez@amd.com 43011308Santhony.gutierrez@amd.com################################################### 43111308Santhony.gutierrez@amd.com# 43211308Santhony.gutierrez@amd.com# Special build rules. 43311308Santhony.gutierrez@amd.com# 43411308Santhony.gutierrez@amd.com################################################### 43511308Santhony.gutierrez@amd.com 43611308Santhony.gutierrez@amd.com# base/traceflags.{cc,hh} are generated from base/traceflags.py. 43711308Santhony.gutierrez@amd.com# $TARGET.base will expand to "<build-dir>/base/traceflags". 43811308Santhony.gutierrez@amd.comenv.Command(Split('base/traceflags.hh base/traceflags.cc'), 43911308Santhony.gutierrez@amd.com 'base/traceflags.py', 44011308Santhony.gutierrez@amd.com 'python $SOURCE $TARGET.base') 44111308Santhony.gutierrez@amd.com 44211308Santhony.gutierrez@amd.com# several files are generated from arch/$TARGET_ISA/isa_desc. 44311308Santhony.gutierrez@amd.comenv.Command(Split('''arch/alpha/decoder.cc 44411308Santhony.gutierrez@amd.com arch/alpha/decoder.hh 44511308Santhony.gutierrez@amd.com arch/alpha/fast_cpu_exec.cc 44611308Santhony.gutierrez@amd.com arch/alpha/simple_cpu_exec.cc 44711308Santhony.gutierrez@amd.com arch/alpha/inorder_cpu_exec.cc 44811308Santhony.gutierrez@amd.com arch/alpha/full_cpu_exec.cc'''), 44911308Santhony.gutierrez@amd.com Split('''arch/alpha/isa_desc 45011308Santhony.gutierrez@amd.com arch/isa_parser.py'''), 45111308Santhony.gutierrez@amd.com '$SRCDIR/arch/isa_parser.py $SOURCE $TARGET.dir arch/alpha') 45211308Santhony.gutierrez@amd.com 45311308Santhony.gutierrez@amd.com 45411308Santhony.gutierrez@amd.com# libelf build is described in its own SConscript file. 45511308Santhony.gutierrez@amd.com# SConscript-local is the per-config build, which just copies some 4564382Sbinkertn@umich.edu# header files into a place where they can be found. 4574382Sbinkertn@umich.eduSConscript('libelf/SConscript-local', exports = 'env', duplicate=0) 4584762Snate@binkert.org 4594762Snate@binkert.orgSConscript('sim/pyconfig/SConscript', exports = ['env', 'obj_desc_files'], 4604762Snate@binkert.org duplicate=0) 4616654Snate@binkert.org 4626654Snate@binkert.org 4635517Snate@binkert.org# This function adds the specified sources to the given build 4645517Snate@binkert.org# environment, and returns a list of all the corresponding SCons 4655517Snate@binkert.org# Object nodes (including an extra one for date.cc). We explicitly 4665517Snate@binkert.org# add the Object nodes so we can set up special dependencies for 4675517Snate@binkert.org# date.cc. 4685517Snate@binkert.orgdef make_objs(sources, env): 4695517Snate@binkert.org objs = [env.Object(s) for s in sources] 4705517Snate@binkert.org # make date.cc depend on all other objects so it always gets 4715517Snate@binkert.org # recompiled whenever anything else does 4725517Snate@binkert.org date_obj = env.Object('base/date.cc') 4735517Snate@binkert.org env.Depends(date_obj, objs) 4745517Snate@binkert.org objs.append(date_obj) 4755517Snate@binkert.org objs.extend(extra_libraries) 4765517Snate@binkert.org return objs 4775517Snate@binkert.org 4785517Snate@binkert.org################################################### 4795517Snate@binkert.org# 4806654Snate@binkert.org# Define binaries. Each different build type (debug, opt, etc.) gets 4815517Snate@binkert.org# a slightly different build environment. 4825517Snate@binkert.org# 4835517Snate@binkert.org################################################### 4845517Snate@binkert.org 4855517Snate@binkert.org# Include file paths are rooted in this directory. SCons will 4865517Snate@binkert.org# automatically expand '.' to refer to both the source directory and 4875517Snate@binkert.org# the corresponding build directory to pick up generated include 4885517Snate@binkert.org# files. 4896143Snate@binkert.orgenv.Append(CPPPATH='.') 4906654Snate@binkert.org 4915517Snate@binkert.org# Debug binary 4925517Snate@binkert.orgdebug = env.Copy(OBJSUFFIX='.do') 4935517Snate@binkert.orgdebug.Append(CCFLAGS=Split('-g -gstabs+ -O0')) 4945517Snate@binkert.orgdebug.Append(CPPDEFINES='DEBUG') 4955517Snate@binkert.orgdebug.Program(target = 'm5.debug', source = make_objs(sources, debug)) 4965517Snate@binkert.org 4975517Snate@binkert.org# Optimized binary 4985517Snate@binkert.orgopt = env.Copy() 4995517Snate@binkert.orgopt.Append(CCFLAGS=Split('-g -O5')) 5005517Snate@binkert.orgopt.Program(target = 'm5.opt', source = make_objs(sources, opt)) 5015517Snate@binkert.org 5025517Snate@binkert.org# "Fast" binary 5035517Snate@binkert.orgfast = env.Copy(OBJSUFFIX='.fo') 5045517Snate@binkert.orgfast.Append(CCFLAGS=Split('-O5')) 5056654Snate@binkert.orgfast.Append(CPPDEFINES='NDEBUG') 5066654Snate@binkert.orgfast.Program(target = 'm5.fast.unstripped', source = make_objs(sources, fast)) 5075517Snate@binkert.orgfast.Command(target = 'm5.fast', source = 'm5.fast.unstripped', 5085517Snate@binkert.org action = 'strip $SOURCE -o $TARGET') 5096143Snate@binkert.org 5106143Snate@binkert.org# Profiled binary 5116143Snate@binkert.orgprof = env.Copy(OBJSUFFIX='.po') 5126727Ssteve.reinhardt@amd.comprof.Append(CCFLAGS=Split('-O5 -g -pg'), LINKFLAGS='-pg') 5135517Snate@binkert.orgprof.Program(target = 'm5.prof', source = make_objs(sources, prof)) 5146727Ssteve.reinhardt@amd.com