SConscript revision 3546
12139SN/A# -*- mode:python -*- 22139SN/A 32139SN/A# Copyright (c) 2006 The Regents of The University of Michigan 42139SN/A# All rights reserved. 52139SN/A# 62139SN/A# Redistribution and use in source and binary forms, with or without 72139SN/A# modification, are permitted provided that the following conditions are 82139SN/A# met: redistributions of source code must retain the above copyright 92139SN/A# notice, this list of conditions and the following disclaimer; 102139SN/A# redistributions in binary form must reproduce the above copyright 112139SN/A# notice, this list of conditions and the following disclaimer in the 122139SN/A# documentation and/or other materials provided with the distribution; 132139SN/A# neither the name of the copyright holders nor the names of its 142139SN/A# contributors may be used to endorse or promote products derived from 152139SN/A# this software without specific prior written permission. 162139SN/A# 172139SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 182139SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 192139SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 202139SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 212139SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 222139SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 232139SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 242139SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 252139SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 262139SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 272139SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 282665Ssaidi@eecs.umich.edu# 292665Ssaidi@eecs.umich.edu# Authors: Steve Reinhardt 302139SN/A 314202Sbinkertn@umich.eduimport os.path, sys 322139SN/A 334202Sbinkertn@umich.edu# Import build environment variable from SConstruct. 342152SN/AImport('env') 352152SN/A 362139SN/Asources = Split(''' 372139SN/A base_kernel_stats.cc 382139SN/A system_events.cc 392139SN/A linux/events.cc 402139SN/A linux/linux_syscalls.cc 412152SN/A linux/printk.cc 422152SN/A ''') 432139SN/A 442139SN/A# Convert file names to SCons File objects. This takes care of the 452139SN/A# path relative to the top of the directory tree. 464781Snate@binkert.orgsources = [File(s) for s in sources] 474781Snate@binkert.org 487799Sgblack@eecs.umich.edu################################################################# 494781Snate@binkert.org# 504781Snate@binkert.org# ISA "switch header" generation. 513170Sstever@eecs.umich.edu# 525664Sgblack@eecs.umich.edu# Auto-generate arch headers that include the right ISA-specific 538105Sgblack@eecs.umich.edu# header based on the setting of THE_ISA preprocessor variable. 546179Sksewell@umich.edu# 554781Snate@binkert.org################################################################# 564781Snate@binkert.org 576329Sgblack@eecs.umich.edu# List of headers to generate 584781Snate@binkert.orgkern_switch_hdrs = Split(''' 594781Snate@binkert.org kernel_stats.hh 604781Snate@binkert.org ''') 614781Snate@binkert.org 624781Snate@binkert.orgenv.make_switching_dir('kern', kern_switch_hdrs, env) 634781Snate@binkert.org 642139SN/Aisa = env['TARGET_ISA'] # someday this may be a list of ISAs 652139SN/A 663546Sgblack@eecs.umich.edu# Let the target architecture define what additional sources it needs 674202Sbinkertn@umich.edusources += SConscript(os.path.join(isa, 'SConscript'), exports = 'env') 682152SN/A 692152SN/AReturn('sources') 702152SN/A