#
#
#   Makefile for cgl (nonproprietary RGL) residing on the 4D workstations
#   Also stashes the stuff for building the cgl library on the 
#	remote host in ./hostlib
#
TARGET = /usr/local/lib
NEWRGLLIB = libcgl.a
#
#DEBUG = -DDEBUG -g
IOOBJS = netio.o netinit.o interp.o special.o
INCLUDES = -I../include -I/usr/include/bsd
CFLAGS = -O -c -DIRIS4D -DIRIS -DIEEEHOST ${DEBUG} ${INCLUDES}
LIBS = -lgl_s -lbsd -lm
#
all:	${NEWRGLLIB} cgliris

${NEWRGLLIB}: 	wkslib.o ${IOOBJS}
	ar rvs ./$@ wkslib.o ${IOOBJS}
	ar ts ./$@

cgliris: cgliris.c ${NEWRGLLIB}
	cc -o cgliris cgliris.c ${NEWRGLLIB} ${DEBUG} ${LIBS}

install: 
	mv ${NEWRGLLIB} ${TARGET}
	ranlib ${TARGET}/${NEWRGLLIB}

clean:	
	-rm -rf libsrc libobjs *.o 

clobber:	
	-rm -rf libsrc libobjs *.a *.o 
