blob: fa2474e8b3566c596d57132528f0a2af5fdb1fe6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
#! /bin/sh
if [ ! -f netinet/done ] ; then
echo "Do NOT run this script directly, do 'make solaris'!"
exit 1
fi
# $Id: buildsunos,v 2.1.2.1 1999/08/08 13:55:20 darrenr Exp $
:
rev=`uname -r | sed -e 's/^\([^\.]*\)\..*/\1/'`
if [ -d /usr/ccs/bin ] ; then
PATH=/usr/ccs/bin:${PATH}
fi
if [ $rev = 5 ] ; then
cpu=`uname -p`
cpudir=${cpu}-`uname -r`
solrev=`uname -r | sh -c 'IFS=. read j n x; echo $n'`
if [ ! -d SunOS5/${cpudir} -a ! -h SunOS5/${cpudir} ] ; then
mkdir -p SunOS5/${cpudir}
fi
/bin/rm -f SunOS5/${cpudir}/Makefile
/bin/rm -f SunOS5/${cpudir}/Makefile.ipsend
ln -s `pwd`/SunOS5/Makefile SunOS5/${cpudir}/Makefile
ln -s `pwd`/SunOS5/Makefile.ipsend SunOS5/${cpudir}/Makefile.ipsend
ARCHINC=
XARCH=
if [ -d /opt/SUNWspro/bin ] ; then
CC="/opt/SUNWspro/bin/cc ${CFL}"
export CC
/bin/optisa sparcv9 >/dev/null 2>&1
if [ $? -eq 0 ] ; then
ARCHINC="-I/usr/include/v9"
XARCH="-xarch=v9 -xchip=ultra -dalign -xcode=abs32"
fi
else
CC=gcc
fi
else
cpu=`uname -m`
cpudir=${cpu}-`uname -r`
fi
if [ $cpu = i386 ] ; then
make ${1+"$@"} sunos5x86 SOLARIS2="-DSOLARIS2=$solrev" CPU= CPUDIR=${cpudir} CC="$CC $XARCH" XARCH="$XARCH" ARCHINC="$ARCHINC"
exit $?
fi
if [ x$solrev = x ] ; then
make ${1+"$@"} sunos$rev "ARCH=`uname -m`"
exit $?
fi
make ${1+"$@"} sunos$rev SOLARIS2="-DSOLARIS2=$solrev" CPU= CPUDIR=${cpudir} CC="$CC $XARCH" XARCH="$XARCH" ARCHINC="$ARCHINC"
exit $?
|