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 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
|
#!/bin/sh
if test "$CONFIGURE " != "YES "
then
echo
echo Error: Wrong usage
echo
echo You must run `dirname $0`/configure instead of $0
exit 1
fi
if test "`ls .` " != " "
then
echo Error: Current directory must be empty
exit 1
fi
if test "`uname -p`" = "sparc"
then
KERNEL32=sparc
KERNEL64=sparcv9
KERNEL32FLAGS=-U
KERNEL64FLAGS=-K
else
if test "`uname -r`" = "5.9"
then
KERNEL32=i386
KERNEL64=NULL
KERNEL32FLAGS=
KERNEL64FLAGS=
else
KERNEL32=i386
KERNEL64=amd64
KERNEL32FLAGS=
KERNEL64FLAGS=-K
fi
fi
ln -s $SRCDIR/setup/SunOS/build.sh build.sh
ln -s $SRCDIR origdir
ln -s $SRCDIR/misc/samples/ddksample .
echo SRCDIR=$SRCDIR>.directories
echo > .nocopy
# Check if SADA headers are present in the system.
if test -f /usr/include/sys/audiovar.h
then
HAVE_SADA=1
export HAVE_SADA
else
echo
echo Warning! oss_sadasupport cannot be compiled in systems that have
echo Boomer installed.
echo
fi
# Make the 32bit kernel drivers
mkdir $KERNEL32
echo "cd $KERNEL32;sh $SRCDIR/setup/setupdir.sh -A$KERNEL32 $KERNEL32FLAGS"
(cd $KERNEL32;sh $SRCDIR/setup/setupdir.sh -A$KERNEL32 $KERNEL32FLAGS)
# If KERNEL64 is specified then do both 32 and 64bit
if test "$KERNEL64" != "NULL"
then
mkdir $KERNEL64
echo "cd $KERNEL64;sh $SRCDIR/setup/setupdir.sh -A$KERNEL64 $KERNEL64FLAGS"
(cd $KERNEL64;sh $SRCDIR/setup/setupdir.sh -A$KERNEL64 $KERNEL64FLAGS)
# Make sure both 32 and 64 bit versions share the same timestamp.h file.
cp $KERNEL32/kernel/framework/include/timestamp.h $KERNEL64/kernel/framework/include/timestamp.h
cat > Makefile <<THE_END_IS_NEAR
# Autogenerated file - do not edit
all: $KERNEL32/kernel/framework/include/buildid.h subdirs build
install: all
rm -f prototype/kernel/drv/*.conf
cp -R prototype/* /
sync
soundoff
sync
soundon
sync
subdirs:
cd $KERNEL32;make
cd $KERNEL64;make
build:
sh build.sh
copy: all
rm -f prototype/kernel/drv/*.conf
cp -R prototype/* /
package: all
sh $KERNEL32/setup/SunOS/mkpkg.sh
clean:
cd $KERNEL32;make clean
cd $KERNEL64;make clean
rm -f *.pkg
rm -rf prototype
config:
cd $KERNEL32;make config CONFIG_FLAGS=-A$KERNEL32
cd $KERNEL64;make config CONFIG_FLAGS="-A$KERNEL64 -K"
THE_END_IS_NEAR
else # Do just the 32bit kernel
cat > Makefile <<THE_END_IS_NEAR
# Autogenerated file - do not edit
all: $KERNEL32/kernel/framework/include/buildid.h subdirs build
install: all
rm -f prototype/kernel/drv/*.conf
cp -R prototype/* /
sync
soundoff
sync
soundon
sync
subdirs:
cd $KERNEL32;make
build:
sh build.sh
copy: all
rm -f prototype/kernel/drv/*.conf
cp -R prototype/* /
package: all
sh $KERNEL32/setup/SunOS/mkpkg.sh
clean:
cd $KERNEL32;make clean
rm -f *.pkg
rm -rf prototype
config:
cd $KERNEL32;make config CONFIG_FLAGS=-A$KERNEL32
THE_END_IS_NEAR
fi
rm -f .nocopy
#
# Check if some mandatory Solaris packages have been installed
#
MISSING=""
for n in SUNWgcc SUNWaudh SUNWusbu
do
if pkginfo -q $n
then
OK=1
else
MISSING="$MISSING $n"
fi
done
if test "$MISSING " != " "
then
echo
echo Some required Solaris packages may be missing. You can install them
echo by doing:
echo
for n in $MISSING
do
echo pkg install $n
done
fi
exit 0
|