#  dvipr
#      TeX Printer driver for The Canon LIPS III/IV/IVc, CaPSL III printer
#
#      Developed at:
#          Computer Systems Research Group
#          Department of Information Science
#          Fukui University
#          9-1, Bunkyo-3, Fukui, 910 Japan
#
#      Authors:
#          Yasumasa Koizumi, Atsushi Takagi, Kenichi Sugimoto,
#          and Minato Kawaguti
#
#  The program may be copied and redistributed freely in the spirit of
#  Free Software Foundation's "Copy Left", provided this title page is
#  included in all of the source files involved.
#
#  Reports on porting to new platforms, bug fixes, etc., are highly
#  appreciated. e-mail of this kind of communication shhould be addressedd
#  to:
#      dvipr@i1nws1.fukui-u.ac.jp

CC = gcc -O2
BINDIR=/usr/local/bin
MANDIR=/usr/local/man/man$(MANSUFFIX)
DVIPR_DATA=/usr/local/bin
MAKETEXPK_PATH=/usr/local/bin
DVIPR_GHOSTSCRIPT_CMD=$(BINDIR)/gs

# Default printer language. It must be one of these.
#  PDL_LIPS3 .... LIPS III
#  PDL_LIPS4 .... LIPS IV
#  PDL_LIPS4C ... LIPS IVc
#  PDL_CAPSL3 ... CaPSL III
#  PDL_CAPSL4 ... CaPSL IV
DEFAULT_PDL=PDL_LIPS4

# The total capacity of build-in ram memory in MegaByte.
# If you don't know it, define 0.
LIPS_BUILDIN_MEMORY=12

# Define threshold value of characters that determine whether font is downloaded
#  or not. If you define it 80, only font that total characters used in it exceeds
#  (value(=80) / 100) * total characters in the font will be downloaded.
# It must be between 0 and 100.
LIPS_THRESHOLD_CHARACTERS=80

# Define threshold value of build-in ram memory that determine whether font is
#  downloaded or not. If you define it lager, more font will be download to printer,
#  but printer may be more slowly if memory-swapping happenens in it.
# It must be between 0 and 100.
LIPS_THRESHOLD_MEMORY=70

CFLAGS = -Wall -Wstrict-prototypes -I/usr/local/include -DDVIPR_DATA_DIR=\"$(DVIPR_DATA)\" -DDVIPR_VERSION=\"1.2.14\" -DMAKETEXPK_PATH=\"$(MAKETEXPK_PATH)\" -DDEFAULT_PDL=$(DEFAULT_PDL) -DLIPS_BUILDIN_MEMORY=$(LIPS_BUILDIN_MEMORY) -DLIPS_THRESHOLD_MEMORY=$(LIPS_THRESHOLD_MEMORY) -DLIPS_THRESHOLD_CHARACTERS=$(LIPS_THRESHOLD_CHARACTERS) -DDVIPDL_CMD=\"$(BINDIR)/dvipdl\" -DDVIPR_GHOSTSCRIPT_CMD=\"$(DVIPR_GHOSTSCRIPT_CMD)\"
DEPENDFLAGS = -I/usr/local/include
LDOPTIONS = -Wall -L/usr/local/lib
LDLIBS= -lkpathsea -lm

SRCS1 = dvipr.c error.c file.c
OBJS1 = dvipr.o error.o file.o
SRCS2 = exdvipdl.c file.c error.c
OBJS2 = exdvipdl.o file.o error.o
SRCS3 = dvipdl.c error.c pdl.c lips.c dvi.c file.c font.c font_jap.c pk.c tfm.c special.c color.c gs.c dnp.c tpic.c
OBJS3 = dvipdl.o error.o pdl.o lips.o dvi.o file.o font.o font_jap.o pk.o tfm.o special.o color.o gs.o dnp.o tpic.o
SRCS = $(SRCS1) $(SRCS2) $(SRCS3)

SRC = $(SRC1) $(SRC2) $(SRC3)

AllTarget(dvipr)
NormalProgramTarget(dvipr, $(OBJS1), NullParameter, NullParameter, NullParameter)
InstallProgram(dvipr, $(BINDIR))
InstallManPage(dvipr, $(MANDIR))

AllTarget(exdvipdl)
NormalProgramTarget(exdvipdl, $(OBJS2), NullParameter, NullParameter, NullParameter)
InstallProgram(exdvipdl, $(BINDIR))

AllTarget(dvipdl)
NormalProgramTarget(dvipdl, $(OBJS3), NullParameter, NullParameter, NullParameter)
InstallProgram(dvipdl, $(BINDIR))
InstallManPage(dvipdl, $(MANDIR))

InstallNonExec(dvipdl.err, $(DVIPR_DATA))
InstallNonExec(dvipdl.lps, $(DVIPR_DATA))
InstallNonExec(dvipdl.psc, $(DVIPR_DATA))

DependTarget()
LintTarget()
