File:
[local] /
rpl /
scripts /
mkrplso.in
Revision
1.5:
download - view:
text,
annotated -
select for diffs -
revision graph
Fri Aug 6 15:32:56 2010 UTC (14 years, 9 months ago) by
bertrand
Branches:
MAIN
CVS tags:
rpl-4_1_9,
rpl-4_1_8,
rpl-4_1_7,
rpl-4_1_6,
rpl-4_1_5,
rpl-4_1_4,
rpl-4_1_3,
rpl-4_1_2,
rpl-4_1_13,
rpl-4_1_12,
rpl-4_1_11,
rpl-4_1_10,
rpl-4_1_1,
rpl-4_1_0,
rpl-4_0_24,
rpl-4_0_22,
rpl-4_0_21,
rpl-4_0_20,
rpl-4_0_19,
rpl-4_0_18,
rpl-4_0,
HEAD
Cohérence
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 29.03.2001
36: #===============================================================================
37:
38: #===============================================================================
39: # Les paramètres du script sont identiques à ceux de g77. Seul
40: # ajout, l'option -strip retirant la table des symboles de la bibliothèque
41: # dynamique.
42: #
43: # Exemples :
44: # mkrplso essai.c -o essai.rplso -strip
45: # mkrplso essai.c -o essai.rplso -O6
46: # mkrplso essai.c lib.a -o essai.rplso
47: #===============================================================================
48:
49: echo +++RPL/2 @VERSION@ shared library build tool
50:
51: PRESENCE_FICHIER_SORTIE=FAUX
52: PRESENCE_OPTION_STRIP=FAUX
53: COMPILATION_SEULE=FAUX
54: DRAPEAU=FAUX
55: P=1
56:
57: for i in $@;
58: do
59: P=$(($P+1))
60:
61: if [ $DRAPEAU = "VRAI" ]; then
62: DRAPEAU=FAUX
63: FICHIER_SORTIE=$i
64: fi
65:
66: if [ $i = "-o" ]; then
67: if [ $PRESENCE_FICHIER_SORTIE = VRAI ]; then
68: echo +++Error: more than one output file
69: exit 1
70: fi
71:
72: PRESENCE_FICHIER_SORTIE=VRAI
73:
74: if [ $P -gt $# ]; then
75: echo +++Error: no output file
76: exit 1
77: else
78: DRAPEAU=VRAI
79: fi
80: fi
81:
82: if [ $i = "-c" ]; then
83: COMPILATION_SEULE=VRAI
84: fi
85: done
86:
87: if [ $PRESENCE_FICHIER_SORTIE = FAUX ]; then
88: echo +++Error: no output file
89: exit 1
90: fi
91:
92: PROCESSEUR=$(uname -m)
93: test $PROCESSEUR = i386 && OPTIONS=-mieee-fp
94: test $PROCESSEUR = i486 && OPTIONS=-mieee-fp
95: test $PROCESSEUR = i586 && OPTIONS=-mieee-fp
96: test $PROCESSEUR = i686 && OPTIONS=-mieee-fp
97: test $PROCESSEUR = alpha && OPTIONS=-mieee
98: test $PROCESSEUR = sparc && OPTIONS=
99: test $PROCESSEUR = i86pc && OPTIONS=
100:
101: ARGUMENTS_G77=""
102:
103: for i in $@;
104: do
105: if [ $i = "-strip" ]; then
106: PRESENCE_OPTION_STRIP=VRAI
107: else
108: ARGUMENTS_G77="$ARGUMENTS_G77 $i"
109: fi
110: done
111:
112: P=0
113: for i in $(which $0 | tr '/' ' ');
114: do
115: P=$(($P+1))
116: done
117:
118: if [ $COMPILATION_SEULE = "VRAI" ]; then
119: echo +++Compiler for RPL/2 version @VERSION@
120: gfortran -x c $ARGUMENTS_G77 -fPIC -Wall -DRPLCONFIG $OPTIONS $CFLAGS\
121: -I$(which $0 | cut -d '/' -f -$(($P-1)))/include -funsigned-char\
122: -D_d_version_rpl=\"@VERSION@\" -std=gnu99
123: else
124: echo +++Linker for RPL/2 version @VERSION@
125: gfortran $ARGUMENTS_G77 -shared -fPIC -Wall -DRPLCONFIG $OPTIONS $CFLAGS\
126: -I$(which $0 | cut -d '/' -f -$(($P-1)))/include -funsigned-char
127: fi
128:
129: test $PRESENCE_OPTION_STRIP = VRAI && strip -s $FICHIER_SORTIE
130: chmod 644 $FICHIER_SORTIE
131:
132: exit 0
CVSweb interface <joel.bertrand@systella.fr>