EXTRA=bibtex dvicopy
PROGS=pooltype tftopl pltotf dvitype
ALLPROGS=$(PROGS) $(EXTRA)

BINDIR=/usr/local/bin

PART=texware
DISTDIR=../ptc-tex/$(PART)
DISTFILES=Makefile pooltype.ch tftopl.ch pltotf.ch dvitype.ch dvicopy.ch bibtex.ch

# dvitype fails on hp9k8 if compiled with -O...
CDEBUGFLAGS=+O1

all:	$(ALLPROGS)

$(PROGS): always
	$(MAKE) -f ../Makefile.generic PROG=$@ PART=$(PART) CDEBUGFLAGS=$(CDEBUGFLAGS) $@

$(EXTRA): always
	$(MAKE) -f ../Makefile.generic PROG=$@ PART=extra CDEBUGFLAGS=$(CDEBUGFLAGS) $@

install: all
	mv $(ALLPROGS) $(BINDIR)

dist:
	$(MAKE) $(MFLAGS) $(DISTFILES)
	-rm -rf $(DISTDIR)
	mkdir $(DISTDIR)
	ln $(DISTFILES) $(DISTDIR)

clean:
	rm -f core *.p *.c *.o *~ *.pool

realclean: clean
	rm -f $(ALLPROGS)

always:
