#
#   Makefile for cgl (nonproprietary RGL) residing on the YMP
#
#
TARGET = /usr/local/lib
BSD = /usr/lib/bsd
#
NEWRGLLIB = libcgl.a
#DEBUG = -DDEBUG
CFLAGS = -c -O ${DEBUG} -DYMP -DCRAY -I../include -I${BSD}

IOOBJS = netio.o netinit.o float.o special.o

all:	${NEWRGLLIB}

${NEWRGLLIB}: libobjs ${IOOBJS} ${NETOBJS}
	ar crv ${NEWRGLLIB} libobjs/*.o ${IOOBJS}

libobjs: libsrc
	cd libsrc; cc ${CFLAGS} -I../../include *.c
	-mkdir libobjs; 
	-mv libsrc/*.o libobjs;

libsrc: hostlibc.ed  hostlibc.c
	mkdir libsrc;
	ed hostlibc.c < hostlibc.ed
	ed hostlibf.c < hostlibf.ed

install: 
	mv ${NEWRGLLIB} ${TARGET}

clean:	
	-rm -rf libsrc 
	-rm -rf libobjs 
	-rm -f *.o

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