summaryrefslogtreecommitdiff
path: root/lib/make/extras/LORENE
diff options
context:
space:
mode:
authorschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-03-31 12:09:42 +0000
committerschnetter <schnetter@17b73243-c579-4c4c-a9d2-2d5706c11dac>2004-03-31 12:09:42 +0000
commit6f0037e562c18c07b07ae006befcad2e3f246cd3 (patch)
treec9ec09fd889d45bb343d5230c286a7f2921e6bf7 /lib/make/extras/LORENE
parentd0bd77905c084487b5b4271331e42a882eb97275 (diff)
Handle the external Lorene library.
git-svn-id: http://svn.cactuscode.org/flesh/trunk@3626 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'lib/make/extras/LORENE')
-rwxr-xr-xlib/make/extras/LORENE/setup.sh61
1 files changed, 61 insertions, 0 deletions
diff --git a/lib/make/extras/LORENE/setup.sh b/lib/make/extras/LORENE/setup.sh
new file mode 100755
index 00000000..3ccae4fc
--- /dev/null
+++ b/lib/make/extras/LORENE/setup.sh
@@ -0,0 +1,61 @@
+#! /bin/sh
+#/*@@
+# @file setup.sh
+# @date Wed 03 Mar 2004
+# @author Erik Schnetter
+# @desc
+# Setup for an external Lorene installation
+# @enddesc
+# @@*/
+
+choose_lorene=`echo $LORENE | tr '[:upper:]' '[:lower:]'`
+
+if [ "X$choose_lorene" = 'Xyes' ]; then
+
+echo 'Configuring with Lorene'
+
+# Work out Lorene's installation directory
+if [ -z "$LORENE_DIR" ]; then
+ echo ' Lorene selected but no LORENE_DIR set. Checking some places...'
+ CCTK_Search LORENE_DIR '/usr /usr/local /usr/local/lorene /usr/local/packages/lorene /usr/local/apps/lorene' Export/C++/Include/bin_bh.h
+ if [ -z "$LORENE_DIR" ] ; then
+ echo ' Unable to locate the Lorene directory - please set LORENE_DIR'
+ exit 2
+ fi
+ echo " Found a Lorene package in $LORENE_DIR"
+else
+ echo " Using Lorene package in $LORENE_DIR"
+fi
+
+
+# Set platform-specific libraries
+if [ -z "$LORENE_LIBS" ]; then
+ LORENE_LIBS='lorene_export lorene lorenef77'
+else
+ echo " Using Lorene libraries '$LORENE_LIBS'"
+fi
+
+# Set the Lorene libs, libdirs and includedirs
+LORENE_LIB_DIRS='$(LORENE_DIR)/Lib $(LORENE_DIR)/Export/BinBH'
+LORENE_INC_DIRS='$(LORENE_DIR)/Export/C++/Include'
+
+
+# Write the data out to the header and make files.
+CCTK_WriteLine cctk_Extradefs.h "#define CCTK_LORENE 1"
+
+CCTK_WriteLine make.extra.defn "LORENE_DIR = $LORENE_DIR"
+CCTK_WriteLine make.extra.defn "LORENE_LIBS = $LORENE_LIBS"
+CCTK_WriteLine make.extra.defn "LORENE_LIB_DIRS = $LORENE_LIB_DIRS"
+CCTK_WriteLine make.extra.defn "LORENE_INC_DIRS = $LORENE_INC_DIRS"
+CCTK_WriteLine make.extra.defn ''
+CCTK_WriteLine make.extra.defn 'LIBS += $(LORENE_LIBS)'
+CCTK_WriteLine make.extra.defn 'LIBDIRS += $(LORENE_LIB_DIRS)'
+CCTK_WriteLine make.extra.defn 'SYS_INC_DIRS += $(LORENE_INC_DIRS)'
+
+elif [ "X$choose_lorene" != 'Xno' -a "X$choose_lorene" != 'X' ]; then
+
+ echo " Don't understand the setting \"LORENE=$LORENE\" !"
+ echo ' Please set it to either "yes" or "no", or leave it blank (same as "no") !'
+ exit 1
+
+fi