#!/bin/bash if [ "$check" = "1" ]; then # special settings to compile pluto with gcc 4.0.X export FRIENDFLAG="" if [ "$compiler" = "gcc" ]; then GCC_MAJOR=$(gcc -dumpversion | cut -c 1) GCC_MINOR=$(gcc -dumpversion | cut -c 3) if [ "$GCC_MAJOR" = "4" ]; then if [ "$GCC_MINOR" != "0" ]; then export FRIENDFLAG="-ffriend-injection" fi fi fi cd $SIMPATH/generators if (not_there pluto $SIMPATH/generators/pluto/libPluto.a); then untar pluto $PLUTOVERSION.tar.gz mv pluto $PLUTOVERSION ln -s $PLUTOVERSION pluto cd pluto patch -p0 < ../pluto_v412.patch | tee -a $logfile cp Makefile Makefile.save if [ "$compiler" = "intel" ]; then mysed 'g++' 'icpc' Makefile fi mysed "CXXFLAGS = -Wall" "CXXFLAGS = -Wall ${CXXFLAGS}" Makefile if [ "$platform" = "macosx" ]; then mysed '-g -shared -Wl,-soname,$@' ' -dynamiclib -flat_namespace -single_module -undefined dynamic_lookup' Makefile mysed 'LIBSO = libPluto.so' 'LIBSO = libPluto.dylib' Makefile fi if [ "$system" = "64bit" ]; then mysed 'SOFLAGS =' 'SOFLAGS = -m64' Makefile mysed 'CXXFLAGS = -Wall' 'CXXFLAGS = -Wall -m64' Makefile fi make if [ -e Makefile.save ]; then mv Makefile.save Makefile fi if [ "$platform" = "macosx" ]; then ln -s libPluto.dylib libPluto.so fi rm ../lib/libPluto.* cd ../lib ln -s ../pluto/libPluto.so libPluto.so ln -s ../pluto/libPluto.a libPluto.a if [ "$platform" = "macosx" ]; then ln -s ../pluto/libPluto.dylib libPluto.dylib fi check_all_libraries $SIMPATH/generators/pluto check_success Pluto $SIMPATH/generators/pluto/libPluto.a check=$? fi fi cd $SIMPATH return 1