| 1 | #!/bin/shscip-shell filesystem . . `/bin/sh`. |
| 2 | shift |
| 3 | library=`basenamescip-shell system . . basename. $1 .a` |
| 4 | library=`basenamescip-shell system . . basename. $library .a` |
| 5 | rmscip-shell system . . rm. -f $library.exp $library.o |
| 6 | # |
| 7 | # In AIX 3.2 use one of the next three lines |
| 8 | #/usr/ucb/nm -p $library.a | grep ' [BD] ' | cut -c12- | sort -u > $library.exp |
| 9 | #/usr/ucb/nm -p $library.a | grep ' [BD] ' | cut -c14- | sort -u > $library.exp |
| 10 | #nm $library.a | awk -F\| '{if ($3 == "extern" && $7 == ".bss") print $1 ; if ($3 =="extern" && $7 == ".data") print $1}' | awk '{print $1}' > $library.exp |
| 11 | # |
| 12 | # In AIX 4.1 use one of the next three lines |
| 13 | /usr/bin/nmscip-shell filesystem . . `/usr/bin/nm`. -p $library.a | grepscip-shell system . . grep. ' [BD] ' | awkscip-shell system . . awk. '{print $1}' | sortscip-shell system . . sort. -u > $library.exp |
| 14 | |
| 15 | shift |
| 16 | if [scip-shell system . . `[`. "$library" = "libmidas" ]; then |
| 17 | ldscip-shell system . . ld. -o $library.o $* -bE:$library.exp -bM:SRE -T512 -H512 -lc -lm |
| 18 | else |
| 19 | ldscip-shell system . . ld. -o $library.o $* -bE:$library.exp -bM:SRE -T512 -H512 -L. -lmidas -lc -lm |
| 20 | fi |
| 21 | rmscip-shell system . . rm. -f $library.a $library.exp |
| 22 | arscip-shell system . . ar. rv $library.a $library.o |
| 23 | rmscip-shell system . . rm. -f $library.o |
| 24 | ranlibscip-shell system . . ranlib. $library.a |