From dbd7b9a97eede27e707a279114305d7591d371fc Mon Sep 17 00:00:00 2001 From: rsc Date: Sun, 23 Nov 2003 18:29:08 +0000 Subject: various shell script fixes. add 9a, 9c, 9l wrapper scripts. label sets label on xterm/9term --- bin/9c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100755 bin/9c (limited to 'bin/9c') diff --git a/bin/9c b/bin/9c new file mode 100755 index 00000000..dc9cc3d8 --- /dev/null +++ b/bin/9c @@ -0,0 +1,33 @@ +#!/bin/sh + +usegcc() +{ + cc=gcc + cflags=" \ + -O2 \ + -I$PLAN9/include \ + -c \ + -ggdb \ + -Wall \ + -Wno-parentheses \ + -Wno-missing-braces \ + -Wno-switch \ + " +} + +cc=none +tag="`uname`-`uname -m`-${CC:-cc}" +case "$tag" in +*BSD*) usegcc ;; +*Darwin*) usegcc ;; +*HP-UX*) cc=cc; cflags="-g -O -c -Ae" ;; +*Linux*) usegcc ;; +*OSF1*) cc=cc; cflags="-g -O -c" ;; +*SunOS*-cc) cc=cc; cflags="-g -O -c -xCC -D__sun__" ;; +*SunOS*-gcc) usegcc ;; +*) + echo 9c does not know how to compile on "$tag" 1>&2 + exit 1 +esac + +exec cc $cflags "$@" -- cgit v1.2.3