# This makefile describes how to build dvi2ps 
#
# Local adaptions for BSD4.1
#BSD4.1 = -DBSD4.1
BSD4.1=
# The following file and directory specifications may need changing at
# your site:
#
# where are the bitmaps stored?
PXLAREA=/usr/lib/tex/fonts/pk
# 2nd is for the Linotron
#
# where are the tfm files stored?
FONTAREA=/usr/lib/tex/fonts
#
# where is the header file to be found?
HDRFILE=/usr/lib/tex/ps/tex.ps
#
#where are the tex->postscript font maps to be found?
FONTMAP=TeXPSfonts.map
#
# where is the software to be installed
BINAREA=/usr/common/appl/tex82/texbinaries
#
# an Apollo-specific spool file
SPOOLFILE=/usr/spool/laserwriter/apollo
#
# the amount of virtual memory of the laserwriter (use -b option for Linotron)
BUDGET=100000
#
# pxl or pk files?
PXL=PK

CF = -O
CFLAGS = -DFONTAREA=\"${FONTAREA}\" \
         -DSPOOLFILE=\"${SPOOLFILE}\" ${BSD4.1} -D$(PXL) \
	 -DBUILTIN -DFONTMAP=\"${FONTMAP}\" ${CF} \
	 -DBUDGET=$(BUDGET) \
	 -DPXLAREA=\"$(PXLAREA)\" \
	 -DHDRFILE=\"$(HDRFILE)\"

all: dvi2ps tex.ps

dvi2ps:	dvi2ps.o findfile.o
	cc ${CFLAGS} -o dvi2ps dvi2ps.o findfile.o

dvi2ps.o: dvi2ps.c commands.h
	cc ${CFLAGS} -c -o dvi2ps.o dvi2ps.c

findfile.o: findfile.c findfile.h

tex.ps:	tex.pro
	./squeeze <tex.pro >tex.ps

install: all
	install -s -m 755 dvi2ps ${BINAREA}/dvi2ps
	cp tex.ps ${HDRFILE}

