SConscript revision 2152
12810SN/A# -*- mode:python -*- 22810SN/A 32810SN/A# Copyright (c) 2004-2005 The Regents of The University of Michigan 42810SN/A# All rights reserved. 52810SN/A# 62810SN/A# Redistribution and use in source and binary forms, with or without 72810SN/A# modification, are permitted provided that the following conditions are 82810SN/A# met: redistributions of source code must retain the above copyright 92810SN/A# notice, this list of conditions and the following disclaimer; 102810SN/A# redistributions in binary form must reproduce the above copyright 112810SN/A# notice, this list of conditions and the following disclaimer in the 122810SN/A# documentation and/or other materials provided with the distribution; 132810SN/A# neither the name of the copyright holders nor the names of its 142810SN/A# contributors may be used to endorse or promote products derived from 152810SN/A# this software without specific prior written permission. 162810SN/A# 172810SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 182810SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 192810SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 202810SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 212810SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 222810SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 232810SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 242810SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 252810SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 262810SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 272810SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282810SN/A 294458SN/Aimport os 304458SN/Aimport sys 312810SN/Afrom os.path import isdir 322810SN/A 332810SN/A# Import build environment variable from SConstruct. 342810SN/AImport('env') 352810SN/A 362810SN/A################################################### 372810SN/A# 382810SN/A# Define needed sources. 392810SN/A# 402810SN/A################################################### 412810SN/A 422810SN/A# Base sources used by all configurations. 432810SN/Abase_sources = Split(''' 444666SN/A faults.cc 452810SN/A isa_traits.cc 462810SN/A ''') 472825SN/A 482810SN/A# Full-system sources 492810SN/Afull_system_sources = Split(''' 505338Sstever@gmail.com alpha_memory.cc 512810SN/A arguments.cc 522810SN/A ev5.cc 534626SN/A osfpal.cc 542810SN/A stacktrace.cc 555034SN/A vtophys.cc 562811SN/A ''') 574626SN/A 582810SN/A# Syscall emulation (non-full-system) sources 593194SN/Asyscall_emulation_sources = Split(''' 602810SN/A alpha_common_syscall_emul.cc 612810SN/A alpha_linux_process.cc 622810SN/A alpha_tru64_process.cc 632810SN/A ''') 642810SN/A 654628SN/Asources = base_sources 664628SN/A 674628SN/Aif env['FULL_SYSTEM']: 684628SN/A sources += full_system_sources 694628SN/Aelse: 704628SN/A sources += syscall_emulation_sources 714628SN/A 724628SN/A# Convert file names to SCons File objects. This takes care of the 734628SN/A# path relative to the top of the directory tree. 744628SN/Asources = [File(s) for s in sources] 754628SN/A 764628SN/A# Add in files generated by the ISA description. 774628SN/Aisa_desc_files = env.ISADesc('isa/main.isa') 784628SN/A# Only non-header files need to be compiled. 794628SN/Aisa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')] 804628SN/Asources += isa_desc_sources 814628SN/A 824628SN/AReturn('sources') 834628SN/A