/[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 393 by johnpye, Thu Mar 30 14:46:37 2006 UTC revision 395 by johnpye, Fri Mar 31 06:09:03 2006 UTC
# Line 18  libs = Split(""" Line 18  libs = Split("""
18      asccompiler ascpackages ascsolver ascutilities ascgeneral      asccompiler ascpackages ascsolver ascutilities ascgeneral
19  """)  """)
20    
 swig = CFile(target=['ascend_wrap.cc'],source=['ascend.i']  
     , SWIGFLAGS=['-python','-c++']  
 )  
 env.Depends('ascend.py',swig);  
21    
22  libpath = [  libpath = [
23      '../../base/generic/compiler'      '../../base/generic/compiler'
# Line 31  libpath = [ Line 27  libpath = [
27      ,'../../base/generic/general'      ,'../../base/generic/general'
28  ]  ]
29    
30  lib = env.SharedLibrary("ascend",srcs+swig  # Build a static library with all the sources
31      , LIBS = libs #+env['PYTHON_LIB']  
32      , LIBPATH = libpath+env['PYTHON_LIBPATH']  lib = env.Library("ascxx",srcs
33        , LIBS = libs
34        , LIBPATH = libpath
35        , CPPPATH = ['../../base/generic']+env['PYTHON_CPPPATH']
36        , CPPDEFINES = {
37            'ASCXX_USE_PYTHON':None
38            ,'DEFAULT_ASCENDLIBRARY':'\\"'+env['DEFAULT_ASCENDLIBRARY']+'\\"'
39          }
40        , CPPFLAGS = ['-O3']
41    )  
42    
43    #import platform
44    #if platform.system()=="Windows":
45    #   #
46    #   #
47    def swig_modify_targets(target, source, env):
48        target.append('ascend.py')
49        target.append('ascend_wrap.h')
50        return target, source
51    
52    swig_builder = Builder(
53        action='$SWIG $SWIGFLAGS -o $TARGET $SOURCE'
54        , emitter=swig_modify_targets
55    )
56    env.Append(BUILDERS={'Swig':swig_builder})
57    
58    swig = env.Swig(target=['ascend_wrap.cc'],source=['ascend.i']
59        , SWIGFLAGS=['-python','-c++']
60        , CPPFLAGS = ['-O3']
61    )
62    #else:  
63    #swig = env.CFile(target=['ascend_wrap.cc'],source=['ascend.i']
64    #       , SWIGFLAGS=['-python','-c++']
65    #       , ENV={'SWIGFEATURES':'-O'}
66    #       , CPPFLAGS = ['-O3']
67    #   )
68    
69    #env.Depends('ascend.py',swig);
70    
71    
72    swiglib = env.SharedLibrary("ascend",['ascend_wrap.cc']
73        , LIBS = ['ascxx']+libs+env['PYTHON_LIB']
74        , LIBPATH = ['.']+libpath+env['PYTHON_LIBPATH']
75      , CPPPATH = ['../../base/generic']+env['PYTHON_CPPPATH']      , CPPPATH = ['../../base/generic']+env['PYTHON_CPPPATH']
76      , CPPDEFINES = {      , CPPDEFINES = {
77          'ASCXX_USE_PYTHON':None          'ASCXX_USE_PYTHON':None
78          ,'DEFAULT_ASCENDLIBRARY':'\\"'+env['DEFAULT_ASCENDLIBRARY']+'\\"'          ,'DEFAULT_ASCENDLIBRARY':'\\"'+env['DEFAULT_ASCENDLIBRARY']+'\\"'
79        }        }
80        , CPPFLAGS = ['-O3']
81      , SHLIBPREFIX = '_'      , SHLIBPREFIX = '_'
82  )  )
83    
84  env.Depends(lib,'ascend.py')  env.Depends(swiglib,'ascend.py')
85    
86  print env['SUBST_DICT']  print env['SUBST_DICT']
87    

Legend:
Removed from v.393  
changed lines
  Added in v.395

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