sit/packages/libs/nanox/nanox-any

97 lines
2.7 KiB
Bash

#!/bin/sh
# sit class file
#
# Christoph Niethammer <niethammer@hlrs.de> (C) 2013
# Jose Gracia <gracia@hlrs.de>
#
# libs/nanox and compiler/mcxx **together** form the package compiler/ompss
#
# install instructions:
# * decide on a version number for the user-visible package,
# e.g. the nanox version, and set OMPSS_VERSION=xxx
# * choose a nanox version
# * dependencies:
# * HWLOC_HOME=/opt/compiler/ompss/common; PATH=$HWLOC_HOME/bin/:$PATH
# * module load performance/extrae
# * install libs/nanox with:
# NANOX_VERSION=0.7a-2014-04-10 VERSION=$OMPSS_VERSION \
# COMPILER=gnu CATEGORY=compiler PREFIX_BASE=$YOUR_PREFIX_BASE
# enable_ayudame=0 enable_extrae=0 ./sit libs/nanox/nanox-any
# set NANOX_HOME pointing to this install dir
# * install compilers/mcxx (see there)
: ${CATEGORY:="compiler"}
: ${PACKAGE:="ompss"}
# if VERSIOn not set assume 1.0
: ${VERSION:="0.7a-2014-04-10"}
: ${NANOX_PACKAGE:="nanox"}
# if VERSIOn not set assume 1.0
: ${NANOX_VERSION:=${VERSION}}
URL="http://nanos.ac.upc.edu"
INSTALLER="Christoph Niethammer <niethammer@hlrs.de>"
# Archive A and package name P
A=${NANOX_PACKAGE}-${NANOX_VERSION}.tar.gz
P=${NANOX_PACKAGE}-${NANOX_VERSION%%-*} # remove date suffix starting from first '-'
# enable instrumentation (0|1)
enable_extrae=${enable_extrae:=1}
# build with ayudame support (0|1)
enable_ayudame=${enable_ayudame:=0}
# build with debugging symbols (0|1)
enable_debug=${enable_debug:=0}
# enable hwloc
enable_hwloc=${enable_hwloc:=1}
# disable hardcoding library paths / rpath
disable_rpath=${disable_rpath:=1}
# Other interesting configure options:
#CONFIGURE_OPTS=" \
# --enable-shared \
# CFLAGS=\" -dynamic -fPIC\" \
# CXXFLAGS=\" -dynamic -fPIC\" \
# FFLAGS=\" -dynamic -fPIC\" \
# "
CONFIGURE_OPTS=" \
LDFLAGS=-dynamic \
--enable-shared \
"
#COMPILER_OPTS=" CC=\"cc -dynamic -fPIC\" CXX=\"CC -dynamic -fPIC\" FC=\"ftn -dynamic -fPIC\" "
if [ $enable_debug == 1 ] ; then
COMPILER_OPTS+=" CFLAGS=-g CXXFLAGS=-g CPPFLAGS=-g LDFLAGS=-g"
fi
if [ $enable_extrae == 1 ] ; then
#module load performance/extrae
echo "Building with EXTRAE_HOME=$EXTRAE_HOME"
CONFIGURE_OPTS+=" --with-extrae=$EXTRAE_HOME"
fi
if [ $enable_ayudame == 1 ] ; then
module load debugger/temanejo
echo "Building with TEMANEJO_HOME=$AYUDAME_HOME"
CONFIGURE_OPTS+=" --with-ayudame=$TEMANEJO_HOME"
fi
if [ $enable_hwloc == 1 ] ; then
echo "Building with hwloc"
HWLOC_DIR=$(dirname $(dirname $(which hwloc-ls)))
CONFIGURE_OPTS+=" --with-hwloc=$HWLOC_DIR"
fi
if [ $disable_rpath == 1 ] ; then
CONFIGURE_OPTS+=" --disable-rpath"
fi
src_pretest() {
/bin/true
}