SConscript revision 4188:6a9ac3b35285
14166Sgblack@eecs.umich.edu# -*- mode:python -*-
210554Salexandru.dutu@amd.com
37087Snate@binkert.org# Copyright (c) 2004-2005 The Regents of The University of Michigan
47087Snate@binkert.org# All rights reserved.
57087Snate@binkert.org#
67087Snate@binkert.org# Redistribution and use in source and binary forms, with or without
77087Snate@binkert.org# modification, are permitted provided that the following conditions are
87087Snate@binkert.org# met: redistributions of source code must retain the above copyright
97087Snate@binkert.org# notice, this list of conditions and the following disclaimer;
107087Snate@binkert.org# redistributions in binary form must reproduce the above copyright
117087Snate@binkert.org# notice, this list of conditions and the following disclaimer in the
127087Snate@binkert.org# documentation and/or other materials provided with the distribution;
137087Snate@binkert.org# neither the name of the copyright holders nor the names of its
147087Snate@binkert.org# contributors may be used to endorse or promote products derived from
154166Sgblack@eecs.umich.edu# this software without specific prior written permission.
164166Sgblack@eecs.umich.edu#
174166Sgblack@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
184166Sgblack@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
194166Sgblack@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
204166Sgblack@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
214166Sgblack@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
224166Sgblack@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
234166Sgblack@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
244166Sgblack@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
254166Sgblack@eecs.umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
264166Sgblack@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
274166Sgblack@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
284166Sgblack@eecs.umich.edu#
294166Sgblack@eecs.umich.edu# Authors: Gabe Black
304166Sgblack@eecs.umich.edu#          Steve Reinhardt
314166Sgblack@eecs.umich.edu
324166Sgblack@eecs.umich.eduimport os
334166Sgblack@eecs.umich.eduimport sys
344166Sgblack@eecs.umich.edufrom os.path import isdir
354166Sgblack@eecs.umich.edu
364166Sgblack@eecs.umich.edu# Import build environment variable from SConstruct.
374166Sgblack@eecs.umich.eduImport('env')
384166Sgblack@eecs.umich.edu
394166Sgblack@eecs.umich.edu###################################################
404166Sgblack@eecs.umich.edu#
414166Sgblack@eecs.umich.edu# Define needed sources.
424166Sgblack@eecs.umich.edu#
434166Sgblack@eecs.umich.edu###################################################
444166Sgblack@eecs.umich.edu
4511793Sbrandon.potter@amd.com# Base sources used by all configurations.
4611793Sbrandon.potter@amd.combase_sources = Split('''
4711854Sbrandon.potter@amd.com	asi.cc
4811854Sbrandon.potter@amd.com	faults.cc
4911854Sbrandon.potter@amd.com	floatregfile.cc
5011793Sbrandon.potter@amd.com	intregfile.cc
518229Snate@binkert.org	miscregfile.cc
528229Snate@binkert.org	regfile.cc
5310554Salexandru.dutu@amd.com	remote_gdb.cc
544166Sgblack@eecs.umich.edu	''')
558229Snate@binkert.org
564166Sgblack@eecs.umich.edu# Full-system sources
5712334Sgabeblack@google.comfull_system_sources = Split('''
585004Sgblack@eecs.umich.edu	arguments.cc
594166Sgblack@eecs.umich.edu        pagetable.cc
608232Snate@binkert.org	stacktrace.cc
6110554Salexandru.dutu@amd.com	system.cc
624166Sgblack@eecs.umich.edu	tlb.cc
6312431Sgabeblack@google.com        ua2005.cc
6411854Sbrandon.potter@amd.com	vtophys.cc
654434Ssaidi@eecs.umich.edu	''')
6611794Sbrandon.potter@amd.com
6711800Sbrandon.potter@amd.com# Syscall emulation (non-full-system) sources
684166Sgblack@eecs.umich.edusyscall_emulation_sources = Split('''
694166Sgblack@eecs.umich.edu	linux/linux.cc
704166Sgblack@eecs.umich.edu	linux/process.cc
714166Sgblack@eecs.umich.edu	linux/syscalls.cc
724166Sgblack@eecs.umich.edu	process.cc
735958Sgblack@eecs.umich.edu	solaris/process.cc
745958Sgblack@eecs.umich.edu	solaris/solaris.cc
755958Sgblack@eecs.umich.edu	''')
765958Sgblack@eecs.umich.edu
7711906SBrandon.Potter@amd.comsources = base_sources
785958Sgblack@eecs.umich.edu
7911906SBrandon.Potter@amd.comif env['FULL_SYSTEM']:
805958Sgblack@eecs.umich.edu    sources += full_system_sources
815958Sgblack@eecs.umich.eduelse:
825958Sgblack@eecs.umich.edu    sources += syscall_emulation_sources
8311704Santhony.gutierrez@amd.com
8411704Santhony.gutierrez@amd.com# Convert file names to SCons File objects.  This takes care of the
8511704Santhony.gutierrez@amd.com# path relative to the top of the directory tree.
8611704Santhony.gutierrez@amd.comsources = [File(s) for s in sources]
875959Sgblack@eecs.umich.edu
885959Sgblack@eecs.umich.edu# Add in files generated by the ISA description.
895959Sgblack@eecs.umich.eduisa_desc_files = env.ISADesc('isa/main.isa')
905959Sgblack@eecs.umich.edu# Only non-header files need to be compiled.
915959Sgblack@eecs.umich.eduisa_desc_sources = [f for f in isa_desc_files if not f.path.endswith('.hh')]
925959Sgblack@eecs.umich.edusources += isa_desc_sources
9311385Sbrandon.potter@amd.com
945959Sgblack@eecs.umich.eduReturn('sources')
9511704Santhony.gutierrez@amd.com