| Line |   | 
|---|
| 1 | #!/bin/sh
 | 
|---|
| 2 | #                                                       Author: Kees J. Bot
 | 
|---|
| 3 | # Compile one soft FP source file.
 | 
|---|
| 4 | # (These files shouldn't be optimized normally, but the 16-bit C compiler
 | 
|---|
| 5 | # only optimizes scratch register allocation a bit with -O.  To the 32-bit
 | 
|---|
| 6 | # compiler -O is a no-op.)
 | 
|---|
| 7 | 
 | 
|---|
| 8 | case $#:$2 in
 | 
|---|
| 9 | 2:*.fc) ;;
 | 
|---|
| 10 | *)      echo "$0: $1: not a FC file" >&2; exit 1
 | 
|---|
| 11 | esac
 | 
|---|
| 12 | 
 | 
|---|
| 13 | dst=$1
 | 
|---|
| 14 | src=$2
 | 
|---|
| 15 | base="`basename "$src" .fc`"
 | 
|---|
| 16 | trap 'rm -f tmp.c tmp.s"; exit 1' 2
 | 
|---|
| 17 | 
 | 
|---|
| 18 | cp "$src" tmp.c &&
 | 
|---|
| 19 | cc -O -I. -D_MINIX -D_POSIX_SOURCE -S tmp.c &&
 | 
|---|
| 20 | sed -f FP.script tmp.s > "$base.s" &&
 | 
|---|
| 21 | cc -c -o $dst "$base.s" &&
 | 
|---|
| 22 | rm tmp.c tmp.s
 | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.