SConscript revision 1696
112027Sjungma@eit.uni-kl.de# -*- mode:python -*-
212027Sjungma@eit.uni-kl.de
312027Sjungma@eit.uni-kl.de# Copyright (c) 2004 The Regents of The University of Michigan
412027Sjungma@eit.uni-kl.de# All rights reserved.
512027Sjungma@eit.uni-kl.de#
612027Sjungma@eit.uni-kl.de# Redistribution and use in source and binary forms, with or without
712027Sjungma@eit.uni-kl.de# modification, are permitted provided that the following conditions are
812027Sjungma@eit.uni-kl.de# met: redistributions of source code must retain the above copyright
912027Sjungma@eit.uni-kl.de# notice, this list of conditions and the following disclaimer;
1012027Sjungma@eit.uni-kl.de# redistributions in binary form must reproduce the above copyright
1112027Sjungma@eit.uni-kl.de# notice, this list of conditions and the following disclaimer in the
1212027Sjungma@eit.uni-kl.de# documentation and/or other materials provided with the distribution;
1312027Sjungma@eit.uni-kl.de# neither the name of the copyright holders nor the names of its
1412027Sjungma@eit.uni-kl.de# contributors may be used to endorse or promote products derived from
1512027Sjungma@eit.uni-kl.de# this software without specific prior written permission.
1612027Sjungma@eit.uni-kl.de#
1712027Sjungma@eit.uni-kl.de# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1812027Sjungma@eit.uni-kl.de# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1912027Sjungma@eit.uni-kl.de# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2012027Sjungma@eit.uni-kl.de# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2112027Sjungma@eit.uni-kl.de# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2212027Sjungma@eit.uni-kl.de# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2312027Sjungma@eit.uni-kl.de# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2412027Sjungma@eit.uni-kl.de# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2512027Sjungma@eit.uni-kl.de# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2612027Sjungma@eit.uni-kl.de# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2712027Sjungma@eit.uni-kl.de# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2812027Sjungma@eit.uni-kl.de
2912027Sjungma@eit.uni-kl.deimport os
3012027Sjungma@eit.uni-kl.deimport sys
3112027Sjungma@eit.uni-kl.defrom os.path import isdir
3212027Sjungma@eit.uni-kl.de
3312027Sjungma@eit.uni-kl.de# This file defines how to build a particular configuration of M5
3412027Sjungma@eit.uni-kl.de# based on variable settings in the 'env' build environment.
3512027Sjungma@eit.uni-kl.de
3612027Sjungma@eit.uni-kl.de# Import build environment variable from SConstruct.
3712027Sjungma@eit.uni-kl.deImport('env')
3812027Sjungma@eit.uni-kl.de
3912027Sjungma@eit.uni-kl.de###################################################
4012027Sjungma@eit.uni-kl.de#
4112027Sjungma@eit.uni-kl.de# Define needed sources.
4212027Sjungma@eit.uni-kl.de#
4312027Sjungma@eit.uni-kl.de###################################################
4412027Sjungma@eit.uni-kl.de
4512027Sjungma@eit.uni-kl.de# Base sources used by all configurations.
4612027Sjungma@eit.uni-kl.debase_sources = Split('''
4712027Sjungma@eit.uni-kl.de	arch/alpha/decoder.cc
4812027Sjungma@eit.uni-kl.de        arch/alpha/alpha_full_cpu_exec.cc
4912027Sjungma@eit.uni-kl.de	arch/alpha/fast_cpu_exec.cc
5012027Sjungma@eit.uni-kl.de	arch/alpha/simple_cpu_exec.cc
5112027Sjungma@eit.uni-kl.de	arch/alpha/inorder_cpu_exec.cc
5212027Sjungma@eit.uni-kl.de	arch/alpha/full_cpu_exec.cc
5312027Sjungma@eit.uni-kl.de	arch/alpha/faults.cc
5412027Sjungma@eit.uni-kl.de	arch/alpha/isa_traits.cc
5512027Sjungma@eit.uni-kl.de
5612027Sjungma@eit.uni-kl.de	base/circlebuf.cc
5712027Sjungma@eit.uni-kl.de	base/copyright.cc
5812027Sjungma@eit.uni-kl.de	base/cprintf.cc
5912027Sjungma@eit.uni-kl.de        base/embedfile.cc
6012027Sjungma@eit.uni-kl.de	base/fast_alloc.cc
6112027Sjungma@eit.uni-kl.de	base/fifo_buffer.cc
6212027Sjungma@eit.uni-kl.de	base/hostinfo.cc
6312027Sjungma@eit.uni-kl.de	base/hybrid_pred.cc
6412027Sjungma@eit.uni-kl.de	base/inifile.cc
6512027Sjungma@eit.uni-kl.de	base/intmath.cc
6612027Sjungma@eit.uni-kl.de	base/match.cc
6712027Sjungma@eit.uni-kl.de	base/misc.cc
6812027Sjungma@eit.uni-kl.de	base/output.cc
6912027Sjungma@eit.uni-kl.de	base/pollevent.cc
7012027Sjungma@eit.uni-kl.de	base/python.cc
7112027Sjungma@eit.uni-kl.de	base/range.cc
7212027Sjungma@eit.uni-kl.de	base/random.cc
7312027Sjungma@eit.uni-kl.de	base/sat_counter.cc
7412027Sjungma@eit.uni-kl.de	base/socket.cc
7512027Sjungma@eit.uni-kl.de	base/statistics.cc
7612027Sjungma@eit.uni-kl.de	base/str.cc
7712027Sjungma@eit.uni-kl.de	base/time.cc
7812027Sjungma@eit.uni-kl.de	base/trace.cc
7912027Sjungma@eit.uni-kl.de	base/traceflags.cc
8012027Sjungma@eit.uni-kl.de	base/userinfo.cc
8112027Sjungma@eit.uni-kl.de	base/compression/lzss_compression.cc
8212027Sjungma@eit.uni-kl.de	base/loader/aout_object.cc
8312027Sjungma@eit.uni-kl.de	base/loader/ecoff_object.cc
8412027Sjungma@eit.uni-kl.de	base/loader/elf_object.cc
8512027Sjungma@eit.uni-kl.de	base/loader/object_file.cc
8612027Sjungma@eit.uni-kl.de	base/loader/symtab.cc
8712027Sjungma@eit.uni-kl.de	base/stats/events.cc
8812027Sjungma@eit.uni-kl.de	base/stats/python.cc
8912027Sjungma@eit.uni-kl.de	base/stats/statdb.cc
9012027Sjungma@eit.uni-kl.de	base/stats/visit.cc
9112027Sjungma@eit.uni-kl.de	base/stats/text.cc
9212027Sjungma@eit.uni-kl.de
9312027Sjungma@eit.uni-kl.de	cpu/base_cpu.cc
9412027Sjungma@eit.uni-kl.de        cpu/base_dyn_inst.cc
9512027Sjungma@eit.uni-kl.de	cpu/exec_context.cc
9612027Sjungma@eit.uni-kl.de	cpu/exetrace.cc
9712027Sjungma@eit.uni-kl.de	cpu/pc_event.cc
9812027Sjungma@eit.uni-kl.de	cpu/static_inst.cc
9912027Sjungma@eit.uni-kl.de        cpu/beta_cpu/2bit_local_pred.cc
10012027Sjungma@eit.uni-kl.de        cpu/beta_cpu/alpha_dyn_inst.cc
10112027Sjungma@eit.uni-kl.de        cpu/beta_cpu/alpha_full_cpu.cc
10212027Sjungma@eit.uni-kl.de        cpu/beta_cpu/alpha_full_cpu_builder.cc
10312027Sjungma@eit.uni-kl.de        cpu/beta_cpu/bpred_unit.cc
10412027Sjungma@eit.uni-kl.de        cpu/beta_cpu/btb.cc
10512027Sjungma@eit.uni-kl.de        cpu/beta_cpu/commit.cc
10612027Sjungma@eit.uni-kl.de        cpu/beta_cpu/decode.cc
10712027Sjungma@eit.uni-kl.de        cpu/beta_cpu/fetch.cc
10812027Sjungma@eit.uni-kl.de        cpu/beta_cpu/free_list.cc
10912027Sjungma@eit.uni-kl.de        cpu/beta_cpu/full_cpu.cc
11012027Sjungma@eit.uni-kl.de        cpu/beta_cpu/iew.cc
11112027Sjungma@eit.uni-kl.de        cpu/beta_cpu/inst_queue.cc
11212027Sjungma@eit.uni-kl.de        cpu/beta_cpu/ldstq.cc
11312027Sjungma@eit.uni-kl.de        cpu/beta_cpu/mem_dep_unit.cc
11412027Sjungma@eit.uni-kl.de        cpu/beta_cpu/ras.cc
11512027Sjungma@eit.uni-kl.de        cpu/beta_cpu/rename.cc
11612027Sjungma@eit.uni-kl.de        cpu/beta_cpu/rename_map.cc
11712027Sjungma@eit.uni-kl.de        cpu/beta_cpu/rob.cc
11812027Sjungma@eit.uni-kl.de        cpu/beta_cpu/sat_counter.cc
11912027Sjungma@eit.uni-kl.de        cpu/beta_cpu/store_set.cc
12012027Sjungma@eit.uni-kl.de        cpu/beta_cpu/tournament_pred.cc
12112027Sjungma@eit.uni-kl.de	cpu/fast_cpu/fast_cpu.cc
12212027Sjungma@eit.uni-kl.de	cpu/full_cpu/bpred.cc
12312027Sjungma@eit.uni-kl.de	cpu/full_cpu/commit.cc
12412027Sjungma@eit.uni-kl.de	cpu/full_cpu/create_vector.cc
12512027Sjungma@eit.uni-kl.de	cpu/full_cpu/cv_spec_state.cc
12612027Sjungma@eit.uni-kl.de	cpu/full_cpu/dd_queue.cc
12712027Sjungma@eit.uni-kl.de	cpu/full_cpu/dep_link.cc
12812027Sjungma@eit.uni-kl.de	cpu/full_cpu/dispatch.cc
12912027Sjungma@eit.uni-kl.de	cpu/full_cpu/dyn_inst.cc
13012027Sjungma@eit.uni-kl.de	cpu/full_cpu/execute.cc
13112027Sjungma@eit.uni-kl.de	cpu/full_cpu/fetch.cc
13212027Sjungma@eit.uni-kl.de	cpu/full_cpu/floss_reasons.cc
13312027Sjungma@eit.uni-kl.de	cpu/full_cpu/fu_pool.cc
13412027Sjungma@eit.uni-kl.de	cpu/full_cpu/full_cpu.cc
13512027Sjungma@eit.uni-kl.de	cpu/full_cpu/inst_fifo.cc
13612027Sjungma@eit.uni-kl.de	cpu/full_cpu/instpipe.cc
13712027Sjungma@eit.uni-kl.de	cpu/full_cpu/issue.cc
13812027Sjungma@eit.uni-kl.de	cpu/full_cpu/ls_queue.cc
13912027Sjungma@eit.uni-kl.de	cpu/full_cpu/machine_queue.cc
14012027Sjungma@eit.uni-kl.de        cpu/full_cpu/pc_sample_profile.cc
14112027Sjungma@eit.uni-kl.de        cpu/full_cpu/pipetrace.cc
14212027Sjungma@eit.uni-kl.de        cpu/full_cpu/readyq.cc
14312027Sjungma@eit.uni-kl.de        cpu/full_cpu/reg_info.cc
14412027Sjungma@eit.uni-kl.de        cpu/full_cpu/rob_station.cc
14512027Sjungma@eit.uni-kl.de        cpu/full_cpu/spec_memory.cc
14612027Sjungma@eit.uni-kl.de        cpu/full_cpu/spec_state.cc
14712027Sjungma@eit.uni-kl.de        cpu/full_cpu/storebuffer.cc
14812027Sjungma@eit.uni-kl.de        cpu/full_cpu/writeback.cc
14912027Sjungma@eit.uni-kl.de        cpu/full_cpu/iq/iq_station.cc
15012027Sjungma@eit.uni-kl.de        cpu/full_cpu/iq/iqueue.cc
15112027Sjungma@eit.uni-kl.de        cpu/full_cpu/iq/segmented/chain_info.cc
15212027Sjungma@eit.uni-kl.de        cpu/full_cpu/iq/segmented/chain_wire.cc
15312027Sjungma@eit.uni-kl.de        cpu/full_cpu/iq/segmented/iq_seg.cc
15412027Sjungma@eit.uni-kl.de        cpu/full_cpu/iq/segmented/iq_segmented.cc
15512027Sjungma@eit.uni-kl.de        cpu/full_cpu/iq/segmented/seg_chain.cc
15612027Sjungma@eit.uni-kl.de        cpu/full_cpu/iq/seznec/iq_seznec.cc
15712027Sjungma@eit.uni-kl.de        cpu/full_cpu/iq/standard/iq_standard.cc
15812027Sjungma@eit.uni-kl.de        cpu/inorder_cpu/inorder_cpu.cc
15912027Sjungma@eit.uni-kl.de        cpu/sampling_cpu/sampling_cpu.cc
16012027Sjungma@eit.uni-kl.de        cpu/simple_cpu/simple_cpu.cc
16112027Sjungma@eit.uni-kl.de        cpu/trace/reader/mem_trace_reader.cc
16212027Sjungma@eit.uni-kl.de        cpu/trace/reader/ibm_reader.cc
16312027Sjungma@eit.uni-kl.de        cpu/trace/reader/itx_reader.cc
16412027Sjungma@eit.uni-kl.de        cpu/trace/reader/m5_reader.cc
16512027Sjungma@eit.uni-kl.de
16612027Sjungma@eit.uni-kl.de	mem/base_hier.cc
16712027Sjungma@eit.uni-kl.de	mem/base_mem.cc
16812027Sjungma@eit.uni-kl.de	mem/hier_params.cc
16912027Sjungma@eit.uni-kl.de	mem/mem_cmd.cc
17012027Sjungma@eit.uni-kl.de	mem/mem_debug.cc
17112027Sjungma@eit.uni-kl.de	mem/mem_req.cc
17212027Sjungma@eit.uni-kl.de	mem/memory_interface.cc
17312027Sjungma@eit.uni-kl.de	mem/bus/base_interface.cc
17412027Sjungma@eit.uni-kl.de	mem/bus/bus.cc
17512027Sjungma@eit.uni-kl.de	mem/bus/bus_bridge.cc
17612027Sjungma@eit.uni-kl.de	mem/bus/bus_bridge_master.cc
17712027Sjungma@eit.uni-kl.de	mem/bus/bus_bridge_slave.cc
17812027Sjungma@eit.uni-kl.de	mem/bus/bus_interface.cc
17912027Sjungma@eit.uni-kl.de	mem/bus/dma_bus_interface.cc
18012027Sjungma@eit.uni-kl.de	mem/bus/dma_interface.cc
18112027Sjungma@eit.uni-kl.de	mem/bus/master_interface.cc
18212027Sjungma@eit.uni-kl.de	mem/bus/slave_interface.cc
18312027Sjungma@eit.uni-kl.de	mem/cache/base_cache.cc
18412027Sjungma@eit.uni-kl.de	mem/cache/cache.cc
18512027Sjungma@eit.uni-kl.de	mem/cache/cache_builder.cc
18612027Sjungma@eit.uni-kl.de	mem/cache/coherence/coherence_protocol.cc
18712027Sjungma@eit.uni-kl.de	mem/cache/coherence/uni_coherence.cc
18812027Sjungma@eit.uni-kl.de	mem/cache/miss/blocking_buffer.cc
18912027Sjungma@eit.uni-kl.de	mem/cache/miss/miss_queue.cc
19012027Sjungma@eit.uni-kl.de	mem/cache/miss/mshr.cc
19112027Sjungma@eit.uni-kl.de	mem/cache/miss/mshr_queue.cc
19212027Sjungma@eit.uni-kl.de        mem/cache/prefetch/base_prefetcher.cc
19312027Sjungma@eit.uni-kl.de        mem/cache/prefetch/ghb_prefetcher.cc
19412027Sjungma@eit.uni-kl.de        mem/cache/prefetch/prefetcher.cc
19512027Sjungma@eit.uni-kl.de        mem/cache/prefetch/stride_prefetcher.cc
19612027Sjungma@eit.uni-kl.de        mem/cache/prefetch/tagged_prefetcher.cc
19712027Sjungma@eit.uni-kl.de	mem/cache/tags/base_tags.cc
19812027Sjungma@eit.uni-kl.de	mem/cache/tags/cache_tags.cc
19912027Sjungma@eit.uni-kl.de	mem/cache/tags/fa_lru.cc
20012027Sjungma@eit.uni-kl.de	mem/cache/tags/iic.cc
20112027Sjungma@eit.uni-kl.de	mem/cache/tags/lru.cc
20212027Sjungma@eit.uni-kl.de	mem/cache/tags/split.cc
20312027Sjungma@eit.uni-kl.de	mem/cache/tags/split_lifo.cc
20412027Sjungma@eit.uni-kl.de	mem/cache/tags/split_lru.cc
20512027Sjungma@eit.uni-kl.de	mem/cache/tags/repl/gen.cc
20612027Sjungma@eit.uni-kl.de	mem/cache/tags/repl/repl.cc
20712027Sjungma@eit.uni-kl.de	mem/functional_mem/functional_memory.cc
20812027Sjungma@eit.uni-kl.de	mem/functional_mem/main_memory.cc
20912027Sjungma@eit.uni-kl.de	mem/timing_mem/base_memory.cc
21012027Sjungma@eit.uni-kl.de	mem/timing_mem/memory_builder.cc
21112027Sjungma@eit.uni-kl.de	mem/timing_mem/simple_mem_bank.cc
21212027Sjungma@eit.uni-kl.de        mem/trace/itx_writer.cc
21312027Sjungma@eit.uni-kl.de	mem/trace/mem_trace_writer.cc
21412027Sjungma@eit.uni-kl.de	mem/trace/m5_writer.cc
21512027Sjungma@eit.uni-kl.de
21612027Sjungma@eit.uni-kl.de        python/pyconfig.cc
21712027Sjungma@eit.uni-kl.de        python/embedded_py.cc
21812027Sjungma@eit.uni-kl.de
21912027Sjungma@eit.uni-kl.de	sim/builder.cc
22012027Sjungma@eit.uni-kl.de	sim/configfile.cc
22112027Sjungma@eit.uni-kl.de	sim/debug.cc
22212027Sjungma@eit.uni-kl.de	sim/eventq.cc
22312027Sjungma@eit.uni-kl.de	sim/main.cc
22412027Sjungma@eit.uni-kl.de	sim/param.cc
22512027Sjungma@eit.uni-kl.de	sim/profile.cc
22612027Sjungma@eit.uni-kl.de	sim/root.cc
22712027Sjungma@eit.uni-kl.de	sim/serialize.cc
22812027Sjungma@eit.uni-kl.de	sim/sim_events.cc
22912027Sjungma@eit.uni-kl.de	sim/sim_exit.cc
23012027Sjungma@eit.uni-kl.de	sim/sim_object.cc
23112027Sjungma@eit.uni-kl.de	sim/startup.cc
23212027Sjungma@eit.uni-kl.de	sim/stat_context.cc
23312027Sjungma@eit.uni-kl.de	sim/stat_control.cc
23412027Sjungma@eit.uni-kl.de	sim/trace_context.cc
23512027Sjungma@eit.uni-kl.de        ''')
23612027Sjungma@eit.uni-kl.de
23712027Sjungma@eit.uni-kl.de# MySql sources
23812027Sjungma@eit.uni-kl.demysql_sources = Split('''
23912027Sjungma@eit.uni-kl.de	base/mysql.cc
24012027Sjungma@eit.uni-kl.de	base/stats/mysql.cc
24112027Sjungma@eit.uni-kl.de        ''')
24212027Sjungma@eit.uni-kl.de
24312027Sjungma@eit.uni-kl.de# Full-system sources
24412027Sjungma@eit.uni-kl.defull_system_sources = Split('''
24512027Sjungma@eit.uni-kl.de	arch/alpha/alpha_memory.cc
24612027Sjungma@eit.uni-kl.de	arch/alpha/arguments.cc
24712027Sjungma@eit.uni-kl.de	arch/alpha/ev5.cc
24812027Sjungma@eit.uni-kl.de	arch/alpha/osfpal.cc
24912027Sjungma@eit.uni-kl.de	arch/alpha/pseudo_inst.cc
25012027Sjungma@eit.uni-kl.de	arch/alpha/vtophys.cc
25112027Sjungma@eit.uni-kl.de
25212027Sjungma@eit.uni-kl.de	base/crc.cc
25312027Sjungma@eit.uni-kl.de	base/inet.cc
25412027Sjungma@eit.uni-kl.de	base/remote_gdb.cc
25512027Sjungma@eit.uni-kl.de
25612027Sjungma@eit.uni-kl.de	cpu/intr_control.cc
25712027Sjungma@eit.uni-kl.de
25812027Sjungma@eit.uni-kl.de	dev/alpha_console.cc
25912027Sjungma@eit.uni-kl.de	dev/baddev.cc
26012027Sjungma@eit.uni-kl.de        dev/simconsole.cc
26112027Sjungma@eit.uni-kl.de	dev/disk_image.cc
26212027Sjungma@eit.uni-kl.de	dev/dma.cc
26312027Sjungma@eit.uni-kl.de	dev/etherbus.cc
26412027Sjungma@eit.uni-kl.de	dev/etherdump.cc
26512027Sjungma@eit.uni-kl.de	dev/etherint.cc
26612027Sjungma@eit.uni-kl.de	dev/etherlink.cc
26712027Sjungma@eit.uni-kl.de	dev/etherpkt.cc
26812027Sjungma@eit.uni-kl.de	dev/ethertap.cc
26912027Sjungma@eit.uni-kl.de	dev/ide_ctrl.cc
27012027Sjungma@eit.uni-kl.de	dev/ide_disk.cc
27112027Sjungma@eit.uni-kl.de	dev/io_device.cc
27212027Sjungma@eit.uni-kl.de	dev/ns_gige.cc
27312027Sjungma@eit.uni-kl.de	dev/etherdev.cc
27412027Sjungma@eit.uni-kl.de	dev/pciconfigall.cc
27512027Sjungma@eit.uni-kl.de	dev/pcidev.cc
27612027Sjungma@eit.uni-kl.de	dev/pktfifo.cc
27712027Sjungma@eit.uni-kl.de	dev/scsi.cc
27812027Sjungma@eit.uni-kl.de	dev/scsi_ctrl.cc
27912027Sjungma@eit.uni-kl.de	dev/scsi_disk.cc
28012027Sjungma@eit.uni-kl.de	dev/scsi_none.cc
28112027Sjungma@eit.uni-kl.de	dev/sinic.cc
28212027Sjungma@eit.uni-kl.de	dev/simple_disk.cc
28312027Sjungma@eit.uni-kl.de	dev/tlaser_clock.cc
28412027Sjungma@eit.uni-kl.de	dev/tlaser_ipi.cc
28512027Sjungma@eit.uni-kl.de	dev/tlaser_mbox.cc
28612027Sjungma@eit.uni-kl.de	dev/tlaser_mc146818.cc
28712027Sjungma@eit.uni-kl.de	dev/tlaser_node.cc
28812027Sjungma@eit.uni-kl.de	dev/tlaser_pcia.cc
28912027Sjungma@eit.uni-kl.de	dev/tlaser_pcidev.cc
29012027Sjungma@eit.uni-kl.de	dev/tlaser_serial.cc
29112027Sjungma@eit.uni-kl.de	dev/turbolaser.cc
29212027Sjungma@eit.uni-kl.de	dev/tsunami.cc
29312027Sjungma@eit.uni-kl.de	dev/tsunami_cchip.cc
29412027Sjungma@eit.uni-kl.de	dev/tsunami_fake.cc
29512027Sjungma@eit.uni-kl.de	dev/tsunami_io.cc
29612027Sjungma@eit.uni-kl.de	dev/tsunami_pchip.cc
29712027Sjungma@eit.uni-kl.de	dev/uart.cc
29812027Sjungma@eit.uni-kl.de
29912027Sjungma@eit.uni-kl.de	kern/kernel_binning.cc
30012027Sjungma@eit.uni-kl.de	kern/kernel_stats.cc
30112027Sjungma@eit.uni-kl.de	kern/system_events.cc
30212027Sjungma@eit.uni-kl.de	kern/linux/linux_events.cc
30312027Sjungma@eit.uni-kl.de	kern/linux/linux_syscalls.cc
30412027Sjungma@eit.uni-kl.de	kern/linux/linux_system.cc
30512027Sjungma@eit.uni-kl.de	kern/linux/printk.cc
30612027Sjungma@eit.uni-kl.de	kern/tru64/dump_mbuf.cc
30712027Sjungma@eit.uni-kl.de	kern/tru64/printf.cc
30812027Sjungma@eit.uni-kl.de	kern/tru64/tru64_events.cc
30912027Sjungma@eit.uni-kl.de	kern/tru64/tru64_syscalls.cc
31012027Sjungma@eit.uni-kl.de	kern/tru64/tru64_system.cc
31112027Sjungma@eit.uni-kl.de
31212027Sjungma@eit.uni-kl.de	mem/functional_mem/memory_control.cc
31312027Sjungma@eit.uni-kl.de	mem/functional_mem/physical_memory.cc
31412027Sjungma@eit.uni-kl.de        dev/platform.cc
31512027Sjungma@eit.uni-kl.de
31612027Sjungma@eit.uni-kl.de	sim/system.cc
31712027Sjungma@eit.uni-kl.de        ''')
31812027Sjungma@eit.uni-kl.de
31912027Sjungma@eit.uni-kl.de# Syscall emulation (non-full-system) sources
32012027Sjungma@eit.uni-kl.desyscall_emulation_sources = Split('''
32112027Sjungma@eit.uni-kl.de	arch/alpha/alpha_common_syscall_emul.cc
32212027Sjungma@eit.uni-kl.de	arch/alpha/alpha_linux_process.cc
32312027Sjungma@eit.uni-kl.de	arch/alpha/alpha_tru64_process.cc
32412027Sjungma@eit.uni-kl.de	cpu/memtest/memtest.cc
32512027Sjungma@eit.uni-kl.de        cpu/trace/opt_cpu.cc
32612027Sjungma@eit.uni-kl.de	cpu/trace/trace_cpu.cc
32712027Sjungma@eit.uni-kl.de	eio/eio.cc
32812027Sjungma@eit.uni-kl.de	eio/exolex.cc
32912027Sjungma@eit.uni-kl.de	eio/libexo.cc
33012027Sjungma@eit.uni-kl.de	sim/process.cc
33112027Sjungma@eit.uni-kl.de	sim/syscall_emul.cc
33212027Sjungma@eit.uni-kl.de        ''')
33312027Sjungma@eit.uni-kl.de
33412027Sjungma@eit.uni-kl.detargetarch_files = Split('''
33512027Sjungma@eit.uni-kl.de        alpha_common_syscall_emul.hh
33612027Sjungma@eit.uni-kl.de        alpha_linux_process.hh
33712027Sjungma@eit.uni-kl.de        alpha_memory.hh
33812027Sjungma@eit.uni-kl.de        alpha_tru64_process.hh
33912027Sjungma@eit.uni-kl.de        aout_machdep.h
34012027Sjungma@eit.uni-kl.de        arguments.hh
34112027Sjungma@eit.uni-kl.de        byte_swap.hh
34212027Sjungma@eit.uni-kl.de        ecoff_machdep.h
34312027Sjungma@eit.uni-kl.de        elf_machdep.h
34412027Sjungma@eit.uni-kl.de        ev5.hh
34512027Sjungma@eit.uni-kl.de        faults.hh
34612027Sjungma@eit.uni-kl.de        isa_fullsys_traits.hh
34712027Sjungma@eit.uni-kl.de        isa_traits.hh
34812027Sjungma@eit.uni-kl.de        machine_exo.h
34912027Sjungma@eit.uni-kl.de        osfpal.hh
35012027Sjungma@eit.uni-kl.de        pseudo_inst.hh
35112027Sjungma@eit.uni-kl.de        vptr.hh
35212027Sjungma@eit.uni-kl.de        vtophys.hh
35312027Sjungma@eit.uni-kl.de        ''')
35412027Sjungma@eit.uni-kl.de
35512027Sjungma@eit.uni-kl.defor f in targetarch_files:
35612027Sjungma@eit.uni-kl.de    env.Command('targetarch/' + f, 'arch/alpha/' + f,
35712027Sjungma@eit.uni-kl.de                '''echo '#include "arch/alpha/%s"' > $TARGET''' % f)
35812027Sjungma@eit.uni-kl.de
35912027Sjungma@eit.uni-kl.de
36012027Sjungma@eit.uni-kl.de# Set up complete list of sources based on configuration.
36112027Sjungma@eit.uni-kl.desources = base_sources
36212027Sjungma@eit.uni-kl.de
36312027Sjungma@eit.uni-kl.deif env['FULL_SYSTEM']:
36412027Sjungma@eit.uni-kl.de    sources += full_system_sources
36512027Sjungma@eit.uni-kl.deelse:
36612027Sjungma@eit.uni-kl.de    sources += syscall_emulation_sources
36712027Sjungma@eit.uni-kl.de
36812027Sjungma@eit.uni-kl.deextra_libraries = []
36912027Sjungma@eit.uni-kl.deenv.Append(LIBS=['z'])
37012027Sjungma@eit.uni-kl.deif isdir('/usr/lib64/mysql') or isdir('/usr/lib/mysql') or \
37112027Sjungma@eit.uni-kl.de   isdir('/usr/local/lib/mysql'):
37212027Sjungma@eit.uni-kl.de    print 'Compiling with MySQL support!'
37312027Sjungma@eit.uni-kl.de    env.Append(LIBPATH=['/usr/lib64/mysql', '/usr/local/lib/mysql/',
37412027Sjungma@eit.uni-kl.de                        '/usr/lib/mysql'])
37512027Sjungma@eit.uni-kl.de    env.Append(CPPPATH=['/usr/local/include/mysql', '/usr/include/mysql'])
37612027Sjungma@eit.uni-kl.de    sources += mysql_sources
37712027Sjungma@eit.uni-kl.de    env.Append(CPPDEFINES = 'USE_MYSQL')
37812027Sjungma@eit.uni-kl.de    env.Append(CPPDEFINES = 'STATS_BINNING')
37912027Sjungma@eit.uni-kl.de    env.Append(LIBS=['mysqlclient'])
38012027Sjungma@eit.uni-kl.de
38112027Sjungma@eit.uni-kl.de###################################################
38212027Sjungma@eit.uni-kl.de#
38312027Sjungma@eit.uni-kl.de# Special build rules.
38412027Sjungma@eit.uni-kl.de#
38512027Sjungma@eit.uni-kl.de###################################################
38612027Sjungma@eit.uni-kl.de
38712027Sjungma@eit.uni-kl.de# base/traceflags.{cc,hh} are generated from base/traceflags.py.
38812027Sjungma@eit.uni-kl.de# $TARGET.base will expand to "<build-dir>/base/traceflags".
38912027Sjungma@eit.uni-kl.deenv.Command(Split('base/traceflags.hh base/traceflags.cc'),
39012027Sjungma@eit.uni-kl.de            'base/traceflags.py',
39112027Sjungma@eit.uni-kl.de            'python $SOURCE $TARGET.base')
39212027Sjungma@eit.uni-kl.de
39312027Sjungma@eit.uni-kl.de# several files are generated from arch/$TARGET_ISA/isa_desc.
39412027Sjungma@eit.uni-kl.deenv.Command(Split('''arch/alpha/decoder.cc
39512027Sjungma@eit.uni-kl.de		     arch/alpha/decoder.hh
39612027Sjungma@eit.uni-kl.de                     arch/alpha/alpha_full_cpu_exec.cc
39712027Sjungma@eit.uni-kl.de		     arch/alpha/fast_cpu_exec.cc
39812027Sjungma@eit.uni-kl.de                     arch/alpha/simple_cpu_exec.cc
39912027Sjungma@eit.uni-kl.de                     arch/alpha/inorder_cpu_exec.cc
40012027Sjungma@eit.uni-kl.de                     arch/alpha/full_cpu_exec.cc'''),
40112027Sjungma@eit.uni-kl.de            Split('''arch/alpha/isa_desc
40212027Sjungma@eit.uni-kl.de		     arch/isa_parser.py'''),
40312027Sjungma@eit.uni-kl.de            '$SRCDIR/arch/isa_parser.py $SOURCE $TARGET.dir arch/alpha')
40412027Sjungma@eit.uni-kl.de
40512027Sjungma@eit.uni-kl.de
40612027Sjungma@eit.uni-kl.de# libelf build is described in its own SConscript file.
40712027Sjungma@eit.uni-kl.de# SConscript-local is the per-config build, which just copies some
40812027Sjungma@eit.uni-kl.de# header files into a place where they can be found.
40912027Sjungma@eit.uni-kl.deSConscript('libelf/SConscript-local', exports = 'env', duplicate=0)
41012027Sjungma@eit.uni-kl.deSConscript('python/SConscript', exports = ['env'], duplicate=0)
41112027Sjungma@eit.uni-kl.de
41212027Sjungma@eit.uni-kl.de# This function adds the specified sources to the given build
41312027Sjungma@eit.uni-kl.de# environment, and returns a list of all the corresponding SCons
41412027Sjungma@eit.uni-kl.de# Object nodes (including an extra one for date.cc).  We explicitly
41512027Sjungma@eit.uni-kl.de# add the Object nodes so we can set up special dependencies for
41612027Sjungma@eit.uni-kl.de# date.cc.
41712027Sjungma@eit.uni-kl.dedef make_objs(sources, env):
41812027Sjungma@eit.uni-kl.de    objs = [env.Object(s) for s in sources]
41912027Sjungma@eit.uni-kl.de    # make date.cc depend on all other objects so it always gets
42012027Sjungma@eit.uni-kl.de    # recompiled whenever anything else does
42112027Sjungma@eit.uni-kl.de    date_obj = env.Object('base/date.cc')
42212027Sjungma@eit.uni-kl.de    env.Depends(date_obj, objs)
42312027Sjungma@eit.uni-kl.de    objs.append(date_obj)
42412027Sjungma@eit.uni-kl.de    objs.extend(extra_libraries)
42512027Sjungma@eit.uni-kl.de    return objs
42612027Sjungma@eit.uni-kl.de
42712027Sjungma@eit.uni-kl.de###################################################
42812027Sjungma@eit.uni-kl.de#
42912027Sjungma@eit.uni-kl.de# Define binaries.  Each different build type (debug, opt, etc.) gets
43012027Sjungma@eit.uni-kl.de# a slightly different build environment.
43112027Sjungma@eit.uni-kl.de#
43212027Sjungma@eit.uni-kl.de###################################################
43312027Sjungma@eit.uni-kl.de
43412027Sjungma@eit.uni-kl.de# Include file paths are rooted in this directory.  SCons will
43512027Sjungma@eit.uni-kl.de# automatically expand '.' to refer to both the source directory and
43612027Sjungma@eit.uni-kl.de# the corresponding build directory to pick up generated include
43712027Sjungma@eit.uni-kl.de# files.
43812027Sjungma@eit.uni-kl.deenv.Append(CPPPATH='.')
43912027Sjungma@eit.uni-kl.de
44012027Sjungma@eit.uni-kl.de# Debug binary
44112027Sjungma@eit.uni-kl.dedebug = env.Copy(OBJSUFFIX='.do')
44212027Sjungma@eit.uni-kl.dedebug.Append(CCFLAGS=Split('-g -gstabs+ -O0'))
44312027Sjungma@eit.uni-kl.dedebug.Append(CPPDEFINES='DEBUG')
44412027Sjungma@eit.uni-kl.dedebug.Program(target = 'm5.debug', source = make_objs(sources, debug))
44512027Sjungma@eit.uni-kl.de
44612027Sjungma@eit.uni-kl.de# Optimized binary
44712027Sjungma@eit.uni-kl.deopt = env.Copy()
44812027Sjungma@eit.uni-kl.deopt.Append(CCFLAGS=Split('-g -O5'))
44912027Sjungma@eit.uni-kl.deopt.Program(target = 'm5.opt', source = make_objs(sources, opt))
45012027Sjungma@eit.uni-kl.de
45112027Sjungma@eit.uni-kl.de# "Fast" binary
45212027Sjungma@eit.uni-kl.defast = env.Copy(OBJSUFFIX='.fo')
45312027Sjungma@eit.uni-kl.defast.Append(CCFLAGS=Split('-O5'))
45412027Sjungma@eit.uni-kl.defast.Append(CPPDEFINES='NDEBUG')
45512027Sjungma@eit.uni-kl.defast.Program(target = 'm5.fast.unstripped', source = make_objs(sources, fast))
45612027Sjungma@eit.uni-kl.defast.Command(target = 'm5.fast', source = 'm5.fast.unstripped',
45712027Sjungma@eit.uni-kl.de             action = 'strip $SOURCE -o $TARGET')
45812027Sjungma@eit.uni-kl.de
45912027Sjungma@eit.uni-kl.de# Profiled binary
46012027Sjungma@eit.uni-kl.deprof = env.Copy(OBJSUFFIX='.po')
46112027Sjungma@eit.uni-kl.deprof.Append(CCFLAGS=Split('-O5 -g -pg'), LINKFLAGS='-pg')
46212027Sjungma@eit.uni-kl.deprof.Program(target = 'm5.prof', source = make_objs(sources, prof))
46312027Sjungma@eit.uni-kl.de