SConscript revision 4601
1# -*- mode:python -*-
2
3# Copyright (c) 2005-2006 The Regents of The University of Michigan
4# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are
8# met: redistributions of source code must retain the above copyright
9# notice, this list of conditions and the following disclaimer;
10# redistributions in binary form must reproduce the above copyright
11# notice, this list of conditions and the following disclaimer in the
12# documentation and/or other materials provided with the distribution;
13# neither the name of the copyright holders nor the names of its
14# contributors may be used to endorse or promote products derived from
15# this software without specific prior written permission.
16#
17# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28#
29# Authors: Gabe Black
30
31# Copyright (c) 2007 The Hewlett-Packard Development Company
32# All rights reserved.
33#
34# Redistribution and use of this software in source and binary forms,
35# with or without modification, are permitted provided that the
36# following conditions are met:
37#
38# The software must be used only for Non-Commercial Use which means any
39# use which is NOT directed to receiving any direct monetary
40# compensation for, or commercial advantage from such use.  Illustrative
41# examples of non-commercial use are academic research, personal study,
42# teaching, education and corporate research & development.
43# Illustrative examples of commercial use are distributing products for
44# commercial advantage and providing services using the software for
45# commercial advantage.
46#
47# If you wish to use this software or functionality therein that may be
48# covered by patents for commercial use, please contact:
49#     Director of Intellectual Property Licensing
50#     Office of Strategy and Technology
51#     Hewlett-Packard Company
52#     1501 Page Mill Road
53#     Palo Alto, California  94304
54#
55# Redistributions of source code must retain the above copyright notice,
56# this list of conditions and the following disclaimer.  Redistributions
57# in binary form must reproduce the above copyright notice, this list of
58# conditions and the following disclaimer in the documentation and/or
59# other materials provided with the distribution.  Neither the name of
60# the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
61# contributors may be used to endorse or promote products derived from
62# this software without specific prior written permission.  No right of
63# sublicense is granted herewith.  Derivatives of the software and
64# output created using the software may be prepared, but only for
65# Non-Commercial Uses.  Derivatives of the software may be shared with
66# others provided: (i) the others agree to abide by the list of
67# conditions herein which includes the Non-Commercial Use restrictions;
68# and (ii) such Derivatives of the software include the above copyright
69# notice to acknowledge the contribution from this software where
70# applicable, this list of conditions and the disclaimer below.
71#
72# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
73# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
74# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
75# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
76# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
77# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
78# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
79# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
80# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
81# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
82# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
83#
84# Authors: Gabe Black
85
86Import('*')
87if env['TARGET_ISA'] == 'x86':
88    Source('emulenv.cc')
89    Source('floatregfile.cc')
90    Source('intregfile.cc')
91    Source('miscregfile.cc')
92    Source('predecoder.cc')
93    Source('predecoder_tables.cc')
94    Source('regfile.cc')
95    Source('remote_gdb.cc')
96
97    if env['FULL_SYSTEM']:
98        # Full-system sources
99        pass
100    else:
101        Source('process.cc')
102
103        Source('linux/linux.cc')
104        Source('linux/process.cc')
105        Source('linux/syscalls.cc')
106
107    # Add in files generated by the ISA description.
108    isa_desc_files = env.ISADesc('isa/main.isa')
109    # Only non-header files need to be compiled.
110    for f in isa_desc_files:
111        if not f.path.endswith('.hh'):
112            Source(f)
113