plan9port/bin/9l

19 lines
326 B
Text
Raw Normal View History

#!/bin/sh
extralibs=-lm
2003-11-23 19:49:17 +00:00
tag="`uname`-`uname -m`"
case "$tag" in
*FreeBSD*) ld=gcc ;;
*BSD*) ld=gcc ;;
*Linux*) ld=gcc ;;
*Darwin*) ld=gcc ;;
2003-11-23 19:49:17 +00:00
*SunOS*) ld=${CC9:-cc}
extralibs="$extralibs -lrt -lpthread -lsocket -lnsl"
;;
*)
echo do not know how to link on "$tag" 1>&2
exit 1
esac
2003-11-23 19:49:17 +00:00
exec $ld -L$PLAN9/lib "$@" $extralibs