#
#   Makefile for dvips.  Edit this first part of the file.
#
#   First, the things that absolutely must be edited for your system.
#   Please, don't forget to edit MakeTeXPK in the same way!

CC = d:\tcc\tcc.ttp
LD = d:\tcc\tlink.ttp

# change -DDEFRES=300 or whatever is required
#    if the default resolution is not 300 dpi,
# add -DDEBUG to turn on debugging capability
# add -DTPIC for tpic support
# add -DFONTLIB to search font libraries
# add -DSEARCH_SUBDIRECTORIES to search the FONTSUBDIRPATH.
# add -DHAVE_GETCWD if you have getcwd (relevant only for subdir searching)
# add -DIBM6000 for compiling on IBM 6000 systems
# add -DCREATIONDATE if your system has a working time() and you want dated files
# (for VM/CMS, see the MKDVIPS.EXEC file in the vmcms subdirectory).
#
#   If you define FONTLIB, make sure to also give definitions to
#   FLIPATH and FLINAME.
#
#   If your compiler doesn't like void*, then add
#      -DVOID=char
#
DEFS = -DDEFRES=300 -DCREATIONDATE

# either use
# OPT = -O -funsigned-char
# or
OPT = -DATARIST -K -P -R -W-pro -Id:\tcc\h -Id:\tcc\h\x

# If you are compiling dvips for suid or other privileges, you will
# definitely want to define the following symbol; else don't.
# SECURE = -DSECURE

# If you want EMTEX specials, define the following.
EMTEX = # -DEMTEX

# for SYSV (and friends which use <string.h> instead of <strings.h>)
# define the c-compiler flag
# add -D_POSIX_SOURCE if you are POSIX (also define SYSV) (only relevant
# for subdir searching)
# SYS = -DSYSV

CFLAGS = $(DEFS) $(OPT) $(SYS) $(SECURE) $(EMTEX) $(DEFPFMT)
LDFLAGS = 

SRC = dospecial.c dviinput.c fontdef.c loadfont.c dvips.c tfmload.c \
	download.c prescan.c scanpage.c skippage.c output.c scalewidth.c \
	dosection.c dopage.c resident.c search.c unpack.c drawps.c \
	header.c makefont.c repack.c virtualfont.c dpicheck.c finclude.c \
	pprescan.c papersiz.c flib.c color.c bbox.c emspecial.c

OBJ = dospecial.o dviinput.o fontdef.o loadfont.o dvips.o tfmload.o \
	download.o prescan.o scanpage.o skippage.o output.o scalewidth.o \
	dosection.o dopage.o resident.o search.o unpack.o drawps.o \
	header.o makefont.o repack.o virtualfont.o dpicheck.o finclude.o \
	pprescan.o papersiz.o flib.o color.o bbox.o emspecial.o

all : afm2tfm.ttp dvips.ttp tex.pro texps.pro texc.pro special.pro \
      finclude.pro color.pro crop.pro

.c.o:
	$(CC) $(CFLAGS) $<

dvips.ttp : $(OBJ)
	${LD} -O=dvips.ttp -C=dvips.lnk

afm2tfm.ttp : afm2tfm.o
	$(LD) $(LDFLAGS) -O=afm2tfm.ttp $(LIBS) afm2tfm.o $(FLIBS)

$(OBJ) : dvips.h debug.h
flib.o resident.o dvips.o loadfont.o tfmload.o : paths.h

squeeze.ttp : squeeze.o
	$(LD) $(LDFLAGS) -O=squeeze.ttp $(LIBS) squeeze.o $(FLIBS)
