GEOM = ../../../..
include ${GEOM}/makefiles/Makedefs.global
include ../Makedefs
include ${GEOM}/makefiles/Makerules.obj
include ${MKDEPFILE}

LIBS = ${ALLOOGLLIBS} ${MGLIBS} ${SYSXLIBS} ${SYSLIBS} -lm
MORECOPTS = ${MGTYPE}

all:	${TARGETS}

# The odd "sed" below removes -lXt and -lXmu from the library list.
# On Suns (using shared libraries), this avoids a
# spurious un-definition of __XtInherit.  Normal applications actually use
# ordinary Xt facilities, e.g. XtToolkitInitialize(), so XtInherit is
# incorporated properly, but this mgexample program uses no widgets at all.

${TARGETS}:	${OBJS}
	/bin/rm -f $@ ../$@
	${CC} ${CFLAGS} -o $@ ${OBJS} `echo "${LIBS}" | sed -e 's/-lXt / /g' -e 's/-lXmu / /g'`
	${LNEXE} $@ ..


${TARGETS}: ${LIBDIR}/libmg.a
