# This is the Makefile for dvi2ps version 3.1
#
# The following file and directory specifications may need changing at
# your site (see also site.h):
#
# Where are the bitmaps stored?  (colon separated list---they are allowed
# to be in subdirectories. See Installation or Features.)
FONTAREA=/usr/local/tex/fonts
#
# Where is the header file?
POSTSCRIPT=/usr/local/tex/DVIware
HDRFILE=${POSTSCRIPT}/dvi2ps.pro
#
# Which file contains the startup information?
STARTUPFILE=.dvi2ps
#
# Where is the table mapping tex font names to Postscript font names?
FONTMAP=${POSTSCRIPT}/psfonts.map
#
# Where are the .tfm files for the built-in fonts?
TFMAREA=/usr/local/tex/fonts/tfm
#
# Where is the software to be installed?
BIN=/usr/local/bin
#
# Where is the manual page to be installed?
MAN=/usr/local/tex/man
MANFILE=${MAN}/dvi2ps.1
#
# An Apollo-specific spool file.
#SPOOLFILE=/usr/spool/lpd/output
#
# See Installation for more information about the DFLAGS variable.
# The EFLAGS variable is unused; it is here to complete the option list.
#
EFLAGS = -DSPOOLFILE=\"${SPOOLFILE}\" -DDEBUG -DUSEGF -DUSEPK
#
DFLAGS = -DFONTAREA=\"${FONTAREA}\" -DHDRFILE=\"${HDRFILE}\" \
         -DFONTMAP=\"${FONTMAP}\" -DTFMAREA=\"${TFMAREA}\" \
         -DSTARTUPFILE=\"${STARTUPFILE}\" -DBUILTIN -DUSEGLOBALMAG -DCREOPT \
          -DSPOOLING -DUSEGETOPT -DBUDGET=90000 -DDENSITY -DSTATS
CFLAGS = -g ${DFLAGS}
LFLAGS = 

OBJS = dvi2ps.o auxiliary.o special.o fontfiles.o findfile.o \
       builtin.o pk.o gf.o pxl.o pagelist.o decode.o prelim.o
SRCS = dvi2ps.c auxiliary.c special.c fontfiles.c findfile.c \
       builtin.c pk.c gf.c pxl.c pagelist.c decode.c prelim.c

all: dvi2ps

dvi2ps:	${OBJS}
	${CC} -o dvi2ps ${OBJS}

texhelp: gethelp.o
	${CC} -o texhelp gethelp.o

install: all
	install -s -m 755 dvi2ps ${BIN}/dvi2ps
	install -m 644 Mapping ${FONTMAP}
	install -m 644 ManualPage ${MANFILE}

instprog: dvi2ps
	install -s -m 755 dvi2ps ${BIN}/dvi2ps

clean:
	rm -f core *.o

veryclean: clean
	rm -f index dvi2ps.ln dvi2ps

lint:
	rm -f dvi2ps.ln
	lint ${LFLAGS} ${DFLAGS} ${SRCS} > dvi2ps.ln

index : ${SRCS}
	rm -f index
	ctags -x ${SRCS} ${HDRS} | sort -f > index

auxiliary.o : struct.h defs.h
builtin.o :   site.h struct.h defs.h
decode.o :    site.h struct.h defs.h
dvi2ps.o :    site.h struct.h defs.h commands.h
findfile.o :  struct.h defs.h
fontfiles.o : site.h struct.h defs.h
gf.o :        struct.h defs.h gf.h
pk.o :        struct.h defs.h pk.h site.h
pxl.o :       struct.h defs.h
pagelist.o :  struct.h defs.h
prelim.o :    site.h struct.h defs.h commands.h
special.o :   struct.h defs.h commands.h
