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

Contents of /trunk/pygtk/interface/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 448 - (show annotations) (download)
Wed Apr 5 01:04:59 2006 UTC (13 years, 11 months ago) by johnpye
File size: 2449 byte(s)
RPM build works now. The model library isn't being installed but the PyGTK interface opens up correctly.
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 libs = Split("""
18 asccompiler ascpackages ascsolver ascutilities ascgeneral
19 """)
20
21
22 libpath = [
23 '../../base/generic/compiler'
24 ,'../../base/generic/packages'
25 ,'../../base/generic/solver'
26 ,'../../base/generic/utilities'
27 ,'../../base/generic/general'
28 ]
29
30 # Build a static library with all the sources
31
32 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 #----------------------------------------------
44 # SWIG Builder
45
46 def swig_modify_targets(target, source, env):
47 target.append('ascend.py')
48 target.append('ascend_wrap.h')
49 return target, source
50
51 swig_builder = Builder(
52 action='$SWIG $SWIGFLAGS -o $TARGET $SOURCE'
53 , emitter=swig_modify_targets
54 )
55 env.Append(BUILDERS={'Swig':swig_builder})
56 #---------------------------------------------
57
58
59 swig = env.Swig(target=['ascend_wrap.cc'],source=['ascend.i']
60 , SWIGFLAGS=['-python','-c++']
61 , CPPFLAGS = ['-O3']
62 )
63
64
65 swiglib = env.SharedLibrary("ascend",['ascend_wrap.cc']
66 , LIBS = ['ascxx']+libs+env['PYTHON_LIB']
67 , LIBPATH = ['.']+libpath+env['PYTHON_LIBPATH']
68 , CPPPATH = ['../../base/generic']+env['PYTHON_CPPPATH']
69 , CPPDEFINES = {
70 'ASCXX_USE_PYTHON':None
71 ,'DEFAULT_ASCENDLIBRARY':'\\"'+env['DEFAULT_ASCENDLIBRARY']+'\\"'
72 }
73 , CPPFLAGS = ['-O3']
74 , SHLIBPREFIX = '_'
75 )
76
77 env.Depends(swiglib,'ascend.py')
78
79 #print env['SUBST_DICT']
80
81 env.SubstInFile(source='config.py.in')
82
83 ascendcmd = env.SubstInFile(source='ascend.in')
84
85 #---------------------------------------------
86 # INSTALLATION
87
88 env.InstallProgram(env['INSTALL_ROOT']+env['INSTALL_BIN'],ascendcmd)
89
90 import glob
91 pythonfiles = glob.glob("*.py")
92
93 env.Install(env['INSTALL_ROOT']+env['INSTALL_DATA']+"/ascend/",pythonfiles)
94
95 gladefiles = glob.glob("glade/*")
96 env.Install(env['INSTALL_ROOT']+env['INSTALL_DATA']+"/ascend/glade/",gladefiles)
97
98 env.Install(env['INSTALL_ROOT']+env['INSTALL_DATA']+"/ascend/",swiglib)

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