GEOM = ../../../../..
include ${GEOM}/makefiles/Makedefs.global
include ../Makedefs
include ../../common/Makedefs.common

MORECOPTS = -I../../common -I../common -Ddark_ui
# Using ${LIBDIR}/libstubdraw.a rather than -lstubdraw
# works around some sort of bug in gcc's ld, which causes a core dump.
# -lstubdraw isn't really a library, just an object file.
LIBS = -L${LIBDIR} -lgeomutil ${LIBDIR}/libstubdraw.a ${ALLOOGLLIBS} \
		-lmib -lm ${SYSXLIBS} ${SYSLIBS}

all:  ${TARGETS}

${COMMON_OBJS}:
	rm -f $@ ${@:o=c}
	ln ../../common/${@:o=c} .
	${CC} ${CFLAGS} -c ${@:o=c}

pssnap:  ${COMMON_OBJS} ${OBJS}
	/bin/rm -f $@ ../$@
	${CC} ${CFLAGS} -o $@ ${OBJS} ${COMMON_OBJS} ${LIBS}
	ln $@ ..

install:  install_module

install_module:  pssnap
	${INSTALLMODULE} pssnap ../.geomview-pssnap ${MODULEDIR}

include ${GEOM}/makefiles/Makerules.obj
include ${MKDEPFILE}

