#! /bin/sh
#$Header:samake 12.0$
#$ACIS:samake 12.0$
#$Source: /ibm/acis/usr/sys/standca/RCS/samake,v $
#
# invoke make with the appropriate makefile for standalone
# generation
#
#
# important note: This version of "samake" is designed to be 
# invoked from within the standca directory; to use from another
# (user) directory delete the STANDIR and LIBSA argument's to "make"
#
CPU="${CPU--DIBMRTPC -DROMPC -DMOD135 -UATR}"
# following is to work around bug in hc where -Dmain=_main -Umain 
# results in main being defined as _main
case "$FLAGS" in
*-Umain*)
	FLAGS="$CPU -DSTANDALONE -DDEBUG $FLAGS"
	;;
*)
	FLAGS="-Dmain=_main $CPU -DSTANDALONE -DDEBUG $FLAGS"
	;;
esac
case $# in
	0)	exec /bin/make -f samakefile "FLAGS=$FLAGS" STANDIR=. LIBSA=libsa.a
		;;
	*)	exec /bin/make -f samakefile "FLAGS=$FLAGS" STANDIR=. LIBSA=libsa.a "$@"
		;;
esac
