/[escript]/branches/RW_WIN32/SConstruct
ViewVC logotype

Diff of /branches/RW_WIN32/SConstruct

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

revision 220 by robwdcock, Thu Nov 24 09:11:38 2005 UTC revision 221 by phornby, Thu Nov 24 11:23:33 2005 UTC
# Line 1  Line 1 
1  opts = Options('custom.py')  opts = Options('custom.py')
2  opts.AddOptions(  opts.AddOptions(
3     BoolOption('RELEASE', 'Set to build for release', 0),     BoolOption('RELEASE', 'Set to build for release', 0),
4     PathOption('PYTHON_HOME','Path to python home','C:/python23')     PathOption('PYTHON_HOME','Path to python home','/usr/lib/python2.3')
5  )  )
6    
7    
# Line 24  EnsurePythonVersion(2,3) Line 24  EnsurePythonVersion(2,3)
24  #TODO: Is there a more compact way of setting up the include paths?  #TODO: Is there a more compact way of setting up the include paths?
25    
26  # Third-Party libraries  # Third-Party libraries
27  boost_home = 'E:/woo409/development/boost'  boost_home = '/usr/include/boost'
28  python_home = env['PYTHON_HOME']  python_home = env['PYTHON_HOME']
29    
30  # Where to install (and find) esys includes and libraries  # Where to install (and find) esys includes and libraries
# Line 33  esys_inc = '#/include' Line 33  esys_inc = '#/include'
33  esys_lib = '#/lib'  esys_lib = '#/lib'
34    
35  # Derived paths  # Derived paths
36  python_inc = python_home + '/include'  if env['PLATFORM'] == "win32":
37  python_lib = python_home + '/libs'     python_inc = python_home + '/include'
38  boost_inc = boost_home     python_lib = python_home + '/libs'
39  boost_lib = boost_home + '/windows_binary/lib'     boost_inc = boost_home
40       boost_lib = boost_home + '/usr/lib'
41    elif  env['PLATFORM'] == "posix":
42       python_inc = '/usr/include/python2.3'
43       python_lib = '/usr/lib'
44       boost_inc = '/usr/include'
45       boost_lib = '/usr/lib'
46    
47  incdir = [ boost_inc, python_inc, esys_inc ]  incdir = [ boost_inc, python_inc, esys_inc ]
48  libdir = [ boost_lib, python_lib, esys_lib ]  libdir = [ boost_lib, python_lib, esys_lib ]
# Line 44  libdir = [ boost_lib, python_lib, esys_l Line 50  libdir = [ boost_lib, python_lib, esys_l
50  env.Append(CPPPATH=incdir)  env.Append(CPPPATH=incdir)
51  env.Append(LIBPATH=libdir)  env.Append(LIBPATH=libdir)
52    
 env.Append(CPPDEFINES = ['DOASSERT'])  
