| 1 | #==================================================================== |
|---|
| 2 | # NeXus - Neutron & X-ray Common Data Format |
|---|
| 3 | # |
|---|
| 4 | # $Id: Makefile.am 961 2007-09-04 12:31:49Z Freddie Akeroyd $ |
|---|
| 5 | # |
|---|
| 6 | # Top level scons file for coordinating NeXus build |
|---|
| 7 | # |
|---|
| 8 | # Copyright (C) 2008 Freddie Akeroyd |
|---|
| 9 | # |
|---|
| 10 | # This library is free software; you can redistribute it and/or |
|---|
| 11 | # modify it under the terms of the GNU Lesser General Public |
|---|
| 12 | # License as published by the Free Software Foundation; either |
|---|
| 13 | # version 2 of the License, or (at your option) any later version. |
|---|
| 14 | # |
|---|
| 15 | # This library is distributed in the hope that it will be useful, |
|---|
| 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 18 | # Lesser General Public License for more details. |
|---|
| 19 | # |
|---|
| 20 | # You should have received a copy of the GNU Lesser General Public |
|---|
| 21 | # License along with this library; if not, write to the Free |
|---|
| 22 | # Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
|---|
| 23 | # MA 02111-1307 USA |
|---|
| 24 | # |
|---|
| 25 | # For further information, see <http://www.nexusformat.org/> |
|---|
| 26 | # |
|---|
| 27 | ######################## Subversion Reposity details ######################## |
|---|
| 28 | # Repository Location $HeadURL$ |
|---|
| 29 | # Revision of last commit $LastChangedRevision$ |
|---|
| 30 | # Date of last commit $LastChangedDate$ |
|---|
| 31 | # Author of last commit $LastChangedBy$ |
|---|
| 32 | ############################################################################ |
|---|
| 33 | |
|---|
| 34 | import os |
|---|
| 35 | import platform |
|---|
| 36 | import sys |
|---|
| 37 | import shutil |
|---|
| 38 | import re |
|---|
| 39 | import os |
|---|
| 40 | import nexus_scons_utils |
|---|
| 41 | |
|---|
| 42 | source_files = Split("""NeXusFile.cpp |
|---|
| 43 | NeXusException.cpp |
|---|
| 44 | NeXusStream.cpp""") |
|---|
| 45 | |
|---|
| 46 | #Import environment |
|---|
| 47 | Import('env') |
|---|
| 48 | myenv = env.Clone() |
|---|
| 49 | myenv.Append(CPPPATH=['#include']) |
|---|
| 50 | myenv.Append(CPPDEFINES=[('IN_NEXUS_CPP_LIBRARY',1)]) |
|---|
| 51 | myenv_static=myenv.Clone() |
|---|
| 52 | myenv_dynamic=myenv.Clone() |
|---|
| 53 | |
|---|
| 54 | |
|---|
| 55 | shared_objects = nexus_scons_utils.getSharedObjects(source_files, myenv) |
|---|
| 56 | |
|---|
| 57 | #BUILD CODE |
|---|
| 58 | shared = myenv_dynamic.SharedLibrary('lib/NeXusCPP', source_files, LIBS=env['MYSHLIBLIST'], LIBPATH=env['MYSHLIBDIRLIST'], PDB='lib/NeXusCPP.pdb') |
|---|
| 59 | static = myenv_static.StaticLibrary('libstatic/NeXusCPP', source_files, LIBS=env['MYLIBLIST'], LIBPATH=env['MYLIBDIRLIST'], PDB='libstatic/NeXusCPP.pdb') |
|---|
| 60 | retval = { 'shared': shared, 'static': static, 'sharedobjs' : shared_objects, 'libs': [ 'NeXusCPP' ] } |
|---|
| 61 | Return('retval') |
|---|