Changeset 3327 for SConstruct
- Timestamp:
- Jul 13, 2006, 1:51:34 PM (18 years ago)
- File:
-
- 1 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')
Note: See TracChangeset
for help on using the changeset viewer.