SConscript revision 2921
12567SN/A# -*- mode:python -*-
27650SAli.Saidi@ARM.com
37650SAli.Saidi@ARM.com# Copyright (c) 2004-2005 The Regents of The University of Michigan
47650SAli.Saidi@ARM.com# All rights reserved.
57650SAli.Saidi@ARM.com#
67650SAli.Saidi@ARM.com# Redistribution and use in source and binary forms, with or without
77650SAli.Saidi@ARM.com# modification, are permitted provided that the following conditions are
87650SAli.Saidi@ARM.com# met: redistributions of source code must retain the above copyright
97650SAli.Saidi@ARM.com# notice, this list of conditions and the following disclaimer;
107650SAli.Saidi@ARM.com# redistributions in binary form must reproduce the above copyright
117650SAli.Saidi@ARM.com# notice, this list of conditions and the following disclaimer in the
127650SAli.Saidi@ARM.com# documentation and/or other materials provided with the distribution;
137650SAli.Saidi@ARM.com# neither the name of the copyright holders nor the names of its
142567SN/A# contributors may be used to endorse or promote products derived from
152567SN/A# this software without specific prior written permission.
162567SN/A#
172567SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
182567SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
192567SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
202567SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
212567SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
222567SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
232567SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
242567SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
252567SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
262567SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
272567SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
282567SN/A#
292567SN/A# Authors: Gabe Black
302567SN/A#          Steve Reinhardt
312567SN/A#          Korey Sewell
322567SN/A
332567SN/Aimport os
342567SN/Aimport sys
352567SN/Afrom os.path import isdir
362567SN/A
372567SN/A# Import build environment variable from SConstruct.
382567SN/AImport('env')
392665SN/A
402665SN/A###################################################
412567SN/A#
422567SN/A# Define needed sources.
436757SAli.Saidi@ARM.com#
446757SAli.Saidi@ARM.com###################################################
452567SN/A
462567SN/A# Base sources used by all configurations.
472567SN/Abase_sources = Split('''
482567SN/A	faults.cc
498229Snate@binkert.org	isa_traits.cc
506757SAli.Saidi@ARM.com        utility.cc
512567SN/A	''')
522567SN/A
532567SN/A# Full-system sources
546757SAli.Saidi@ARM.comfull_system_sources = Split('''
552567SN/A	#Insert Full-System Files Here
568285SPrakash.Ramrakhyani@arm.com	''')
577650SAli.Saidi@ARM.com
587650SAli.Saidi@ARM.com# Syscall emulation (non-full-system) sources
597650SAli.Saidi@ARM.comsyscall_emulation_sources = Split('''
607650SAli.Saidi@ARM.com        linux/linux.cc
617650SAli.Saidi@ARM.com	linux/process.cc
627650SAli.Saidi@ARM.com        process.cc
638286SAli.Saidi@ARM.com	''')
648286SAli.Saidi@ARM.com
658286SAli.Saidi@ARM.com# Set up complete list of sources based on configuration.
668286SAli.Saidi@ARM.comsources = base_sources
678286SAli.Saidi@ARM.com
682567SN/Aif env['FULL_SYSTEM']:
696757SAli.Saidi@ARM.com    sources += full_system_sources
708286SAli.Saidi@ARM.comelse:
718286SAli.Saidi@ARM.com    sources += syscall_emulation_sources
728286SAli.Saidi@ARM.com
738286SAli.Saidi@ARM.com# Convert file names to SCons File objects.  This takes care of the
748286SAli.Saidi@ARM.com# path relative to the top of the directory tree.
758286SAli.Saidi@ARM.comsources = [File(s) for s in sources]
766757SAli.Saidi@ARM.com
776757SAli.Saidi@ARM.com# Add in files generated by the ISA description.
788286SAli.Saidi@ARM.comisa_desc_files = env.ISADesc('isa/main.isa')
798706Sandreas.hansson@arm.com# Only non-header files need to be compiled.
808706Sandreas.hansson@arm.comisa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')]
818706Sandreas.hansson@arm.comsources += isa_desc_sources
828706Sandreas.hansson@arm.com
838286SAli.Saidi@ARM.comReturn('sources')
848527SAli.Saidi@ARM.com