#$Log:	Makefile,v $
# Revision 0.8  92/11/23  19:48:02  19:48:02  bt (Bo Thide')
# Fixed resolution bug. Portable downloading. Added/changed options. PJXL color support
# 
# Revision 0.7  92/11/13  02:43:26  02:43:26  bt (Bo Thide')
# More bug fixes and improvements. Support for PaintJet XL
# 
# Revision 0.6  92/11/10  21:47:36  21:47:36  bt (Bo Thide')
# Bug fixes. Added -R option. Better font handling.
# 
# Revision 0.5  92/11/09  16:25:10  16:25:10  bt (Bo Thide')
# Rewrite of dospecial.c. Extended \special support
# 
# Revision 0.4  92/11/08  02:45:12  02:45:12  bt (Bo Thide')
# Changed to portable bit manipulations. Replaced strrstr for non-POSIX
# compliant C. Fixed numerous bugs. Added support for more \special's.
# 
# Revision 0.3  92/08/24  12:43:17  12:43:17  bt (Bo Thide')
# Fixed 8 bit (dc font) support.
# 

CC            = cc

CCOPTS        = +ESlit +OS +O3 

CFLAGS	      = $(CCOPTS) -DTIMING #-DDEBUG #-DDEBUG2 -G


DEST	      = /usr/local/bin

EDITOR	      = vi

EXTHDRS	      = 

HDRS	      = dvi.h globals.h macros.h paths.h pcl.h pk.h

INSTALL	      = cp

LD	      = $(CC)

LDFLAGS	      = -s +O3 -Wl,-a,archive

LIBS	      = -lm

MAKEFILE      = Makefile


OBJS	      = betweenpages.o \
		cachefonts.o \
		checkfont.o \
		definefont.o \
		diagnostics.o \
		dim_to_dots.o \
		doallpages.o \
		doodevpages.o \
		dopage.o \
		dospecial.o \
		downloadchar.o \
		downloadfont.o \
		drawchar.o \
		drawrule.o \
		firstpar.o \
		getcount.o \
		getoptions.o \
		initialize.o \
		loadpkfile.o \
		loadtfmfile.o \
		main.o \
		makepkdir.o \
		openpkfile.o \
		opentfmfile.o \
		permfonts.o \
		pkcharinfo.o \
		pknum.o \
		pktopxl.o \
		postamble.o \
		preamble.o \
		prescanpage.o \
		printbop.o \
		printfont.o \
		rotatechar.o \
		rulepixels.o \
		scanbop.o \
		skipfontdef.o \
		skipnextpage.o \
		skippages.o \
		sortfonts.o \
		storechar.o \
		storefont.o

PRINT	      = cpr

PROGRAMS      = dvi2pcl

SRCS	      = betweenpages.c \
		cachefonts.c \
		checkfont.c \
		definefont.c \
		diagnostics.c \
		dim_to_dots.c \
		doallpages.c \
		doodevpages.c \
		dopage.c \
		dospecial.c \
		downloadchar.c \
		downloadfont.c \
		drawchar.c \
		drawrule.c \
		firstpar.c \
		getcount.c \
		getoptions.c \
		initialize.c \
		loadpkfile.c \
		loadtfmfile.c \
		main.c \
		makepkdir.c \
		openpkfile.c \
		opentfmfile.c \
		permfonts.c \
		pkcharinfo.c \
		pknum.c \
		pktopxl.c \
		postamble.c \
		preamble.c \
		prescanpage.c \
		printbop.c \
		printfont.c \
		rotatechar.c \
		rulepixels.c \
		scanbop.c \
		skipfontdef.c \
		skipnextpage.c \
		skippages.c \
		sortfonts.c \
		storechar.c \
		storefont.c

SHELL	      = /bin/sh

TAR	      = tar cvf /tmp/dvi2pcl_0.3.tar 

TEXLIB	      = /usr/local/lib/tex

all:		$(PROGRAMS)

dvi2pcl:	$(OBJS)
		$(LD) $(OBJS) $(CFLAGS) $(LDFLAGS) $(LIBS) -o dvi2pcl

clean:;		@rm -f $(OBJS) $(PROGRAMS) core

clobber:;	@rm -f $(OBJS) $(PROGRAM) core tags

depend:;	@mkmf -f $(MAKEFILE) ROOT=$(ROOT)

echo:;		@echo $(HDRS) $(SRCS)

edit:;		@$(EDITOR) $(HDRS) $(SRCS)

index:;		@ctags -wx $(HDRS) $(SRCS)

install:	$(PROGRAMS)
		@echo Installing $(PROGRAMS) in $(DEST)
		@-strip $(PROGRAMS)
		$(INSTALL)  $(PROGRAMS) $(DEST)
		cp reslj.fnt $(TEXLIB)

print:;		@$(PRINT) $(HDRS) $(SRCS)

tar:;		@$(TAR) Makefile README TODO $(HDRS) $(SRCS) tags

tags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)

update:		$(DEST)/$(PROGRAM)

$(DEST)/$(PROGRAM): $(SRCS) $(LIBS) $(HDRS) $(EXTHDRS)
		@$(MAKE) -f $(MAKEFILE) ROOT=$(ROOT) DEST=$(DEST) install