plan9port/bin/9l

18 lines
326 B
Bash
Executable file

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