/[ascend]/trunk/models/johnpye/fprops/SConscript
ViewVC logotype

Contents of /trunk/models/johnpye/fprops/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2655 - (show annotations) (download)
Wed Jan 16 02:08:20 2013 UTC (9 years, 6 months ago) by jpye
File size: 1813 byte(s)
Fix build with heatex_pinch stuff in FPROPS.
1 # NB there are TWO scons scripts in this directory. The 'SConscript' one is
2 # run when 'scons' is launched from higher up the directory tree, eg from
3 # ~/ascend. The 'SConstruct' file, on the other hand, is run when you launch
4 # 'scons' from this directory right here. The latter is here just to prove that
5 # FPROPS can be built standalone; it doesn't need ASCEND to be present to
6 # work.
7
8 Import('env')
9 fprops_env = env.Clone()
10
11 fprops_env.Append(LIBPATH=['#'])
12 fprops_env.Append(LIBS=['ascend'])
13
14 lib = fprops_env.SharedLibrary("mbwr"
15 ,['mbwr.c','asc_mbwr.c']
16 ,SHLIBSUFFIX = env['EXTLIB_SUFFIX']
17 ,SHLIBPREFIX = env['EXTLIB_PREFIX']
18 )
19
20 # automatically create fluids/fluids_list.h...
21 fprops_env.SConscript("fluids/SConscript",['fprops_env'])
22
23 fprops_env.Depends("fluids.c","fluids/fluids_list.h")
24
25 coresrcs = ['fprops.c', 'color.c', 'refstate.c', 'ideal.c', 'helmholtz.c', 'pengrob.c'
26 , 'sat.c', 'derivs.c', 'solve_ph.c', 'solve_Tx.c', 'solve_px.c', 'fluids.c','cp0.c', 'zeroin.c','cubicroots.c'
27 ]
28 srcs = coresrcs + fprops_env['fluids'] + ['fluids/_rpp.c']
29
30 fprops_env['shobjs'] = [fprops_env.SharedObject(s) for s in srcs]
31
32
33 lib1 = fprops_env.SharedLibrary("fprops"
34 ,['asc_fprops.c'] + fprops_env['shobjs']
35 ,SHLIBSUFFIX = env['EXTLIB_SUFFIX']
36 ,SHLIBPREFIX = env['EXTLIB_PREFIX']
37 )
38
39 lib2 = fprops_env.SharedLibrary("heatex_pinch"
40 ,['asc_heatex_pinch.c'] + fprops_env['shobjs']
41 ,SHLIBSUFFIX = env['EXTLIB_SUFFIX']
42 ,SHLIBPREFIX = env['EXTLIB_PREFIX']
43 )
44
45 env['extfns'] += [lib1,lib2]
46
47 if env['WITH_PYTHON']:
48 fprops_env.SConscript('python/SConscript',['fprops_env'])
49 env['pyfprops'] = fprops_env['pyfprops']
50
51 if env.get('CAN_INSTALL'):
52 dir = Dir(env.subst("$INSTALL_ROOT$INSTALL_PYTHON"))
53 env.InstallShared(dir,env['pyfprops'])
54 env.InstallShared(dir,"python/fprops.py")
55
56 #vim: set syntax=python:

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