comparison mkoctfile.in @ 3180:c17387059fd3

[project @ 1998-09-24 18:59:11 by jwe]
author jwe
date Thu, 24 Sep 1998 19:00:19 +0000
parents fccab8e7d35f
children 98d0ee053ba4
comparison
equal deleted inserted replaced
3179:f657159c8152 3180:c17387059fd3
42 f77files= 42 f77files=
43 objfiles= 43 objfiles=
44 octfiles= 44 octfiles=
45 octfile= 45 octfile=
46 incflags= 46 incflags=
47 defs=
47 ldflags= 48 ldflags=
48 dbg=: 49 dbg=:
49 strip=false 50 strip=false
50 51
51 if [ $# -eq 0 ]; then 52 if [ $# -eq 0 ]; then
81 82
82 Options: 83 Options:
83 84
84 -h, -? --help Print this message. 85 -h, -? --help Print this message.
85 -IDIR Add -IDIR to compile commands. 86 -IDIR Add -IDIR to compile commands.
87 -DDEF Add -DDEF to compile commands.
86 -lLIB Add library LIB to link command. 88 -lLIB Add library LIB to link command.
87 -LDIR Add -LDIR to link command. 89 -LDIR Add -LDIR to link command.
88 -o FILE, --output FILE Output file name. Default extension is .oct. 90 -o FILE, --output FILE Output file name. Default extension is .oct.
89 -s, --strip Strip output file. 91 -s, --strip Strip output file.
90 -v, --verbose Echo commands as they are executed. 92 -v, --verbose Echo commands as they are executed.
102 EOF 104 EOF
103 exit 0 105 exit 0
104 ;; 106 ;;
105 -I*) 107 -I*)
106 incflags="$incflags $1" 108 incflags="$incflags $1"
109 ;;
110 -D*)
111 defs="$defs $1"
107 ;; 112 ;;
108 -[lL]*) 113 -[lL]*)
109 ldflags="$ldflags $1" 114 ldflags="$ldflags $1"
110 ;; 115 ;;
111 -o | --output) 116 -o | --output)
155 if [ -n "$cfiles" ]; then 160 if [ -n "$cfiles" ]; then
156 for f in $cfiles; do 161 for f in $cfiles; do
157 b=`echo $f | sed 's,\.c$,,'` 162 b=`echo $f | sed 's,\.c$,,'`
158 o=$b.o 163 o=$b.o
159 objfiles="$objfiles $o" 164 objfiles="$objfiles $o"
160 $dbg $CC -c $CPPFLAGS $CPICFLAG $ALL_CFLAGS $incflags $f -o $o 165 $dbg $CC -c $CPPFLAGS $CPICFLAG $ALL_CFLAGS $incflags $defs $f -o $o
161 eval $CC -c $CPPFLAGS $CPICFLAG $ALL_CFLAGS $incflags $f -o $o 166 eval $CC -c $CPPFLAGS $CPICFLAG $ALL_CFLAGS $incflags $defs $f -o $o
162 done 167 done
163 fi 168 fi
164 169
165 if [ -n "$ccfiles" ]; then 170 if [ -n "$ccfiles" ]; then
166 for f in $ccfiles; do 171 for f in $ccfiles; do
175 b=`echo $f | sed 's,\.cpp$,,'` 180 b=`echo $f | sed 's,\.cpp$,,'`
176 ;; 181 ;;
177 esac 182 esac
178 o=$b.o 183 o=$b.o
179 objfiles="$objfiles $o" 184 objfiles="$objfiles $o"
180 $dbg $CXX -c $CPPFLAGS $CXXPICFLAG $ALL_CXXFLAGS $incflags $f -o $o 185 $dbg $CXX -c $CPPFLAGS $CXXPICFLAG $ALL_CXXFLAGS $incflags $defs $f -o $o
181 eval $CXX -c $CPPFLAGS $CXXPICFLAG $ALL_CXXFLAGS $incflags $f -o $o 186 eval $CXX -c $CPPFLAGS $CXXPICFLAG $ALL_CXXFLAGS $incflags $defs $f -o $o
182 done 187 done
183 fi 188 fi
184 189
185 # Link all the object files. 190 # Link all the object files.
186 191