/[escript]/branches/ROBW_XPLATFORM/finley/src/SConscript
ViewVC logotype

Contents of /branches/ROBW_XPLATFORM/finley/src/SConscript

Parent Directory Parent Directory | Revision Log Revision Log


Revision 623 - (show annotations)
Wed Mar 22 14:11:03 2006 UTC (17 years ago) by robwdcock
File size: 1675 byte(s)
Beginning of a fully cross-platform (win32+intelc, linux+g++, altix+intelc)
scons build system
WORK IN PROGRESS NOT COMPLETE
+Incorporates ideas from trunks scons build system and the RW_WIN32 branch
+New Header layout as include/<modulename>, hence the changes to the headers
+Not all modules or features from trunk build system are fully implemented
-Removes need for intermediary SConstruct files - the top SConstruct is more complex but handle cross-platform better AND the SConscript are a LOT simpler
and only differ slightly. It should be simpler to maintain
-Options are now handled via either a: config file supplied on command line, a config file in the scons/hostname_options.py, or as individual command line arguments
-Need help with options: scons -h will give you a list of options and their current settings


1 Import('*')
2
3 local_env=env.Copy()
4
5 src_dir = local_env.Dir('.').srcnode().abspath
6
7 import os
8 filenames = os.listdir(src_dir)
9 sources = [x for x in filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
10 headers = [x for x in filenames if os.path.splitext(x)[1] in ['.h']]
11
12 # Filter unused sources
13 sources.remove('ElementFile_borrowLocalVolume.c') # FIXME: Should this file be removed?
14
15 # finleycpp has additional source in the CPPAdapter sub-directory. Append these to the list
16 cppadapter_filenames = os.listdir(src_dir+'/CPPAdapter');
17 sources += ['CPPAdapter/'+x for x in cppadapter_filenames if os.path.splitext(x)[1] in ['.cpp', '.c']]
18 cppadapter_headers = ['CPPAdapter/'+x for x in cppadapter_filenames if os.path.splitext(x)[1] in ['.h']]
19
20 if mkl_libs:
21 local_env.Append(CPPDEFINES=['MKL',])
22 if scsl_libs:
23 local_env.Append(CPPDEFINES=['SCSL',])
24 if umf_libs:
25 local_env.Append(CPPDEFINES=['UMFPACK',])
26 if papi_libs:
27 local_env.Append(CPPDEFINES=['PAPI',])
28
29 lib_name = 'finleycpp'
30
31 local_env.Append(LIBS = [boost_lib, 'esysUtils', 'escriptcpp', 'paso'])
32
33 lib = local_env.SharedLibrary(lib_name, sources)
34
35 include_path = Dir(lib_name, incinstall)
36 cppadapter_include_path = Dir('CppAdapter', include_path)
37
38 local_env.Install(include_path, headers )
39 local_env.Install(cppadapter_include_path, cppadapter_headers )
40 local_env.Install(libinstall, lib)
41
42
43 # FIXME: old stuff
44
45 #libs = ['escriptcpp',
46 # 'esysUtils',
47 # 'paso',
48 # str(boost_lib),
49 # 'dl',
50 # 'util'] \
51 # + sys_libs \
52 # + solver_libs \
53 # + papi_libs
54
55
56 #Depends(finley_lib, esysUtils_lib)
57 #Depends(finley_lib, escript_lib)
58 #Depends(finley_lib, paso_lib)
59

  ViewVC Help
Powered by ViewVC 1.1.26