/[ascend]/trunk/pygtk/interface/SConscript
ViewVC logotype

Diff of /trunk/pygtk/interface/SConscript

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 501 by johnpye, Tue Apr 18 11:55:12 2006 UTC revision 502 by johnpye, Tue Apr 18 12:57:30 2006 UTC
# Line 16  srcs = Split(""" Line 16  srcs = Split("""
16    
17  # Build a static library with all the sources  # Build a static library with all the sources
18    
19    cxxflags = []
20    cppflags = []
21    
22    import platform
23    
24    if platform.system()=='Windows' and env.has_key('MSVS'):
25        cxxflags += ['/EHsc'] # for exceptions (as suggested by a MSVC error msg, dunno if it's right or not -- JP)
26    
27    if env.has_key('HAVE_GCC'):
28        cppflags += ['-O3']
29    
30    
31  objs = []  objs = []
32  for s in srcs:  for s in srcs:
33      objs += env.SharedObject(s      objs += env.SharedObject(s
34          , CPPPATH = ['../../base/generic']+env['PYTHON_CPPPATH']          , CPPPATH = ['../../base/generic']+env['PYTHON_CPPPATH']
35    
36          , CPPFLAGS = ['-O3']          , CPPFLAGS = cppflags
37            , CCFLAGS = cxxflags
38      )        )  
39    
40  #----------------------------------------------  #----------------------------------------------
# Line 47  def get_new_swig_flags(env): Line 60  def get_new_swig_flags(env):
60          flags += ['-O']          flags += ['-O']
61      return flags      return flags
62    
       
63  swiglib = env.SharedLibrary("ascpy",objs + ['ascpy.i']  swiglib = env.SharedLibrary("ascpy",objs + ['ascpy.i']
64      , LIBS = ['ascend'] + env['PYTHON_LIB']      , LIBS = ['ascend'] + env['PYTHON_LIB']
65      , LIBPATH = ['#'] + env['PYTHON_LIBPATH']      , LIBPATH = ['#'] + env['PYTHON_LIBPATH']
66      , SWIGFLAGS=['-python','-c++'] + get_new_swig_flags(env)      , SWIGFLAGS=['-python','-c++'] + get_new_swig_flags(env)
67      , CPPPATH = ['../../base/generic'] + env['PYTHON_CPPPATH']      , CPPPATH = ['../../base/generic'] + env['PYTHON_CPPPATH']
68      , CPPFLAGS = ['-O3']      , CPPFLAGS = cppflags
69        , CCFLAGS = cxxflags
70      , SHLIBPREFIX = '_'      , SHLIBPREFIX = '_'
71  )  )
72    
# Line 85  if env.has_key('CAN_INSTALL') and env['C Line 98  if env.has_key('CAN_INSTALL') and env['C
98  if env.has_key('WITH_INSTALLER') and env['WITH_INSTALLER']:  if env.has_key('WITH_INSTALLER') and env['WITH_INSTALLER']:
99      import platform      import platform
100      if platform.system()=="Windows":      if platform.system()=="Windows":
101          env.Nsis('create.nsi')          installer = env.Nsis('create.nsi')
102            Depends(installer,swiglib)

Legend:
Removed from v.501  
changed lines
  Added in v.502

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22