53    
54  if env['PLATFORM'] == "win32":  if env['PLATFORM'] == "win32":
55     env.Append(CCFLAGS = ' /GR /EHsc /TP /wd4068')     env.Append(CCFLAGS = ' /GR /EHsc /TP /wd4068')
# Line 53  if env['PLATFORM'] == "win32": Line 58  if env['PLATFORM'] == "win32":
58        print "RELEASE build"        print "RELEASE build"
59     else:     else:
60        print "DEBUG build"        print "DEBUG build"
61          env.Append(CPPDEFINES = ['DOASSERT'])
62        env.Append(CCFLAGS = ' /Od /MDd /RTC1')        env.Append(CCFLAGS = ' /Od /MDd /RTC1')
63        env.Append(CPPDEFINES = ['_DEBUG'])        env.Append(CPPDEFINES = ['_DEBUG'])
64        boost_lib_name = 'boost_python-vc71-mt-sgd'        boost_lib_name = 'boost_python-vc71-mt-sgd'
65    elif env['PLATFORM'] == "posix":
66       env.Append(CC = ' -std=c99')
67       env.Append(CCFLAGS = ' -c -fpic -W -Wall -Wno-unknown-pragmas')
68       boost_lib_name = 'boost_python'
69       if False :
70          print "RELEASE build"
71       else:
72          print "DEBUG build"
73          env.Append(CPPDEFINES = ['DOASSERT', 'DOPROF'])
74          env.Prepend(CCFLAGS = ' -g -O0')
75    
76  Export(["env", "incdir", "esys_inc", "esys_lib", "boost_lib_name" ])  Export(["env", "incdir", "esys_inc", "esys_lib", "boost_lib_name" ])
77    
78  # C/C++ Libraries  # C/C++ Libraries
79  env.SConscript(dirs = ['paso/src'], build_dir='build/win32/paso', duplicate=0)  env.SConscript(dirs = ['paso/src'], build_dir='build/$PLATFORM/paso', duplicate=0)
80  env.SConscript(dirs = ['bruce/src'], build_dir='build/win32/bruce', duplicate=0)  env.SConscript(dirs = ['bruce/src'], build_dir='build/$PLATFORM/bruce', duplicate=0)
81  env.SConscript(dirs = ['escript/src/Data'], build_dir='build/win32/escript/Data', duplicate=0)  env.SConscript(dirs = ['escript/src/Data'], build_dir='build/$PLATFORM/escript/Data', duplicate=0)
82  env.SConscript(dirs = ['esysUtils/src'], build_dir='build/win32/esysUtils', duplicate=0)  env.SConscript(dirs = ['esysUtils/src'], build_dir='build/$PLATFORM/esysUtils', duplicate=0)
83  env.SConscript(dirs = ['win32/win32_utils'], build_dir='build/win32/win32_utils', duplicate=0)  env.SConscript(dirs = ['tools/mmio/src'], build_dir='build/$PLATFORM/tools/mmio', duplicate=0)
84  env.SConscript(dirs = ['tools/mmio/src'], build_dir='build/win32/tools/mmio', duplicate=0)  env.SConscript(dirs = ['tools/CppUnitTest/src'], build_dir='build/$PLATFORM/tools/CppUnitTest', duplicate=0)
85  env.SConscript(dirs = ['tools/CppUnitTest/src'], build_dir='build/win32/tools/CppUnitTest', duplicate=0)  env.SConscript(dirs = ['finley/src/finleyC'], build_dir='build/$PLATFORM/finleyC', duplicate=0)
86  env.SConscript(dirs = ['finley/src/finleyC'], build_dir='build/win32/finleyC', duplicate=0)  env.SConscript(dirs = ['finley/src/CPPAdapter'], build_dir='build/$PLATFORM/CPPAdapter', duplicate=0)
 env.SConscript(dirs = ['finley/src/CPPAdapter'], build_dir='build/win32/CPPAdapter', duplicate=0)  
87    
88  # Unit Tests  # Unit Tests
89  env.SConscript(dirs = ['esysUtils/test/EsysException'], build_dir='build/win32/esysUtils/test/EsysException', duplicate=0)  env.SConscript(dirs = ['esysUtils/test/EsysException'], build_dir='build/$PLATFORM/esysUtils/test/EsysException', duplicate=0)
90  env.SConscript(dirs = ['escript/test'], build_dir='build/win32/escript/test', duplicate=0)  env.SConscript(dirs = ['escript/test'], build_dir='build/$PLATFORM/escript/test', duplicate=0)
91  env.SConscript(dirs = ['bruce/test'], build_dir='build/win32/bruce/test', duplicate=0)  env.SConscript(dirs = ['bruce/test'], build_dir='build/$PLATFORM/bruce/test', duplicate=0)
92  env.SConscript(dirs = ['finley/test'], build_dir='build/win32/finley/test', duplicate=0)  env.SConscript(dirs = ['finley/test'], build_dir='build/$PLATFORM/finley/test', duplicate=0)
93    
94    if env['PLATFORM'] == "win32":
95       env.SConscript(dirs = ['win32/win32_utils'], build_dir='build/$PLATFORM/win32_utils', duplicate=0)

Legend:
Removed from v.220  
changed lines
  Added in v.221

  ViewVC Help
Powered by ViewVC 1.1.26