SConscript (4487:a174ee67da68) SConscript (4494:b7c909b5a5e9)
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

--- 14 unchanged lines hidden (view full) ---

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
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

--- 14 unchanged lines hidden (view full) ---

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
31import os, subprocess
32
33Import('env')
34
35elf_files = []
36def ElfFile(filename):
37 elf_files.append(File(filename))
38
39ElfFile('elf_begin.c')

--- 43 unchanged lines hidden (view full) ---

83ElfFile('libelf_shdr.c')
84ElfFile('libelf_xlate.c')
85
86ElfFile('libelf_convert.c')
87ElfFile('libelf_fsize.c')
88ElfFile('libelf_msize.c')
89
90m4env = Environment(ENV=os.environ)
32
33Import('env')
34
35elf_files = []
36def ElfFile(filename):
37 elf_files.append(File(filename))
38
39ElfFile('elf_begin.c')

--- 43 unchanged lines hidden (view full) ---

83ElfFile('libelf_shdr.c')
84ElfFile('libelf_xlate.c')
85
86ElfFile('libelf_convert.c')
87ElfFile('libelf_fsize.c')
88ElfFile('libelf_msize.c')
89
90m4env = Environment(ENV=os.environ)
91if env.get('CC'):
92 m4env['CC'] = env['CC']
93if env.get('CXX'):
94 m4env['CXX'] = env['CXX']
95# If we have gm4 use it
96if subprocess.Popen("gm4 --version", shell=True, stdout=subprocess.PIPE,
97 stderr=subprocess.STDOUT, close_fds=True).communicate()[0].find('GNU') >= 0:
98 m4env['M4'] = 'gm4'
99
91m4env.Append(M4FLAGS='-DSRCDIR=%s' % Dir('.').path)
92m4env['M4COM'] = '$M4 $M4FLAGS $SOURCES > $TARGET'
93m4env.M4(target=File('libelf_convert.c'),
94 source=[File('elf_types.m4'), File('libelf_convert.m4')])
95m4env.M4(target=File('libelf_fsize.c'),
96 source=[File('elf_types.m4'), File('libelf_fsize.m4')])
97m4env.M4(target=File('libelf_msize.c'),
98 source=[File('elf_types.m4'), File('libelf_msize.m4')])
99m4env.Library('elf', elf_files)
100
101env.Append(CPPPATH=Dir('.'))
102env.Append(LIBS=['elf'])
103env.Append(LIBPATH=[Dir('.')])
100m4env.Append(M4FLAGS='-DSRCDIR=%s' % Dir('.').path)
101m4env['M4COM'] = '$M4 $M4FLAGS $SOURCES > $TARGET'
102m4env.M4(target=File('libelf_convert.c'),
103 source=[File('elf_types.m4'), File('libelf_convert.m4')])
104m4env.M4(target=File('libelf_fsize.c'),
105 source=[File('elf_types.m4'), File('libelf_fsize.m4')])
106m4env.M4(target=File('libelf_msize.c'),
107 source=[File('elf_types.m4'), File('libelf_msize.m4')])
108m4env.Library('elf', elf_files)
109
110env.Append(CPPPATH=Dir('.'))
111env.Append(LIBS=['elf'])
112env.Append(LIBPATH=[Dir('.')])
113