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

COPTS = -I.		# Hack so "make depend" looks in geomview/gl directory.

_all:		all
_gvx:		gvx
_clang:		clang

all install gvx: clang

all:	geomview

install:	all install_script

_always:

geomview:	_always
	rm -f $@
	g=${GEOMROOT}; g=$${g:-"."}; \
	   sed -e 's|^GEOMROOT=.*$$|GEOMROOT='"$$g|" < geomview-sgi > $@
	chmod +x $@

install_script: demand_GEOMROOT geomview
	sed -e 's|^GEOMROOT=.*$$|GEOMROOT=${GEOMROOT}|' < geomview-sgi > geomview
	${INSTALL} -m 775 -O -v -F ${BINDIR} geomview

FILES:	_do_this

_do_this:
	touch panel.c panel.h

clang:	_always
	@echo "lisp2c ..."
	@${GEOM}/tools/lisp2c -cprefix "gv_" -o clang ${SRCS} ${COMMON_SRCS}
