mars-nwe/examples/mk.li

60 lines
1.0 KiB
Plaintext
Raw Normal View History

2011-11-13 00:38:55 +01:00
#!/bin/sh
2011-11-13 00:38:56 +01:00
# mk.li 30-Jan-96 ###
# please edit this file !
2011-11-13 00:38:55 +01:00
mk()
{
MYBASE=`pwd`;
ERRFILE=$TMP/`basename $MYBASE`.err;
rm -f $ERRFILE;
if [ ! -d obj ] ; then mkdir obj; fi
cd obj;
$MAKE -f ../makefile.unx $@ 2>&1 | tee $ERRFILE;
cd ..;
chmod 666 $ERRFILE
}
2011-11-13 00:38:56 +01:00
TOLOWER='tr "[A-Z]" "[a-z]"'
UNX=`uname -s | $TOLOWER`
case $UNX in
linux)
CC=cc;
CCP="cc -E";
# CFLAGS="-pipe -O2 -fomit-frame-pointer"
# problems gcc2.5.8 ^^^^^^^^^^^^^^^^^^^^^
CFLAGS="-pipe"
HOSTCFLAGS="-DLINUX"
NDBMLIB="-ldbm"
NSLLIB=""
MAKE=make
TMP=/tmp
INSTALL=install
;;
########### USL UNIX ##############
unix_sv)
CC=cc
CCP="gcc -E"
CFLAGS="-pipe"
HOSTCFLAGS=""
NDBMLIB="/usr/ucblib/libucb.a"
NSLLIB="-lnsl"
MAKE=gmake
TMP=/tmp
INSTALL=/usr/ucb/install
;;
*) echo "mk.li: Unknown or not supported OS, probably you must set \$UNX"
;;
esac
export CC
export CCP
export CFLAGS
export HOSTCFLAGS
export NDBMLIB
export NSLLIB
export TMP
export INSTALL
2011-11-13 00:38:55 +01:00
mk $@