/[escript]/trunk/dataexporter/src/SConscript
ViewVC logotype

Diff of /trunk/dataexporter/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2811 by caltinay, Mon Dec 7 05:57:16 2009 UTC revision 2812 by caltinay, Tue Dec 8 00:12:07 2009 UTC
# Line 15  import os Line 15  import os
15  Import('*')  Import('*')
16    
17  local_env = clone_env(env_mpi)  local_env = clone_env(env_mpi)
18    py_wrapper_local_env = clone_env(env_mpi)
19    
20    # Remove the shared library prefix on all platforms - we don't want 'lib'
21    # mucking with our python modules
22    del py_wrapper_local_env['SHLIBPREFIX']
23    
24  sources = """  sources = """
25      DataVar.cpp      DataVar.cpp
26      ElementData.cpp      ElementData.cpp
27      EscriptDataset.cpp      EscriptDataset.cpp
28        FileSavers.cpp
29      FinleyMesh.cpp      FinleyMesh.cpp
30      NodeData.cpp      NodeData.cpp
31  """.split()  """.split()
32    
33  headers = """  headers = """
34      DataVar.h      DataVar.h
35      ElementData.h      ElementData.h
36      EscriptDataset.h      EscriptDataset.h
37      escriptexport.h      escriptexport.h
38        FileSavers.h
39      FinleyMesh.h      FinleyMesh.h
40      NodeData.h      NodeData.h
41  """.split()  """.split()
42    
43  local_env.AppendUnique(LIBS = [ 'finley' ] + env['sys_libs'])  local_env.AppendUnique(LIBS = ['finley'] + env['sys_libs'])
44  if local_env['usesilo']:  if local_env['usesilo']:
45    local_env.AppendUnique(LIBS = [env['silo_libs']])    local_env.AppendUnique(LIBS = [env['silo_libs']])
46    
# Line 49  include_path = Dir('escriptexport', loca Line 57  include_path = Dir('escriptexport', loca
57  tmp1 = local_env.Install(include_path, headers)  tmp1 = local_env.Install(include_path, headers)
58  env.Alias('target_install_escriptexport_headers', [tmp1])  env.Alias('target_install_escriptexport_headers', [tmp1])
59    
60  tmp3 = local_env.Install(local_env['libinstall'], lib)  tmp2 = local_env.Install(local_env['libinstall'], lib)
61  env.Alias('target_install_escriptexport_so', tmp3)  env.Alias('target_install_escriptexport_so', tmp2)
62    
63    ### Python wrapper ###
64    py_wrapper_local_env.Append(LIBS = ['escriptexport'] + env['sys_libs'])
65    py_wrapper_name = module_name + 'cpp'
66    py_wrapper_lib = py_wrapper_local_env.SharedLibrary(py_wrapper_name, 'escriptexportcpp.cpp')
67    env.Alias('target_escriptexportcpp_so', py_wrapper_lib)
68    
69    tmp_inst = os.path.join(local_env['pyinstall'], 'dataexporter')
70    #windows specific mod
71    if os.name == 'nt':
72      wrapper_postfix = '.pyd'
73    else:
74      wrapper_postfix = '.so'
75    
76    share_name = os.path.join(tmp_inst, py_wrapper_name + wrapper_postfix)
77    tmp3 = py_wrapper_local_env.InstallAs(target=share_name,
78                                          source=py_wrapper_lib[0])
79    env.Alias('target_install_escriptexportcpp_so', tmp3)
80    
81  # export the lib target since tests will depend on it  # export the lib target since tests will depend on it
82  # the lib target is a list of file nodes (why? win32 produces more than one  # the lib target is a list of file nodes (why? win32 produces more than one
# Line 60  env.Alias('target_install_escriptexport_ Line 86  env.Alias('target_install_escriptexport_
86  dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]  dep_lib = [local_env['libinstall']+'/'+str(x) for x in lib]
87  Export('dep_lib')  Export('dep_lib')
88    
89    # Call the python SConscript
90    env.SConscript(dirs = ['#/dataexporter/py_src'], build_dir='py', duplicate=0)
91    
92  # Call the unit tests SConscript  # Call the unit tests SConscript
93  #local_env.SConscript(dirs = ['#/dataexporter/test'], build_dir='#/build/$PLATFORM/dataexporter/test', duplicate=0)  #local_env.SConscript(dirs = ['#/dataexporter/test'], build_dir='#/build/$PLATFORM/dataexporter/test', duplicate=0)
94    

Legend:
Removed from v.2811  
changed lines
  Added in v.2812

  ViewVC Help
Powered by ViewVC 1.1.26