/[pdpsoft]/tags/llrun_R_0_1_0_1/build.sh
ViewVC logotype

Contents of /tags/llrun_R_0_1_0_1/build.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2096 - (show annotations) (download) (as text)
Thu Nov 18 15:25:05 2010 UTC (11 years, 10 months ago) by msalle
File MIME type: application/x-shellscript
File size: 1556 byte(s)
First official version of llrun (formerly lcaslcmaps_get_account_cli.c).
- able to handle three different LCMAPS interfaces
- compatible with glexec 0.8 (and before)

1 #!/bin/sh
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14 #
15 # Authors: Mischa Sall\'e, Oscar Koeroo
16 # NIKHEF Amsterdam, the Netherlands
17 # <grid-mw-security@nikhef.nl>
18 #
19
20 # Default target and source
21 TARGET=llrun
22 SOURCE=llrun.c
23
24 # Default compiler
25 CC=${CC:-cc}
26
27 CFLAGS=${CFLAGS:-}
28
29 # Determine platform and type of C compiler
30 PLATFORM=`uname -s`
31 $CC --version 2>/dev/null | grep -i gcc > /dev/null && GCC=yes || GCC=no
32
33 # Set platform dependent linker flags
34 if [ "$PLATFORM" = "Darwin" ]
35 then
36 EXTLIB=libvomsfix.dylib
37 LDEXTRA="-Wl,-dylib_install_name -Wl,./$EXTLIB"
38 else
39 EXTLIB=libvomsfix.so
40 LDEXTRA="-Wl,-soname,./$EXTLIB"
41 fi
42
43 # Compile: only gnu with ELF supports rdynamic, seems OK on Darwin...
44 if [ \( "$PLATFORM" = "Linux" -o "$PLATFORM" = "Darwin" \) -a "$GCC" = "yes" ]
45 then
46 cmd="$CC $CFLAGS -Wall -rdynamic -ldl -o $TARGET $SOURCE"
47 else
48 cmd="$CC $CFLAGS -fPIC -shared $LDEXTRA -o $EXTLIB vomsfix.c && \
49 $CC $CFLAGS -L. -lvomsfix -ldl -o $TARGET $SOURCE"
50 fi
51
52 # Print and execute compile command
53 echo $cmd
54 eval $cmd
55
56
57

Properties

Name Value
svn:executable *

grid.support@nikhef.nl
ViewVC Help
Powered by ViewVC 1.1.28