SConscript revision 4781
111308Santhony.gutierrez@amd.com# -*- mode:python -*-
211308Santhony.gutierrez@amd.com
311308Santhony.gutierrez@amd.com# Copyright (c) 2005-2006 The Regents of The University of Michigan
411308Santhony.gutierrez@amd.com# All rights reserved.
511308Santhony.gutierrez@amd.com#
611308Santhony.gutierrez@amd.com# Redistribution and use in source and binary forms, with or without
711308Santhony.gutierrez@amd.com# modification, are permitted provided that the following conditions are
811308Santhony.gutierrez@amd.com# met: redistributions of source code must retain the above copyright
911308Santhony.gutierrez@amd.com# notice, this list of conditions and the following disclaimer;
1011308Santhony.gutierrez@amd.com# redistributions in binary form must reproduce the above copyright
1111308Santhony.gutierrez@amd.com# notice, this list of conditions and the following disclaimer in the
1211308Santhony.gutierrez@amd.com# documentation and/or other materials provided with the distribution;
1311308Santhony.gutierrez@amd.com# neither the name of the copyright holders nor the names of its
1411308Santhony.gutierrez@amd.com# contributors may be used to endorse or promote products derived from
1511308Santhony.gutierrez@amd.com# this software without specific prior written permission.
1611308Santhony.gutierrez@amd.com#
1712697Santhony.gutierrez@amd.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1812697Santhony.gutierrez@amd.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1912697Santhony.gutierrez@amd.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2011308Santhony.gutierrez@amd.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2111308Santhony.gutierrez@amd.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2211308Santhony.gutierrez@amd.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2311308Santhony.gutierrez@amd.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2411308Santhony.gutierrez@amd.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2511308Santhony.gutierrez@amd.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2611308Santhony.gutierrez@amd.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2711308Santhony.gutierrez@amd.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2811308Santhony.gutierrez@amd.com#
2911308Santhony.gutierrez@amd.com# Authors: Gabe Black
3011308Santhony.gutierrez@amd.com
3111308Santhony.gutierrez@amd.com# Copyright (c) 2007 The Hewlett-Packard Development Company
3211308Santhony.gutierrez@amd.com# All rights reserved.
3312697Santhony.gutierrez@amd.com#
3411308Santhony.gutierrez@amd.com# Redistribution and use of this software in source and binary forms,
3511308Santhony.gutierrez@amd.com# with or without modification, are permitted provided that the
3611308Santhony.gutierrez@amd.com# following conditions are met:
3711308Santhony.gutierrez@amd.com#
3811308Santhony.gutierrez@amd.com# The software must be used only for Non-Commercial Use which means any
3911308Santhony.gutierrez@amd.com# use which is NOT directed to receiving any direct monetary
4011308Santhony.gutierrez@amd.com# compensation for, or commercial advantage from such use.  Illustrative
4111308Santhony.gutierrez@amd.com# examples of non-commercial use are academic research, personal study,
4211308Santhony.gutierrez@amd.com# teaching, education and corporate research & development.
4311308Santhony.gutierrez@amd.com# Illustrative examples of commercial use are distributing products for
4411308Santhony.gutierrez@amd.com# commercial advantage and providing services using the software for
4511308Santhony.gutierrez@amd.com# commercial advantage.
4611308Santhony.gutierrez@amd.com#
4711308Santhony.gutierrez@amd.com# If you wish to use this software or functionality therein that may be
4811308Santhony.gutierrez@amd.com# covered by patents for commercial use, please contact:
4912334Sgabeblack@google.com#     Director of Intellectual Property Licensing
5011308Santhony.gutierrez@amd.com#     Office of Strategy and Technology
5111308Santhony.gutierrez@amd.com#     Hewlett-Packard Company
5211308Santhony.gutierrez@amd.com#     1501 Page Mill Road
5311308Santhony.gutierrez@amd.com#     Palo Alto, California  94304
5411308Santhony.gutierrez@amd.com#
5513892Sgabeblack@google.com# Redistributions of source code must retain the above copyright notice,
5611308Santhony.gutierrez@amd.com# this list of conditions and the following disclaimer.  Redistributions
5711308Santhony.gutierrez@amd.com# in binary form must reproduce the above copyright notice, this list of
5811308Santhony.gutierrez@amd.com# conditions and the following disclaimer in the documentation and/or
5911308Santhony.gutierrez@amd.com# other materials provided with the distribution.  Neither the name of
6011308Santhony.gutierrez@amd.com# the COPYRIGHT HOLDER(s), HEWLETT-PACKARD COMPANY, nor the names of its
6111308Santhony.gutierrez@amd.com# contributors may be used to endorse or promote products derived from
6213892Sgabeblack@google.com# this software without specific prior written permission.  No right of
6311308Santhony.gutierrez@amd.com# sublicense is granted herewith.  Derivatives of the software and
6411308Santhony.gutierrez@amd.com# output created using the software may be prepared, but only for
6511308Santhony.gutierrez@amd.com# Non-Commercial Uses.  Derivatives of the software may be shared with
6611308Santhony.gutierrez@amd.com# others provided: (i) the others agree to abide by the list of
6711308Santhony.gutierrez@amd.com# conditions herein which includes the Non-Commercial Use restrictions;
6813892Sgabeblack@google.com# and (ii) such Derivatives of the software include the above copyright
6911308Santhony.gutierrez@amd.com# notice to acknowledge the contribution from this software where
7011308Santhony.gutierrez@amd.com# applicable, this list of conditions and the disclaimer below.
7111308Santhony.gutierrez@amd.com#
7211308Santhony.gutierrez@amd.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7311308Santhony.gutierrez@amd.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7411308Santhony.gutierrez@amd.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
7511308Santhony.gutierrez@amd.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7611308Santhony.gutierrez@amd.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
7711308Santhony.gutierrez@amd.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
7811308Santhony.gutierrez@amd.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
7911308Santhony.gutierrez@amd.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
8011308Santhony.gutierrez@amd.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
8111308Santhony.gutierrez@amd.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
8211308Santhony.gutierrez@amd.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
8311308Santhony.gutierrez@amd.com#
8411308Santhony.gutierrez@amd.com# Authors: Gabe Black
8511308Santhony.gutierrez@amd.com
8611308Santhony.gutierrez@amd.comImport('*')
8711308Santhony.gutierrez@amd.comif env['TARGET_ISA'] == 'x86':
8811308Santhony.gutierrez@amd.com    Source('emulenv.cc')
8911308Santhony.gutierrez@amd.com    Source('floatregfile.cc')
9011308Santhony.gutierrez@amd.com    Source('insts/microldstop.cc')
9111308Santhony.gutierrez@amd.com    Source('insts/microregop.cc')
9211308Santhony.gutierrez@amd.com    Source('insts/static_inst.cc')
9311308Santhony.gutierrez@amd.com    Source('intregfile.cc')
9411308Santhony.gutierrez@amd.com    Source('miscregfile.cc')
9511308Santhony.gutierrez@amd.com    Source('predecoder.cc')
9611308Santhony.gutierrez@amd.com    Source('predecoder_tables.cc')
9711308Santhony.gutierrez@amd.com    Source('regfile.cc')
9811308Santhony.gutierrez@amd.com    Source('remote_gdb.cc')
9911308Santhony.gutierrez@amd.com
10011308Santhony.gutierrez@amd.com    if env['FULL_SYSTEM']:
10111308Santhony.gutierrez@amd.com        # Full-system sources
10211308Santhony.gutierrez@amd.com        pass
10311308Santhony.gutierrez@amd.com    else:
10411308Santhony.gutierrez@amd.com        Source('process.cc')
10511308Santhony.gutierrez@amd.com
10611308Santhony.gutierrez@amd.com        Source('linux/linux.cc')
10711308Santhony.gutierrez@amd.com        Source('linux/process.cc')
10811308Santhony.gutierrez@amd.com        Source('linux/syscalls.cc')
10911308Santhony.gutierrez@amd.com
11011308Santhony.gutierrez@amd.com    # Add in files generated by the ISA description.
11111308Santhony.gutierrez@amd.com    isa_desc_files = env.ISADesc('isa/main.isa')
11211308Santhony.gutierrez@amd.com    # Only non-header files need to be compiled.
11311308Santhony.gutierrez@amd.com    for f in isa_desc_files:
11411308Santhony.gutierrez@amd.com        if not f.path.endswith('.hh'):
11511308Santhony.gutierrez@amd.com            Source(f)
11611308Santhony.gutierrez@amd.com