version 1.2, 2010/04/21 13:45:43
|
version 1.13, 2016/10/12 09:14:16
|
Line 1
|
Line 1
|
#!/bin/bash |
#!@BASH_PATH@ |
|
|
#=============================================================================== |
#=============================================================================== |
# RPL/2 version @VERSION@ |
# RPL/2 version @VERSION@ |
Line 53 PRESENCE_OPTION_STRIP=FAUX
|
Line 53 PRESENCE_OPTION_STRIP=FAUX
|
COMPILATION_SEULE=FAUX |
COMPILATION_SEULE=FAUX |
DRAPEAU=FAUX |
DRAPEAU=FAUX |
P=1 |
P=1 |
|
RPLC_MAIN= |
|
|
for i in $@; |
for i in $@; |
do |
do |
Line 82 do
|
Line 83 do
|
if [ $i = "-c" ]; then |
if [ $i = "-c" ]; then |
COMPILATION_SEULE=VRAI |
COMPILATION_SEULE=VRAI |
fi |
fi |
|
|
|
if [ -e "$i" ]; then |
|
if [ $(rplfile -m $(dirname $(which $0))/../share/rplfiles $i | \ |
|
grep "C source" | wc -l) = 1 ]; then |
|
if [ $(grep exportExternalFunctions $i | wc -l) = 1 ]; then |
|
RPLC_MAIN=-D__RPLC_MAIN |
|
fi |
|
fi |
|
fi |
|
|
done |
done |
|
|
if [ $PRESENCE_FICHIER_SORTIE = FAUX ]; then |
if [ $PRESENCE_FICHIER_SORTIE = FAUX ]; then |
Line 94 test $PROCESSEUR = i386 && OPTIONS=-miee
|
Line 105 test $PROCESSEUR = i386 && OPTIONS=-miee
|
test $PROCESSEUR = i486 && OPTIONS=-mieee-fp |
test $PROCESSEUR = i486 && OPTIONS=-mieee-fp |
test $PROCESSEUR = i586 && OPTIONS=-mieee-fp |
test $PROCESSEUR = i586 && OPTIONS=-mieee-fp |
test $PROCESSEUR = i686 && OPTIONS=-mieee-fp |
test $PROCESSEUR = i686 && OPTIONS=-mieee-fp |
|
test $PROCESSEUR = x86_64 && OPTIONS=-mieee-fp |
test $PROCESSEUR = alpha && OPTIONS=-mieee |
test $PROCESSEUR = alpha && OPTIONS=-mieee |
test $PROCESSEUR = sparc && OPTIONS= |
test $PROCESSEUR = sparc && OPTIONS= |
test $PROCESSEUR = i86pc && OPTIONS= |
test $PROCESSEUR = i86pc && OPTIONS= |
Line 115 do
|
Line 127 do
|
P=$(($P+1)) |
P=$(($P+1)) |
done |
done |
|
|
|
if [ $(uname -o) = Cygwin ]; then |
|
RELOC= |
|
EXE_A=$(which rpl)/../lib/rpl.exe.a |
|
else |
|
RELOC=-fPIC |
|
EXE_A= |
|
fi |
|
|
if [ $COMPILATION_SEULE = "VRAI" ]; then |
if [ $COMPILATION_SEULE = "VRAI" ]; then |
echo +++Compiler for RPL/2 version @VERSION@ |
echo +++Compiler for RPL/2 version @VERSION@ |
gfortran -x c $ARGUMENTS_G77 -fPIC -Wall -DRPLCONFIG $OPTIONS $CFLAGS\ |
gfortran -x c $ARGUMENTS_G77 $RELOC -Wall -DRPLCONFIG $OPTIONS $CFLAGS\ |
-I$(which $0 | cut -d '/' -f -$(($P-1)))/include -funsigned-char |
-I$(which $0 | cut -d '/' -f -$(($P-1)))/include -funsigned-char\ |
|
-D_d_version_rpl=\"@VERSION@\" -std=gnu99 $RPLC_MAIN |
else |
else |
echo +++Linker for RPL/2 version @VERSION@ |
echo +++Linker for RPL/2 version @VERSION@ |
gfortran $ARGUMENTS_G77 -shared -fPIC -Wall -DRPLCONFIG $OPTIONS $CFLAGS\ |
gfortran $ARGUMENTS_G77 $EXE_A -shared $RELOC -Wall -DRPLCONFIG $OPTIONS\ |
-I$(which $0 | cut -d '/' -f -$(($P-1)))/include -funsigned-char |
$LDFLAGS\ |
|
-I$(which $0 | cut -d '/' -f -$(($P-1)))/include -funsigned-char\ |
|
$RPLC_MAIN |
fi |
fi |
|
|
test $PRESENCE_OPTION_STRIP = VRAI && strip -s $FICHIER_SORTIE |
test $PRESENCE_OPTION_STRIP = VRAI && strip -s $FICHIER_SORTIE |
chmod 644 $FICHIER_SORTIE |
|
|
if [ $(uname -o) = Cygwin ]; then |
|
chmod 755 $FICHIER_SORTIE |
|
else |
|
chmod 644 $FICHIER_SORTIE |
|
fi |
|
|
exit 0 |
exit 0 |