SConscript revision 4661
15131Sgblack@eecs.umich.edu# -*- mode:python -*- 25131Sgblack@eecs.umich.edu 35131Sgblack@eecs.umich.edu# Copyright (c) 2006 The Regents of The University of Michigan 45131Sgblack@eecs.umich.edu# All rights reserved. 55131Sgblack@eecs.umich.edu# 65131Sgblack@eecs.umich.edu# Redistribution and use in source and binary forms, with or without 75131Sgblack@eecs.umich.edu# modification, are permitted provided that the following conditions are 85131Sgblack@eecs.umich.edu# met: redistributions of source code must retain the above copyright 95131Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer; 105131Sgblack@eecs.umich.edu# redistributions in binary form must reproduce the above copyright 115131Sgblack@eecs.umich.edu# notice, this list of conditions and the following disclaimer in the 125131Sgblack@eecs.umich.edu# documentation and/or other materials provided with the distribution; 135131Sgblack@eecs.umich.edu# neither the name of the copyright holders nor the names of its 145131Sgblack@eecs.umich.edu# contributors may be used to endorse or promote products derived from 155131Sgblack@eecs.umich.edu# this software without specific prior written permission. 165131Sgblack@eecs.umich.edu# 175131Sgblack@eecs.umich.edu# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 185131Sgblack@eecs.umich.edu# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 195131Sgblack@eecs.umich.edu# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 205131Sgblack@eecs.umich.edu# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 215131Sgblack@eecs.umich.edu# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 225131Sgblack@eecs.umich.edu# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 235131Sgblack@eecs.umich.edu# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 245131Sgblack@eecs.umich.edu# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 255131Sgblack@eecs.umich.edu# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 265131Sgblack@eecs.umich.edu# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 275131Sgblack@eecs.umich.edu# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 285131Sgblack@eecs.umich.edu# 295390Sgblack@eecs.umich.edu# Authors: Nathan Binkert 305131Sgblack@eecs.umich.edu 315131Sgblack@eecs.umich.eduImport('*') 325131Sgblack@eecs.umich.edu 335131Sgblack@eecs.umich.edudef make_cc(target, source, env): 345638Sgblack@eecs.umich.edu assert(len(source) == 1) 355629Sgblack@eecs.umich.edu assert(len(target) == 1) 365131Sgblack@eecs.umich.edu 375637Sgblack@eecs.umich.edu traceflags = {} 385637Sgblack@eecs.umich.edu execfile(str(source[0]), traceflags) 395637Sgblack@eecs.umich.edu func = traceflags['gen_cc'] 405629Sgblack@eecs.umich.edu func(str(target[0])) 415629Sgblack@eecs.umich.edu 425629Sgblack@eecs.umich.edudef make_hh(target, source, env): 435630Sgblack@eecs.umich.edu assert(len(source) == 1) 445630Sgblack@eecs.umich.edu assert(len(target) == 1) 455630Sgblack@eecs.umich.edu 465630Sgblack@eecs.umich.edu traceflags = {} 475633Sgblack@eecs.umich.edu execfile(str(source[0]), traceflags) 485636Sgblack@eecs.umich.edu func = traceflags['gen_hh'] 495636Sgblack@eecs.umich.edu func(str(target[0])) 505642Sgblack@eecs.umich.edu 515636Sgblack@eecs.umich.eduenv.Command('traceflags.hh', 'traceflags.py', make_hh) 525636Sgblack@eecs.umich.eduenv.Command('traceflags.cc', 'traceflags.py', make_cc) 535636Sgblack@eecs.umich.edu 545636Sgblack@eecs.umich.eduSource('annotate.cc') 555636Sgblack@eecs.umich.eduSource('bigint.cc') 565633Sgblack@eecs.umich.eduSource('circlebuf.cc') 575633Sgblack@eecs.umich.eduSource('cprintf.cc') 58Source('crc.cc') 59Source('fast_alloc.cc') 60if env['USE_FENV']: 61 Source('fenv.c') 62Source('fifo_buffer.cc') 63Source('hostinfo.cc') 64Source('hybrid_pred.cc') 65Source('inet.cc') 66Source('inifile.cc') 67Source('intmath.cc') 68Source('match.cc') 69Source('misc.cc') 70Source('output.cc') 71Source('pollevent.cc') 72Source('random.cc') 73Source('range.cc') 74Source('remote_gdb.cc') 75Source('sat_counter.cc') 76Source('socket.cc') 77Source('statistics.cc') 78Source('str.cc') 79Source('time.cc') 80Source('trace.cc') 81Source('traceflags.cc') 82Source('userinfo.cc') 83 84Source('compression/lzss_compression.cc') 85 86Source('loader/aout_object.cc') 87Source('loader/ecoff_object.cc') 88Source('loader/elf_object.cc') 89Source('loader/object_file.cc') 90Source('loader/raw_object.cc') 91Source('loader/symtab.cc') 92 93Source('stats/events.cc') 94Source('stats/output.cc') 95Source('stats/statdb.cc') 96Source('stats/text.cc') 97Source('stats/visit.cc') 98 99if env['USE_MYSQL']: 100 Source('mysql.cc') 101 Source('stats/mysql.cc') 102 103PySource('m5', 'traceflags.py') 104