Lines 1-15
Link Here
|
1 |
#!/bin/sh |
1 |
#!/bin/sh |
2 |
|
2 |
|
3 |
if [ $# != 1 ]; then |
|
|
4 |
echo 'usage: 9a file.s' 1>&2 |
5 |
exit 1 |
6 |
fi |
7 |
|
8 |
aflags="" |
3 |
aflags="" |
9 |
case "`uname`" in |
4 |
case "`uname`" in |
10 |
Darwin) |
5 |
Darwin) |
11 |
aflags="-arch `arch`" |
6 |
aflags="-arch `arch`" |
12 |
esac |
7 |
esac |
13 |
|
8 |
|
14 |
out=`echo $1 | sed 's/\.s$//;s/$/.o/'` |
9 |
for arg; do |
15 |
exec as $aflags -o $out $1 |
10 |
case $arg in |
|
|
11 |
-*) |
12 |
opts="$opts $arg" |
13 |
;; |
14 |
*.s) |
15 |
src=$arg |
16 |
dst=$(echo $arg | sed 's/\.s/\.o/') |
17 |
;; |
18 |
esac |
19 |
done |
20 |
|
21 |
exec as $aflags $opts -o $dst $src |