1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 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: Nathan Binkert 30 31import os, subprocess 32
| 1# -*- mode:python -*- 2 3# Copyright (c) 2004-2005 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: Nathan Binkert 30 31import os, subprocess 32
|
93 if major >= 4: 94 m4env.Append(CCFLAGS=['-Wno-pointer-sign']) 95m4env.Append(CCFLAGS=['-Wno-implicit']) 96del m4env['CPPPATH'] 97 98# If we have gm4 use it 99if m4env.Detect('gm4'): 100 m4env['M4'] = 'gm4' 101 102# Check that m4 is available 103import SCons.Tool.m4 104if not SCons.Tool.m4.exists(m4env): 105 print "Error: Can't find version of M4 macro processor. " + \ 106 "Please install M4 and try again." 107 Exit(1) 108 109m4env.Append(M4FLAGS='-DSRCDIR=%s' % Dir('.').path) 110m4env['M4COM'] = '$M4 $M4FLAGS $SOURCES > $TARGET' 111m4env.M4(target=File('libelf_convert.c'), 112 source=[File('elf_types.m4'), File('libelf_convert.m4')]) 113m4env.M4(target=File('libelf_fsize.c'), 114 source=[File('elf_types.m4'), File('libelf_fsize.m4')]) 115m4env.M4(target=File('libelf_msize.c'), 116 source=[File('elf_types.m4'), File('libelf_msize.m4')]) 117 118# Build libelf as a static library with PIC code so it can be linked 119# into either m5 or the library 120m4env.Library('elf', [m4env.SharedObject(f) for f in elf_files]) 121
| 93 if major >= 4: 94 m4env.Append(CCFLAGS=['-Wno-pointer-sign']) 95m4env.Append(CCFLAGS=['-Wno-implicit']) 96del m4env['CPPPATH'] 97 98# If we have gm4 use it 99if m4env.Detect('gm4'): 100 m4env['M4'] = 'gm4' 101 102# Check that m4 is available 103import SCons.Tool.m4 104if not SCons.Tool.m4.exists(m4env): 105 print "Error: Can't find version of M4 macro processor. " + \ 106 "Please install M4 and try again." 107 Exit(1) 108 109m4env.Append(M4FLAGS='-DSRCDIR=%s' % Dir('.').path) 110m4env['M4COM'] = '$M4 $M4FLAGS $SOURCES > $TARGET' 111m4env.M4(target=File('libelf_convert.c'), 112 source=[File('elf_types.m4'), File('libelf_convert.m4')]) 113m4env.M4(target=File('libelf_fsize.c'), 114 source=[File('elf_types.m4'), File('libelf_fsize.m4')]) 115m4env.M4(target=File('libelf_msize.c'), 116 source=[File('elf_types.m4'), File('libelf_msize.m4')]) 117 118# Build libelf as a static library with PIC code so it can be linked 119# into either m5 or the library 120m4env.Library('elf', [m4env.SharedObject(f) for f in elf_files]) 121
|