Changeset 3282 for SConstruct


Ignore:
Timestamp:
Jul 6, 2006, 12:31:47 PM (18 years ago)
Author:
jack
Message:

SCons script files now support all the files that compile_all.py does.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • SConstruct

    r3259 r3282  
    22import sys
    33
    4 env = Environment()
     4# Read in build options
     5opts = Options('build_options.py')
     6opts.Add('CFLAGS', 'Flags passed to the C Compiler')
     7
     8env = Environment(options = opts, CCFLAGS=['${CFLAGS}'])
     9
     10Help(opts.GenerateHelpText(env))
    511
    612# Find the path for Python.h and then share it to other SConscripts later on
    713# Where to find the Python.h
    8 if sys.platform == 'win32':  #Windows
     14if sys.platform == 'win32':
     15    # Prefer MinGW over MSVC
     16    env.Tools('mingw')
     17
    918    python_include = os.path.join(sys.exec_prefix, 'include')
    1019    # Windows installs need to be told the lib path and the python library name
     
    1221    python_libdir = os.path.join(sys.exec_prefix, 'libs')
    1322    try:
    14         env['LIBPATH'] = env['LIBPATH'] + [python_libdir]
     23        env['LIBPATH'] += [python_libdir]
    1524    except KeyError:
    1625        env['LIBPATH'] = [python_libdir]
    1726    python_libname = 'python%d%d' % (sys.version_info[0], sys.version_info[1])
    1827    try:
    19         env['LIBS'] = env['LIBS'] + [python_libname]
     28        env['LIBS'] += [python_libname]
    2029    except KeyError:
    2130        env['LIBS'] = [python_libname]
     
    3544
    3645try:
    37     env['CPPPATH'] = env['CPPPATH'] + [python_include]
     46    env['CPPPATH'] += [python_include]
    3847except KeyError:
    3948    env['CPPPATH'] = [python_include]
     
    4150Export('env')
    4251
    43 # Build the inundation modules
    4452SConscript(['inundation/SConscript'])
Note: See TracChangeset for help on using the changeset viewer.