#!/bin/sh
sed -e 's/CG4/CG8/g' -e 's/cg4/cg8/g' ddx/sun/sunCG4C.c > ddx/sun/sunCG8C.c
patch -p1 < cg8.diff
if [ -f /usr/include/sundev/cg9reg.h ]; then
  sed -e 's/CG8/CG9/g' -e 's/cg8/cg9/g' ddx/sun/sunCG8C.c > ddx/sun/sunCG9C.c
  patch -p1 < cg9.diff
fi
make Makefile
make Makefiles
make depend
make Xsun
