Annotation of rpl/scripts/rplcc.in, revision 1.1
1.1 ! bertrand 1: #!/bin/bash
! 2:
! 3: #===============================================================================
! 4: # RPL/2 version @VERSION@
! 5: # Interpréteur du langage de programmation du calculateur HP-28S,
! 6: #
! 7: # Date de création : 02 Avril 1.998
! 8: #
! 9: # Tous droits réservés à l'auteur, Joël BERTRAND
! 10: #===============================================================================
! 11:
! 12: #===============================================================================
! 13: # Copyright (C) 2001 BERTRAND Joël
! 14: #
! 15: # This file is part of RPL/2.
! 16: #
! 17: # RPL/2 is free software; you can redistribute it and/or modify it
! 18: # under the terms of the GNU General Public License as published by the
! 19: # Free Software Foundation; either version 2, or (at your option) any
! 20: # later version.
! 21: #
! 22: # RPL/2 is distributed in the hope that it will be useful, but WITHOUT
! 23: # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
! 24: # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
! 25: # for more details.
! 26: #
! 27: # You should have received a copy of the GNU General Public License
! 28: # along with Octave; see the file COPYING. If not, write to the Free
! 29: # Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
! 30: #===============================================================================
! 31:
! 32: #===============================================================================
! 33: # Script de compilation des bibliothèques partagées du langage RPL/2
! 34: #
! 35: # Tous droits réservés, J. BERTRAND 20.07.2007
! 36: #===============================================================================
! 37:
! 38: #===============================================================================
! 39: # Les paramètres du script sont identiques à ceux de gfortran. Le script
! 40: # crée un objet à partir d'un source C ou Fortran
! 41: #
! 42: # Exemples :
! 43: # rplc -o essai.o essai.c
! 44: #===============================================================================
! 45:
! 46: echo +++Compiler for RPL/2 version @VERSION@
! 47: echo $0 $@
! 48:
! 49: PRESENCE_FICHIER_SORTIE=FAUX
! 50: DRAPEAU=FAUX
! 51: P=1
! 52:
! 53: for i in $@;
! 54: do
! 55: P=$(($P+1))
! 56:
! 57: if [ $DRAPEAU = "VRAI" ]; then
! 58: DRAPEAU=FAUX
! 59: FICHIER_SORTIE=$i
! 60: fi
! 61:
! 62: if [ $i = "-o" ]; then
! 63: if [ $PRESENCE_FICHIER_SORTIE = VRAI ]; then
! 64: echo +++Error: more than one output file
! 65: exit 1
! 66: fi
! 67:
! 68: PRESENCE_FICHIER_SORTIE=VRAI
! 69:
! 70: if [ $P -gt $# ]; then
! 71: echo +++Error: no output file
! 72: exit 1
! 73: else
! 74: DRAPEAU=VRAI
! 75: fi
! 76: fi
! 77: done
! 78:
! 79: if [ $PRESENCE_FICHIER_SORTIE = FAUX ]; then
! 80: echo +++Error: no output file
! 81: exit 1
! 82: fi
! 83:
! 84: PROCESSEUR=$(uname -m)
! 85: test $PROCESSEUR = i386 && OPTIONS=-mieee-fp
! 86: test $PROCESSEUR = i486 && OPTIONS=-mieee-fp
! 87: test $PROCESSEUR = i586 && OPTIONS=-mieee-fp
! 88: test $PROCESSEUR = i686 && OPTIONS=-mieee-fp
! 89: test $PROCESSEUR = alpha && OPTIONS=-mieee
! 90: test $PROCESSEUR = sparc && OPTIONS=
! 91: test $PROCESSEUR = i86pc && OPTIONS=
! 92:
! 93: ARGUMENTS_G77=""
! 94:
! 95: for i in $@;
! 96: do
! 97: ARGUMENTS_G77="$ARGUMENTS_G77 $i"
! 98: done
! 99:
! 100: P=0
! 101: for i in $(which $0 | tr '/' ' ');
! 102: do
! 103: P=$(($P+1))
! 104: done
! 105:
! 106: gfortran -c $ARGUMENTS_G77 -DRPLCONFIG $OPTIONS $CFLAGS\
! 107: -I$(which $0 | cut -d '/' -f -$(($P-1)))/include -funsigned-char
! 108:
! 109: exit 0
CVSweb interface <joel.bertrand@systella.fr>