INCL	= ../include
GRLIB	= lib/grlib.a
BIN	= bin
DIRS	= utils pixlib progs
# For USG (System V derived) systems, i.e. hpux, uts, enix, etc.
SHELL = /bin/sh
MAKE	= /bin/make $(MFLAGS)

# For System V
#SYS=-Dsys5
# For BSD
SYS	= -Dv4berk

# Where to install the libraries
INSTALL = /usr/local/graphics

# This is not a real target, just provides a node for make to construct
all:
	for dir in $(DIRS) ; do (echo In $$dir: $(MAKE) $(PASSON) SYS=$(SYS) ; \
				 cd $$dir; \
				 $(MAKE) $(PASSON) SYS=$(SYS)); done

install:
	cp bin/* $(INSTALL)/bin
	cp lib/* $(INSTALL)/lib
	cp include/* $(INSTALL)/include
# Need to be root to do this
	cp lib/grlib.a /lib/libgr.a
	chown graphics $(INSTALL)/bin/* $(INSTALL)/lib/* $(INSTALL)/include/*
	chgrp src      $(INSTALL)/bin/* $(INSTALL)/lib/* $(INSTALL)/include/*

clean:
	$(MAKE) PASSON=clean
	rm lib/grlib.a

lint:
	$(MAKE) PASSON=lint
