Changeset 3599 for anuga_core/SConstruct


Ignore:
Timestamp:
Sep 15, 2006, 12:05:20 PM (19 years ago)
Author:
jack
Message:

Consolidated the SConscripts into the SConstruct.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • anuga_core/SConstruct

    r3550 r3599  
    101101    env.Append(CCFLAGS=['${MSVCFLAGS}'])
    102102
    103 Export('env')
     103anuga_root = os.path.join('source', 'anuga')
     104install_root = os.path.join(env['PREFIX'], 'anuga')
    104105
    105106# Build .pyc and .pyo files of every .py in here and below.
     
    107108#dirs = filter(os.path.isdir, os.listdir('.'))
    108109#Only build the source/anuga directory for now
    109 dirs = [os.path.join('source', 'anuga')]
     110dirs = [anuga_root]
    110111while(dirs != []):
    111112    dirs += filter(os.path.isdir, map(lambda x : os.path.join(dirs[0], x), os.listdir(dirs[0])))
     
    123124        env.Install(instdir, x)
    124125
     126# Define the install target
    125127env.Alias('install', '${PREFIX}')
    126    
    127 SConscript(['source/anuga/SConscript'])
     128
     129# Mesh_engine
     130mesh_env = env.Copy()
     131mesh_env.Append(CPPDEFINES=[('TRILIBRARY', 1), ('NO_TIMER', 1)])
     132
     133mesh_dir = os.path.join(anuga_root, 'mesh_engine')
     134mesh_install_dir = os.path.join(install_root, 'mesh_engine')
     135env.Install(mesh_install_dir, mesh_env.SharedLibrary(os.path.join(mesh_dir, 'triang'),
     136                                            map(lambda s: os.path.join(mesh_dir, s), ['triangle.c', 'triang.c'])))
     137env.Install(mesh_install_dir, mesh_env.SharedLibrary(os.path.join(mesh_dir, 'triangle'),
     138                                            map(lambda s: os.path.join(mesh_dir, s), ['triangle.c'])))
     139
     140# Utilities
     141util_dir = os.path.join(anuga_root, 'utilities')
     142util_install_dir = os.path.join(install_root, 'utilities')
     143env.Install(util_install_dir, env.SharedLibrary(os.path.join(util_dir, 'polygon_ext'),
     144                                                map(lambda s: os.path.join(util_dir, s), ['polygon_ext.c'])))
     145env.Install(util_install_dir, env.SharedLibrary(os.path.join(util_dir, 'util_ext'),
     146                                                map(lambda s: os.path.join(util_dir, s), ['util_ext.c'])))
     147env.Install(util_install_dir, env.SharedLibrary(os.path.join(util_dir, 'sparse_ext'),
     148                                                map(lambda s: os.path.join(util_dir, s), ['sparse_ext.c'])))
     149
     150# Abstract_2d_finite_volumes
     151a2fv_env = env.Copy()
     152a2fv_env.Append(CPPPATH=[os.path.join('#', anuga_root, 'utilities')])
     153
     154a2fv_dir = os.path.join(anuga_root, 'abstract_2d_finite_volumes')
     155a2fv_install_dir = os.path.join(install_root, 'abstract_2d_finite_volumes')
     156env.Install(a2fv_install_dir, a2fv_env.SharedLibrary(os.path.join(a2fv_dir, 'quantity_ext'),
     157                                                     map(lambda s: os.path.join(a2fv_dir, s), ['quantity_ext.c'])))
     158env.Install(a2fv_install_dir, a2fv_env.SharedLibrary(os.path.join(a2fv_dir, 'shallow_water_kinetic'),
     159                                                     map(lambda s: os.path.join(a2fv_dir, s), ['shallow_water_kinetic_ext.c'])))
     160
     161# Shallow_water
     162sw_env = env.Copy()
     163sw_env.Append(CPPPATH=[os.path.join('#', anuga_root, 'utilities')])
     164
     165sw_dir = os.path.join(anuga_root, 'shallow_water')
     166sw_install_dir = os.path.join(install_root, 'shallow_water')
     167env.Install(sw_install_dir, sw_env.SharedLibrary(os.path.join(sw_dir, 'shallow_water_ext'),
     168                                                 map(lambda s: os.path.join(sw_dir, s), ['shallow_water_ext.c'])))
Note: See TracChangeset for help on using the changeset viewer.