/[ascend]/branches/jacob/models/johnpye/fprops/SConscript
ViewVC logotype

Contents of /branches/jacob/models/johnpye/fprops/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2988 - (show annotations) (download)
Tue Jun 30 04:00:24 2015 UTC (3 years, 4 months ago) by jacob
File size: 2476 byte(s)
expanded new library file to export mixture functions, and test .a4c file to check that the functions are exported correctly, and receive correct data.

minor changes to <ascend/compiler/instance_enum.h>, adding a few macro definitions of ASCEND data types for library file to be able to mention by name.

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; FPROPS doesn't need ASCEND to be present to
6 # compile and run.
7
8 Import('env')
9 fprops_env = env.Clone()
10
11 # automatically create fluids/fluids_list.h...
12 fprops_env.SConscript("fluids/SConscript",['fprops_env'])
13
14 fprops_env.Depends("fluids.c","fluids/fluids_list.h")
15
16 coresrcs = ['fprops.c', 'color.c', 'refstate.c', 'ideal.c', 'helmholtz.c', 'pengrob.c'
17 , 'sat.c', 'derivs.c', 'solve_ph.c', 'solve_Tx.c', 'solve_px.c', 'fluids.c','cp0.c'
18 , 'zeroin.c','cubicroots.c', 'visc.c', 'thcond.c', 'mixtures/init_mixfuncs.c'
19 , 'mixtures/mixture_prepare.c', 'mixtures/mixture_generics.c'
20 ]
21
22 srcs = coresrcs + fprops_env['fluids'] + ['fluids/_rpp.c']
23
24 fprops_env['shobjs'] = [fprops_env.SharedObject(s) for s in srcs]
25
26 #fprops_env['libfprops'] = fprops_env.SharedLibrary("fprops",fprops_env['shobjs'])
27
28 if fprops_env.get('BUILDING_ASCEND') or fprops_env.get('WITH_ASCEND'):
29 asc_env = fprops_env.Clone()
30 asc_env.AppendUnique(LIBPATH=["."])
31 asc_env.AppendUnique(LIBPATH=["#"])
32
33 lib1 = asc_env.SharedLibrary("fprops"
34 ,['asc_fprops.c'] + fprops_env['shobjs']
35 ,LIBS = ["ascend"]
36 ,SHLIBSUFFIX = env['EXTLIB_SUFFIX']
37 ,SHLIBPREFIX = env['EXTLIB_PREFIX']
38 )
39
40 lib2 = asc_env.SharedLibrary("heatex_pinch"
41 ,['asc_heatex_pinch.c'] + fprops_env['shobjs']
42 ,LIBS = ["ascend"]
43 ,SHLIBSUFFIX = env['EXTLIB_SUFFIX']
44 ,SHLIBPREFIX = env['EXTLIB_PREFIX']
45 )
46
47 lib3 = asc_env.SharedLibrary("idealsol"
48 ,['mixtures/asc_idealsolution.c'] + fprops_env['shobjs']
49 ,LIBS = ["ascend"]
50 ,SHLIBSUFFIX = env['EXTLIB_SUFFIX']
51 ,SHLIBPREFIX = env['EXTLIB_PREFIX']
52 )
53
54 #asc_env.Depends(lib1,fprops_env['libfprops'])
55 #asc_env.Depends(lib2,fprops_env['libfprops'])
56 #asc_env.Depends(lib3,fprops_env['libfprops'])
57
58 env['extfns'] += [lib1,lib2,lib3]
59 # env['extfns'] += [lib3]
60
61 if env['WITH_PYTHON']:
62 fprops_env.SConscript('python/SConscript',['fprops_env'])
63 env['pyfprops'] = fprops_env['pyfprops']
64
65 if env.get('CAN_INSTALL'):
66 dir = Dir(env.subst("$INSTALL_ROOT$INSTALL_PYTHON"))
67 env.InstallShared(dir,env['pyfprops'])
68 env.InstallShared(dir,"python/fprops.py")
69
70 #vim: set syntax=python:
71
72 fprops_env.SConscript("test/SConscript",['fprops_env'])
73

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