# Makefile for get/qcr directory
#
# Probably only compiles on an HP-UX machine
#
# DEST is where to install the tools 
# RI is the include directory for RLE files
# RL is the library directory (for librle.a)

DEST = ../../../bin
RI = ../../include
RL = ../../lib

IFLAGS = -I. -I$(RI)
CFLAGS= -O $(DFLAGS) $(IFLAGS)
LIBES= ../../lib/librle.a -ldvio

# System V make pays attention to the SHELL environment variable. Override it.
SHELL = /bin/sh

PGMS = getqcr.out bright.out qcrldmap.out wedge.out

getqcr.out: qcr.o getqcr.o
	cc -o getqcr.out qcr.o getqcr.o $(LIBES)

bright.out: bright.o qcr.o
	cc -o bright.out bright.o qcr.o -ldvio

qcrldmap.out: qcrldmap.o qcr.o
	cc -o qcrldmap.out qcrldmap.o qcr.o $(LIBES)

wedge.out: wedge.o qcr.o
	cc -o wedge.out wedge.o qcr.o -ldvio

# Incremental install, copies executable to DEST dir.
install: install-pgm
install-pgm: $(PGMS)
	-for i in $? ; do cp $$i $(DEST)/`basename $i .out` ; done
	touch install-pgm

pristine: clean
	-for i in $(PGMS) ; do rm -f $(DEST)/`basename $i .out` ; done

clean: 
	-rm -f *.out *.o errs core m.err
