SConstruct (2654:9559cfa91b9d) | SConstruct (2655:da93a2088efa) |
---|---|
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 --- 155 unchanged lines hidden (view full) --- 164env.Append(CCFLAGS='-pipe') 165env.Append(CCFLAGS='-fno-strict-aliasing') 166env.Append(CCFLAGS=Split('-Wall -Wno-sign-compare -Werror -Wundef')) 167if sys.platform == 'cygwin': 168 # cygwin has some header file issues... 169 env.Append(CCFLAGS=Split("-Wno-uninitialized")) 170env.Append(CPPPATH=[Dir('ext/dnet')]) 171 | 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 --- 155 unchanged lines hidden (view full) --- 164env.Append(CCFLAGS='-pipe') 165env.Append(CCFLAGS='-fno-strict-aliasing') 166env.Append(CCFLAGS=Split('-Wall -Wno-sign-compare -Werror -Wundef')) 167if sys.platform == 'cygwin': 168 # cygwin has some header file issues... 169 env.Append(CCFLAGS=Split("-Wno-uninitialized")) 170env.Append(CPPPATH=[Dir('ext/dnet')]) 171 |
172# Default libraries | 172# Environment args for linking in Python interpreter. 173# Should really have an option for setting the version instead of 174# having 2.4 hardwired in here... 175env.Append(CPPPATH='/usr/include/python2.4') 176env.Append(LIBS='python2.4') 177 178# Other default libraries |
173env.Append(LIBS=['z']) 174 175# Platform-specific configuration. Note again that we assume that all 176# builds under a given build root run on the same host platform. 177conf = Configure(env, 178 conf_dir = os.path.join(build_root, '.scons_config'), 179 log_file = os.path.join(build_root, 'scons_config.log')) 180 --- 31 unchanged lines hidden (view full) --- 212 213env = conf.Finish() 214 215# Define the universe of supported ISAs 216env['ALL_ISA_LIST'] = ['alpha', 'sparc', 'mips'] 217 218# Define the universe of supported CPU models 219env['ALL_CPU_LIST'] = ['AtomicSimpleCPU', 'TimingSimpleCPU', | 179env.Append(LIBS=['z']) 180 181# Platform-specific configuration. Note again that we assume that all 182# builds under a given build root run on the same host platform. 183conf = Configure(env, 184 conf_dir = os.path.join(build_root, '.scons_config'), 185 log_file = os.path.join(build_root, 'scons_config.log')) 186 --- 31 unchanged lines hidden (view full) --- 218 219env = conf.Finish() 220 221# Define the universe of supported ISAs 222env['ALL_ISA_LIST'] = ['alpha', 'sparc', 'mips'] 223 224# Define the universe of supported CPU models 225env['ALL_CPU_LIST'] = ['AtomicSimpleCPU', 'TimingSimpleCPU', |
220 'FullCPU', 'AlphaFullCPU', 221 'OzoneSimpleCPU', 'OzoneCPU', 'CheckerCPU'] | 226 'FullCPU', 'AlphaFullCPU'] |
222 223# Sticky options get saved in the options file so they persist from 224# one invocation to the next (unless overridden, in which case the new 225# value becomes sticky). 226sticky_opts = Options(args=ARGUMENTS) 227sticky_opts.AddOptions( 228 EnumOption('TARGET_ISA', 'Target ISA', 'alpha', env['ALL_ISA_LIST']), 229 BoolOption('FULL_SYSTEM', 'Full-system support', False), --- 76 unchanged lines hidden (view full) --- 306 val = int(eval(str(env[option]))) 307 # Sources are option name & value (packaged in SCons Value nodes) 308 return ([target], [Value(option), Value(val)]) 309 310config_builder = Builder(emitter = config_emitter, action = config_action) 311 312env.Append(BUILDERS = { 'ConfigFile' : config_builder }) 313 | 227 228# Sticky options get saved in the options file so they persist from 229# one invocation to the next (unless overridden, in which case the new 230# value becomes sticky). 231sticky_opts = Options(args=ARGUMENTS) 232sticky_opts.AddOptions( 233 EnumOption('TARGET_ISA', 'Target ISA', 'alpha', env['ALL_ISA_LIST']), 234 BoolOption('FULL_SYSTEM', 'Full-system support', False), --- 76 unchanged lines hidden (view full) --- 311 val = int(eval(str(env[option]))) 312 # Sources are option name & value (packaged in SCons Value nodes) 313 return ([target], [Value(option), Value(val)]) 314 315config_builder = Builder(emitter = config_emitter, action = config_action) 316 317env.Append(BUILDERS = { 'ConfigFile' : config_builder }) 318 |
319################################################### 320# 321# Define a SCons builder for copying files. This is used by the 322# Python zipfile code in src/python/SConscript, but is placed up here 323# since it's potentially more generally applicable. 324# 325################################################### 326 327copy_builder = Builder(action = Copy("$TARGET", "$SOURCE")) 328 329env.Append(BUILDERS = { 'CopyFile' : copy_builder }) 330 331################################################### 332# 333# Define a simple SCons builder to concatenate files. 334# 335# Used to append the Python zip archive to the executable. 336# 337################################################### 338 339concat_builder = Builder(action = Action(['cat $SOURCES > $TARGET', 340 'chmod +x $TARGET'])) 341 342env.Append(BUILDERS = { 'Concat' : concat_builder }) 343 344 |
|
314# base help text 315help_text = ''' 316Usage: scons [scons options] [build options] [target(s)] 317 318''' 319 320# libelf build is shared across all configs in the build root. 321env.SConscript('ext/libelf/SConscript', --- 117 unchanged lines hidden --- | 345# base help text 346help_text = ''' 347Usage: scons [scons options] [build options] [target(s)] 348 349''' 350 351# libelf build is shared across all configs in the build root. 352env.SConscript('ext/libelf/SConscript', --- 117 unchanged lines hidden --- |