Changeset 3327
- Timestamp:
- Jul 13, 2006, 1:51:34 PM (19 years ago)
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
SConstruct
r3283 r3327 4 4 # Read in build options 5 5 opts = Options('build_options.py') 6 opts.Add('CFLAGS', 'Flags passed to the C Compiler') 6 opts.Add('GCCFLAGS', 'Flags passed to GCC') 7 opts.Add('MSVCFLAGS', 'Flags passed to the MSVC compiler') 7 8 8 env = Environment(options = opts, CCFLAGS=['${CFLAGS}']) 9 env = Environment(options = opts) 10 11 if env['CC'] == 'gcc': 12 env.Append(CCFLAGS=['${GCCFLAGS}']) 13 elif env['CC'] == 'cl': 14 env.Append(CCFLAGS=['${MSVCFLAGS}']) 9 15 10 16 Help(opts.GenerateHelpText(env)) … … 14 20 if sys.platform == 'win32': 15 21 # Prefer MinGW over MSVC 16 env ['TOOLS'] = 'mingw'22 envPrepend(TOOLS=['mingw']) 17 23 18 24 python_include = os.path.join(sys.exec_prefix, 'include') … … 20 26 # else it won't work right. 21 27 python_libdir = os.path.join(sys.exec_prefix, 'libs') 22 try: 23 env['LIBPATH'] += [python_libdir] 24 except KeyError: 25 env['LIBPATH'] = [python_libdir] 26 python_libname = 'python%d%d' % (sys.version_info[0], sys.version_info[1]) 27 try: 28 env['LIBS'] += [python_libname] 29 except KeyError: 30 env['LIBS'] = [python_libname] 28 env.Append(LIBPATH=[python_libdir]) 29 python_libname = 'python%d%d' % (sys.version_info[0:2]) 30 env.Append(LIBS=[python_libname]) 31 31 else: 32 32 python_include = os.path.join(os.path.join(sys.exec_prefix, 'include'), … … 43 43 package called something like python2.3-dev""" %headerfile 44 44 45 try: 46 env['CPPPATH'] += [python_include] 47 except KeyError: 48 env['CPPPATH'] = [python_include] 45 env.Append(CPPPATH=[python_include]) 49 46 50 47 Export('env') -
build_options.py
r3282 r3327 1 1 # Build configuration for ANUGA 2 2 3 # Flags to pass to the C Compiler 4 CFLAGS = '-O3 -Wall' 3 # Flags to pass to GCC 4 GCCFLAGS = '-O3 -Wall' 5 6 # Flags to pass to MSVC Compiler 7 MSVCFLAGS = '/Wall' -
inundation/mesh_engine/SConscript
r3282 r3327 1 1 Import('env') 2 2 env2 = env.Copy() 3 4 try: 5 env2['CPPDEFINES'] += [('TRILIBRARY', 1), ('NO_TIMER', 1)] 6 except KeyError: 7 env2['CPPDEFINES'] = [('TRILIBRARY', 1), ('NO_TIMER', 1)] 3 env2.Append(CPPDEFINES=[('TRILIBRARY', 1), ('NO_TIMER', 1)]) 8 4 9 5 env2.SharedLibrary('triang', ['triangle.c', 'triang.c']) -
inundation/pyvolution/SConscript
r3282 r3327 1 1 Import('env') 2 2 env2 = env.Copy() 3 env2 ['CPPPATH'] += ['#inundation/utilities']3 env2.Append(CPPPATH=['#inundation/utilities']) 4 4 5 5 env2.SharedLibrary('quantity_ext', ['quantity_ext.c'])
Note: See TracChangeset
for help on using the changeset viewer.