source: trunk/scripts/nxbuild.in @ 1822

Revision 1636, 2.7 KB checked in by Pete Jemian, 7 months ago (diff)

point to current WWW site in license text, refs #281

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
Line 
1#!/bin/sh
2#====================================================================
3#  NeXus - Neutron & X-ray Common Data Format
4
5#  $Id$
6#
7#  @configure_input@
8
9#  Script for building NeXus applications
10#
11#  Copyright (C) 2004 Freddie Akeroyd
12
13#  This library is free software; you can redistribute it and/or
14#  modify it under the terms of the GNU Lesser General Public
15#  License as published by the Free Software Foundation; either
16#  version 2 of the License, or (at your option) any later version.
17#
18#  This library is distributed in the hope that it will be useful,
19#  but WITHOUT ANY WARRANTY; without even the implied warranty of
20#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21#  Lesser General Public License for more details.
22#
23#  You should have received a copy of the GNU Lesser General Public
24#  License along with this library; if not, write to the Free
25#  Software Foundation, Inc., 59 Temple Place, Suite 330, Boston,
26#  MA  02111-1307  USA
27#             
28#  For further information, see <http://www.nexusformat.org>
29#
30#====================================================================
31SHELL="@SHELL@"
32srcdir="@srcdir@"
33top_srcdir="@top_srcdir@"
34VPATH="@srcdir@"
35prefix="@prefix@"
36exec_prefix="@exec_prefix@"
37bindir="@bindir@"
38sbindir="@sbindir@"
39libexecdir="@libexecdir@"
40datadir="@datadir@"
41datarootdir="@datarootdir@"
42libdir="@libdir@"
43infodir="@infodir@"
44mandir="@mandir@"
45includedir="@includedir@"
46#pkgdatadir=$(datadir)/@PACKAGE@
47#pkglibdir=$(libdir)/@PACKAGE@
48#pkgincludedir=$(includedir)/@PACKAGE@
49#top_builddir=..
50host_alias="@host_alias@"
51host_triplet="@host@"
52CC="@CC@"
53F77="@F77@"
54F90="@F90@"
55F90FLAGS="@F90FLAGS@"
56H4ROOT="@H4ROOT@"
57H5ROOT="@H5ROOT@"
58PACKAGE="@PACKAGE@"
59RANLIB="@RANLIB@"
60STRIP="@STRIP@"
61VERSION="@VERSION@"
62LIBNEXUS="${prefix}/lib/libNeXus.a"
63LIBNEXUS77="${prefix}/lib/libNeXus77.a"
64LIBNEXUS90="${prefix}/lib/libNeXus90.a"
65CFLAGS="@CFLAGS@"
66FFLAGS="@FFLAGS@"
67DEFS="@DEFS@"
68CPPFLAGS="@CPPFLAGS@ -I${prefix}/include"
69LDFLAGS="@LDFLAGS@"
70LIBS="@LIBS@"
71
72OBJS=""
73TARGET="a.out"
74while [ $# -ne 0 ]; do
75    case $1 in
76        -o)
77            shift
78            TARGET=$1
79            ;;
80        *.f90)
81            $F90 $F90FLAGS -c $1
82            OBJS="$OBJS `basename $1 .f90`.o"
83            ;;
84        *.c)
85            $CC $CPPFLAGS $DEFS $CFLAGS -c $1
86            OBJS="$OBJS `basename $1 .c`.o"
87            ;;
88        *.f)
89            $F77 $F77FLAGS -c $1
90            OBJS="$OBJS `basename $1 .f`.o"
91            ;;
92        --help|-h)
93            echo "usage: nxbuild [-o target] file [file...]"
94            echo "usage: nxbuild --help"
95            echo "usage: nxbuild --version"
96            exit
97            ;;
98        --version|-V)
99            echo 'nxbuild $Revision$ for NeXus release' $VERSION
100            echo "Type   nxbuild --help   for usage"
101            exit
102            ;;
103        *)              # *.o, *.a etc
104            OBJS="$OBJS $1"
105            ;;
106    esac
107    shift
108done
109$CC -o $TARGET $LDFLAGS $OBJS $LIBNEXUS $LIBS
Note: See TracBrowser for help on using the repository browser.