| 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 | #==================================================================== |
|---|
| 28 | |
|---|
| 29 | import os |
|---|
| 30 | import platform |
|---|
| 31 | import sys |
|---|
| 32 | import re |
|---|
| 33 | import shutil |
|---|
| 34 | from socket import gethostname |
|---|
| 35 | |
|---|
| 36 | import nexus_scons_utils |
|---|
| 37 | |
|---|
| 38 | Import('env') |
|---|
| 39 | myenv = env.Clone() |
|---|
| 40 | myenv.Append(CPPPATH=['#/include']) |
|---|
| 41 | shared_list = env['SHARED_LIST'] |
|---|
| 42 | static_list = env['STATIC_LIST'] |
|---|
| 43 | libList = env['MYLIBLIST'] |
|---|
| 44 | libDirList = env['MYLIBDIRLIST'] |
|---|
| 45 | shlibList = env['MYSHLIBLIST'] |
|---|
| 46 | shlibDirList = env['MYSHLIBDIRLIST'] |
|---|
| 47 | |
|---|
| 48 | myenv_dynamic = myenv.Clone() |
|---|
| 49 | myenv_dynamic.Append(LIBS=shlibList) |
|---|
| 50 | myenv_dynamic.Append(LIBPATH=shlibDirList) |
|---|
| 51 | myenv_dynamic.Append(LIBPATH='#Bin/Shared') |
|---|
| 52 | shared = myenv_dynamic.Program('nxbrowse',['NXbrowse.c'],PDB='nxbrowse.pdb') |
|---|
| 53 | #shared = myenv_dynamic.Program('nxconvert',['nxconvert.c','nxconvert_common.c'],PDB='nxconvert.pdb') |
|---|
| 54 | #shared = myenv_dynamic.Program('nxvalidate',['nxvalidate.c','nxconvert_common.c'],PDB='nxvalidate.pdb') |
|---|
| 55 | |
|---|
| 56 | myenv_static = myenv.Clone() |
|---|
| 57 | myenv_static.Append(LIBS=libList) |
|---|
| 58 | myenv_static.Append(LIBPATH=libDirList) |
|---|
| 59 | myenv_static.Append(LIBPATH='#Bin/Static') |
|---|
| 60 | #myenv_static.Append(LINKFLAGS=['-static']) |
|---|
| 61 | static = myenv_static.Program('nxbrowse_static', ['NXbrowse.c'], PDB='nxbrowse_static.pdb') |
|---|
| 62 | #static = myenv_static.Program('nxconvert_static',['nxconvert.c','nxconvert_common.c'],PDB='nxconvert_static.pdb') |
|---|
| 63 | #static = myenv_static.Program('nxvalidate_static',['nxvalidate.c','nxconvert_common.c'],PDB='nxvalidate_static.pdb') |
|---|
| 64 | |
|---|
| 65 | retval = { 'shared': shared, 'static' : static } |
|---|
| 66 | Return('retval') |
|---|