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

Contents of /trunk/pygtk/interface/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 500 - (show annotations) (download)
Tue Apr 18 11:55:12 2006 UTC (15 years, 7 months ago) by johnpye
File size: 2259 byte(s)
Reduced some runtime debug messages from Python and C++ and base/generic/compiler/type_descio.c.
Fixed up support for GCC Visibility and add SCons 'sniffer' for this.
Fixed a bug with 'fileopenpath' in PyGTK interface (File->Open location is remembered from last time).
Fixed a bug with missing includes in C++.
1 Import('env')
2
3 srcs = Split("""
4
5 library.cpp type.cpp module.cpp symchar.cpp
6 instance.cpp instanceinterfacedata.cpp
7 method.cpp name.cpp
8 reporter.cpp simulation.cpp set.cpp units.cpp dimensions.cpp extmethod.cpp
9 variable.cpp relation.cpp
10 solver.cpp curve.cpp plot.cpp
11 solverparameters.cpp solverparameter.cpp solverparameteriterator.cpp
12 solverstatus.cpp solverreporter.cpp
13 incidencematrix.cpp
14
15 """)
16
17 # Build a static library with all the sources
18
19 objs = []
20 for s in srcs:
21 objs += env.SharedObject(s
22 , CPPPATH = ['../../base/generic']+env['PYTHON_CPPPATH']
23
24 , CPPFLAGS = ['-O3']
25 )
26
27 #----------------------------------------------
28 # SWIG Builder
29
30 def swig_modify_targets(target, source, env):
31 target.append('ascpy.py')
32 target.append('ascpy_wrap.h')
33 return target, source
34
35 swig_builder = Builder(
36 action='$SWIG $SWIGFLAGS -o $TARGET $SOURCE'
37 , emitter=swig_modify_targets
38 )
39 env.Append(BUILDERS={'Swig':swig_builder})
40
41 #---------------------------------------------
42
43 def get_new_swig_flags(env):
44 min,maj,pat = env['SWIGVERSION']
45 flags = []
46 if min==1 and maj==3 and pat>=28:
47 flags += ['-O']
48 return flags
49
50
51 swiglib = env.SharedLibrary("ascpy",objs + ['ascpy.i']
52 , LIBS = ['ascend'] + env['PYTHON_LIB']
53 , LIBPATH = ['#'] + env['PYTHON_LIBPATH']
54 , SWIGFLAGS=['-python','-c++'] + get_new_swig_flags(env)
55 , CPPPATH = ['../../base/generic'] + env['PYTHON_CPPPATH']
56 , CPPFLAGS = ['-O3']
57 , SHLIBPREFIX = '_'
58 )
59
60 #env.Depends(swiglib,'ascpy.py')
61
62 #print env['SUBST_DICT']
63
64 env.SubstInFile(source='config.py.in')
65 env.SubstInFile(source='config.h.in')
66
67 ascendcmd = env.SubstInFile(source='ascend.in')
68
69 #---------------------------------------------
70 # INSTALLATION
71
72 if env.has_key('CAN_INSTALL') and env['CAN_INSTALL']:
73 env.InstallProgram(env['INSTALL_ROOT']+env['INSTALL_BIN'],ascendcmd)
74
75 import glob
76 pythonfiles = glob.glob("*.py")
77
78 env.Install(env['INSTALL_ROOT']+env['INSTALL_DATA']+"/ascend/",pythonfiles)
79
80 gladefiles = glob.glob("glade/*")
81 env.Install(env['INSTALL_ROOT']+env['INSTALL_DATA']+"/ascend/glade/",gladefiles)
82
83 env.Install(env['INSTALL_ROOT']+env['INSTALL_DATA']+"/ascend/",swiglib)
84
85 if env.has_key('WITH_INSTALLER') and env['WITH_INSTALLER']:
86 import platform
87 if platform.system()=="Windows":
88 env.Nsis('create.nsi')

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