34 lines · 537 B · Text
RawDownload
#!/bin/sh if [ $# != 1 ]; then	echo 'usage: w32a file.[sS]' 1>&2	exit 1fi test -f $PF9/$objtype/config && . $PF9/$objtype/config out=`echo $1 | sed 's/\.[sS]$//;s/$/.'"$O/"`   # prepend each global symbol with an underscoregsyms=`9 grep '[.]globl' *.s | 9 sed 's,.*globl[ 	]*([^ ]*).*,\1,'` list=for i in $gsyms; do	list="$list|$i"done tmp=/tmp/w32a-$$-`echo $1 | sed 's,/,_,'`cat $1 | 9 sed "s,(knieriem$list),_\1,g" > $tmp if ${TOOLPFX}gcc -o $out -I. -c $tmp; then	rm $tmp	r=0else	rm $out	rm $tmp	r=1fi exit $r