SConscript revision 4295
111507SCurtis.Dunham@arm.com# -*- mode:python -*- 211507SCurtis.Dunham@arm.com 311960Sgabeblack@google.com# Copyright (c) 2006 The Regents of The University of Michigan 411960Sgabeblack@google.com# All rights reserved. 511960Sgabeblack@google.com# 611960Sgabeblack@google.com# Redistribution and use in source and binary forms, with or without 711960Sgabeblack@google.com# modification, are permitted provided that the following conditions are 811960Sgabeblack@google.com# met: redistributions of source code must retain the above copyright 911960Sgabeblack@google.com# notice, this list of conditions and the following disclaimer; 1011960Sgabeblack@google.com# redistributions in binary form must reproduce the above copyright 1111960Sgabeblack@google.com# notice, this list of conditions and the following disclaimer in the 1211960Sgabeblack@google.com# documentation and/or other materials provided with the distribution; 1311960Sgabeblack@google.com# neither the name of the copyright holders nor the names of its 1411960Sgabeblack@google.com# contributors may be used to endorse or promote products derived from 1511960Sgabeblack@google.com# this software without specific prior written permission. 1611960Sgabeblack@google.com# 1711960Sgabeblack@google.com# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 1811960Sgabeblack@google.com# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 1911960Sgabeblack@google.com# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 2011960Sgabeblack@google.com# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 2111960Sgabeblack@google.com# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 2211960Sgabeblack@google.com# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 2311960Sgabeblack@google.com# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 2411960Sgabeblack@google.com# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 2511960Sgabeblack@google.com# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 2611960Sgabeblack@google.com# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 2711960Sgabeblack@google.com# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 2811960Sgabeblack@google.com# 2911960Sgabeblack@google.com# Authors: Nathan Binkert 3011960Sgabeblack@google.com 3111960Sgabeblack@google.comImport('*') 3211960Sgabeblack@google.com 3311960Sgabeblack@google.comdef make_cc(target, source, env): 3411960Sgabeblack@google.com assert(len(source) == 1) 3511960Sgabeblack@google.com assert(len(target) == 1) 3611960Sgabeblack@google.com 3711960Sgabeblack@google.com traceflags = {} 3811960Sgabeblack@google.com execfile(str(source[0]), traceflags) 3911960Sgabeblack@google.com func = traceflags['gen_cc'] 4011960Sgabeblack@google.com func(str(target[0])) 4111960Sgabeblack@google.com 4211960Sgabeblack@google.comdef make_hh(target, source, env): 4311960Sgabeblack@google.com assert(len(source) == 1) 4411960Sgabeblack@google.com assert(len(target) == 1) 4511960Sgabeblack@google.com 4611960Sgabeblack@google.com traceflags = {} 4711960Sgabeblack@google.com execfile(str(source[0]), traceflags) 4811960Sgabeblack@google.com func = traceflags['gen_hh'] 4911960Sgabeblack@google.com func(str(target[0])) 5011960Sgabeblack@google.com 5111960Sgabeblack@google.comenv.Command('traceflags.hh', 'traceflags.py', make_hh) 5211960Sgabeblack@google.comenv.Command('traceflags.cc', 'traceflags.py', make_cc) 5311960Sgabeblack@google.com 5411960Sgabeblack@google.comSource('annotate.cc') 5511960Sgabeblack@google.comSource('bigint.cc') 5611960Sgabeblack@google.comSource('circlebuf.cc') 5711960Sgabeblack@google.comSource('cprintf.cc') 5811960Sgabeblack@google.comSource('crc.cc') 5911960Sgabeblack@google.comSource('fast_alloc.cc') 6011960Sgabeblack@google.comSource('fifo_buffer.cc') 6111960Sgabeblack@google.comSource('hostinfo.cc') 6211960Sgabeblack@google.comSource('hybrid_pred.cc') 6311960Sgabeblack@google.comSource('inet.cc') 6411960Sgabeblack@google.comSource('inifile.cc') 6511960Sgabeblack@google.comSource('intmath.cc') 6611960Sgabeblack@google.comSource('match.cc') 6711960Sgabeblack@google.comSource('misc.cc') 6811960Sgabeblack@google.comSource('output.cc') 6911960Sgabeblack@google.comSource('pollevent.cc') 7011960Sgabeblack@google.comSource('random.cc') 7111960Sgabeblack@google.comSource('range.cc') 7211960Sgabeblack@google.comSource('remote_gdb.cc') 7311960Sgabeblack@google.comSource('sat_counter.cc') 7411960Sgabeblack@google.comSource('socket.cc') 7511960Sgabeblack@google.comSource('statistics.cc') 7611960Sgabeblack@google.comSource('str.cc') 7711960Sgabeblack@google.comSource('time.cc') 7811960Sgabeblack@google.comSource('trace.cc') 7911960Sgabeblack@google.comSource('traceflags.cc') 8011960Sgabeblack@google.comSource('userinfo.cc') 8111960Sgabeblack@google.com 8211960Sgabeblack@google.comSource('compression/lzss_compression.cc') 8311960Sgabeblack@google.com 8411960Sgabeblack@google.comSource('loader/aout_object.cc') 8511960Sgabeblack@google.comSource('loader/ecoff_object.cc') 8611960Sgabeblack@google.comSource('loader/elf_object.cc') 8711960Sgabeblack@google.comSource('loader/object_file.cc') 8811960Sgabeblack@google.comSource('loader/raw_object.cc') 8911960Sgabeblack@google.comSource('loader/symtab.cc') 9011960Sgabeblack@google.com 9111960Sgabeblack@google.comSource('stats/events.cc') 9211960Sgabeblack@google.comSource('stats/output.cc') 9311960Sgabeblack@google.comSource('stats/statdb.cc') 9411960Sgabeblack@google.comSource('stats/text.cc') 9511960Sgabeblack@google.comSource('stats/visit.cc') 9611960Sgabeblack@google.com 9711960Sgabeblack@google.comif env['USE_MYSQL']: 9811960Sgabeblack@google.com Source('mysql.cc') 9911960Sgabeblack@google.com Source('stats/mysql.cc') 10011960Sgabeblack@google.com