Joren's new library make system (minus Makefiles)
This commit is contained in:
@@ -5,15 +5,18 @@
|
||||
# only optimizes scratch register allocation a bit with -O. To the 32-bit
|
||||
# compiler -O is a no-op.)
|
||||
|
||||
case $#:$1 in
|
||||
1:*.fc) ;;
|
||||
case $#:$2 in
|
||||
2:*.fc) ;;
|
||||
*) echo "$0: $1: not a FC file" >&2; exit 1
|
||||
esac
|
||||
|
||||
base="`basename "$1" .fc`"
|
||||
dst=$1
|
||||
src=$2
|
||||
base="`basename "$src" .fc`"
|
||||
trap 'rm -f tmp.c tmp.s"; exit 1' 2
|
||||
|
||||
cp "$1" tmp.c &&
|
||||
cp "$src" tmp.c &&
|
||||
cc -O -I. -D_MINIX -D_POSIX_SOURCE -S tmp.c &&
|
||||
sed -f FP.script tmp.s > "$base.s" &&
|
||||
cc -c -o $dst "$base.s" &&
|
||||
rm tmp.c tmp.s
|
||||
|
||||
Reference in New Issue
Block a user