#========================================================================
#
# Xpdf Makefile
#
# Copyright 1996 Derek B. Noonburg
#
#========================================================================

srcdir = @srcdir@
VPATH = @srcdir@

APDFSRCDIR = ../../apdf
GOOSRCDIR = $(srcdir)/../goo
GOOLIBDIR = ../goo
T1LIBDIR = ../type1
TTLIBDIR = ../freetype

CXXFLAGS = @SERVER_CXXFLAGS@ @SERVER_DEFS@ @SERVER_OPTIONS@ -I$(GOOSRCDIR) -DNO_PRINT_COMMANDS -I$(srcdir) -I$(srcdir)/..

CXX = @SERVER_CXX@
AR = @SERVER_AR@
RANLIB = @SERVER_RANLIB@

LIBPREFIX = @LIBPREFIX@
EXE = @EXE@

#------------------------------------------------------------------------

%.o: $(srcdir)/%.cc
	$(CXX) $(CXXFLAGS) -c $<

#------------------------------------------------------------------------

CXX_SRC = \
	$(srcdir)/Array.cc \
	$(srcdir)/Catalog.cc \
	$(srcdir)/Dict.cc \
	$(srcdir)/FontCache.cc \
	$(srcdir)/FontEncoding.cc \
	$(srcdir)/FontFile.cc \
	$(srcdir)/FontMap.cc \
	$(srcdir)/Gfx.cc \
	$(srcdir)/GfxFont.cc \
	$(srcdir)/GfxState.cc \
	$(srcdir)/ImageOutputDev.cc \
	$(srcdir)/Lexer.cc \
	$(srcdir)/Link.cc \
	$(srcdir)/NumberTree.cc \
	$(srcdir)/Object.cc \
	$(srcdir)/Outline.cc \
	$(srcdir)/OutputDev.cc \
	$(srcdir)/Page.cc \
	$(srcdir)/PageLabel.cc \
	$(srcdir)/Parser.cc \
	$(srcdir)/PDFDoc.cc \
	$(srcdir)/PSOutputDev.cc \
	$(srcdir)/Stream.cc \
	$(srcdir)/TextOutputDev.cc \
	$(srcdir)/XRef.cc \
	$(srcdir)/md5.cc

OBJS = \
	Array.o \
	Catalog.o \
	Dict.o \
	Error.o \
	FontCache.o \
	FontEncoding.o \
	FontFile.o \
	FontMap.o \
	Gfx.o \
	GfxFont.o \
	GfxState.o \
	ImageOutputDev.o \
	Lexer.o \
	Link.o \
	NumberTree.o \
	Object.o \
	Outline.o \
	OutputDev.o \
	Page.o \
	PageLabel.o \
	Parser.o \
	PDFDoc.o \
	PSOutputDev.o \
	Stream.o \
	TextOutputDev.o \
	XRef.o \
	md5.o

#------------------------------------------------------------------------

xpdflib: $(LIBPREFIX)xpdf.a

$(LIBPREFIX)xpdf.a: $(OBJS)
	rm -f $(LIBPREFIX)xpdf.a
	$(AR) $(LIBPREFIX)xpdf.a $(OBJS)
	$(RANLIB) $(LIBPREFIX)xpdf.a

#------------------------------------------------------------------------

clean:
	rm -f $(OBJS) $(LIBPREFIX)xpdf.a *.bak

#------------------------------------------------------------------------

distdepend:
	cp $(srcdir)/Makefile.in $(srcdir)/Makefile.in.bak
	sed '/^#----- dependences -----/q' $(srcdir)/Makefile.in.bak >$(srcdir)/Makefile.in
	$(CXX) $(CXXFLAGS) -MM $(CXX_SRC) >>$(srcdir)/Makefile.in

#----- dependences -----
Array.o: ../../xpdf/Array.cc ../../xpdf/../goo/gmem.h \
 ../../xpdf/Object.h ../../xpdf/../server/mystdio.h \
 ../../xpdf/../goo/gtypes.h ../../xpdf/../goo/GString.h \
 ../../xpdf/Array.h ../../xpdf/Dict.h ../../xpdf/Stream.h \
 ../../xpdf/Error.h ../../xpdf/config.h ../../xpdf/rc4.h \
 ../../xpdf/UnLZW.h
Catalog.o: ../../xpdf/Catalog.cc ../../xpdf/../goo/gmem.h \
 ../../xpdf/Object.h ../../xpdf/../server/mystdio.h \
 ../../xpdf/../goo/gtypes.h ../../xpdf/../goo/GString.h \
 ../../xpdf/Array.h ../../xpdf/Dict.h ../../xpdf/Stream.h \
 ../../xpdf/Error.h ../../xpdf/config.h ../../xpdf/rc4.h \
 ../../xpdf/UnLZW.h ../../xpdf/Page.h ../../xpdf/Link.h \
 ../../xpdf/Outline.h ../../xpdf/Catalog.h ../../xpdf/PageLabel.h \
 ../../xpdf/NumberTree.h
Dict.o: ../../xpdf/Dict.cc ../../xpdf/../goo/gmem.h \
 ../../xpdf/Object.h ../../xpdf/../server/mystdio.h \
 ../../xpdf/../goo/gtypes.h ../../xpdf/../goo/GString.h \
 ../../xpdf/Array.h ../../xpdf/Dict.h ../../xpdf/Stream.h \
 ../../xpdf/Error.h ../../xpdf/config.h ../../xpdf/rc4.h \
 ../../xpdf/UnLZW.h ../../xpdf/XRef.h
FontCache.o: ../../xpdf/FontCache.cc ../../xpdf/FontCache.h \
 ../../xpdf/Object.h ../../xpdf/../server/mystdio.h \
 ../../xpdf/../goo/gtypes.h ../../xpdf/../goo/gmem.h \
 ../../xpdf/../goo/GString.h ../../xpdf/Array.h ../../xpdf/Dict.h \
 ../../xpdf/Stream.h ../../xpdf/Error.h ../../xpdf/config.h \
 ../../xpdf/rc4.h ../../xpdf/UnLZW.h ../../xpdf/GfxFont.h \
 ../../xpdf/FontEncoding.h ../../xpdf/../server/Type1.h \
 ../../xpdf/../type1/objects.h ../../xpdf/../type1/types.h \
 ../../xpdf/../type1/spaces.h ../../xpdf/../type1/paths.h \
 ../../xpdf/../type1/regions.h ../../xpdf/../type1/util.h \
 ../../xpdf/../type1/fontfcn.h ../../xpdf/../server/TrueType.h \
 ../../xpdf/../freetype/freetype.h ../../xpdf/../freetype/fterrid.h \
 ../../xpdf/../freetype/ftnameid.h ../../xpdf/../freetype/ftxpost.h \
 ../../xpdf/FontFile.h
FontEncoding.o: ../../xpdf/FontEncoding.cc ../../xpdf/../goo/gmem.h \
 ../../xpdf/FontEncoding.h ../../xpdf/../goo/gtypes.h
FontFile.o: ../../xpdf/FontFile.cc ../../xpdf/../goo/gmem.h \
 ../../xpdf/Error.h ../../xpdf/config.h ../../xpdf/FontFile.h \
 ../../xpdf/../goo/gtypes.h ../../xpdf/../goo/GString.h \
 ../../xpdf/FontEncoding.h ../../xpdf/StdFontInfo.h \
 ../../xpdf/CompactFontInfo.h
FontMap.o: ../../xpdf/FontMap.cc ../../xpdf/../goo/GString.h \
 ../../xpdf/../goo/gmem.h ../../xpdf/config.h ../../xpdf/Error.h \
 ../../xpdf/GfxFont.h ../../xpdf/../goo/gtypes.h ../../xpdf/Object.h \
 ../../xpdf/../server/mystdio.h ../../xpdf/Array.h ../../xpdf/Dict.h \
 ../../xpdf/Stream.h ../../xpdf/rc4.h ../../xpdf/UnLZW.h \
 ../../xpdf/FontEncoding.h ../../xpdf/FontMap.h
Gfx.o: ../../xpdf/Gfx.cc ../../xpdf/../goo/gmem.h ../../xpdf/Object.h \
 ../../xpdf/../server/mystdio.h ../../xpdf/../goo/gtypes.h \
 ../../xpdf/../goo/GString.h ../../xpdf/Array.h ../../xpdf/Dict.h \
 ../../xpdf/Stream.h ../../xpdf/Error.h ../../xpdf/config.h \
 ../../xpdf/rc4.h ../../xpdf/UnLZW.h ../../xpdf/Lexer.h \
 ../../xpdf/Parser.h ../../xpdf/GfxFont.h ../../xpdf/FontEncoding.h \
 ../../xpdf/GfxState.h ../../xpdf/OutputDev.h ../../xpdf/Params.h \
 ../../xpdf/FontCache.h ../../xpdf/Gfx.h
GfxFont.o: ../../xpdf/GfxFont.cc ../../xpdf/../goo/GString.h \
 ../../xpdf/../goo/gmem.h ../../xpdf/../goo/gfile.h \
 ../../xpdf/../goo/gtypes.h ../../xpdf/config.h ../../xpdf/Object.h \
 ../../xpdf/../server/mystdio.h ../../xpdf/Array.h ../../xpdf/Dict.h \
 ../../xpdf/Stream.h ../../xpdf/Error.h ../../xpdf/rc4.h \
 ../../xpdf/UnLZW.h ../../xpdf/Params.h ../../xpdf/FontFile.h \
 ../../xpdf/FontEncoding.h ../../xpdf/GfxFont.h ../../xpdf/FontCache.h \
 ../../xpdf/FontMap.h ../../xpdf/FontInfo.h
GfxState.o: ../../xpdf/GfxState.cc ../../xpdf/../goo/gmem.h \
 ../../xpdf/Error.h ../../xpdf/config.h ../../xpdf/Object.h \
 ../../xpdf/../server/mystdio.h ../../xpdf/../goo/gtypes.h \
 ../../xpdf/../goo/GString.h ../../xpdf/Array.h ../../xpdf/Dict.h \
 ../../xpdf/Stream.h ../../xpdf/rc4.h ../../xpdf/UnLZW.h \
 ../../xpdf/GfxState.h
ImageOutputDev.o: ../../xpdf/ImageOutputDev.cc \
 ../../xpdf/../goo/gmem.h ../../xpdf/config.h ../../xpdf/Error.h \
 ../../xpdf/GfxState.h ../../xpdf/../goo/gtypes.h ../../xpdf/Object.h \
 ../../xpdf/../server/mystdio.h ../../xpdf/../goo/GString.h \
 ../../xpdf/Array.h ../../xpdf/Dict.h ../../xpdf/Stream.h \
 ../../xpdf/rc4.h ../../xpdf/UnLZW.h ../../xpdf/ImageOutputDev.h \
 ../../xpdf/OutputDev.h
Lexer.o: ../../xpdf/Lexer.cc ../../xpdf/Lexer.h ../../xpdf/Object.h \
 ../../xpdf/../server/mystdio.h ../../xpdf/../goo/gtypes.h \
 ../../xpdf/../goo/gmem.h ../../xpdf/../goo/GString.h \
 ../../xpdf/Array.h ../../xpdf/Dict.h ../../xpdf/Stream.h \
 ../../xpdf/Error.h ../../xpdf/config.h ../../xpdf/rc4.h \
 ../../xpdf/UnLZW.h
Link.o: ../../xpdf/Link.cc ../../xpdf/../goo/gmem.h \
 ../../xpdf/../goo/GString.h ../../xpdf/Error.h ../../xpdf/config.h \
 ../../xpdf/Object.h ../../xpdf/../server/mystdio.h \
 ../../xpdf/../goo/gtypes.h ../../xpdf/Array.h ../../xpdf/Dict.h \
 ../../xpdf/Stream.h ../../xpdf/rc4.h ../../xpdf/UnLZW.h \
 ../../xpdf/Link.h
NumberTree.o: ../../xpdf/NumberTree.cc ../../xpdf/../goo/gmem.h \
 ../../xpdf/../goo/GString.h ../../xpdf/Error.h ../../xpdf/config.h \
 ../../xpdf/Object.h ../../xpdf/../server/mystdio.h \
 ../../xpdf/../goo/gtypes.h ../../xpdf/Array.h ../../xpdf/Dict.h \
 ../../xpdf/Stream.h ../../xpdf/rc4.h ../../xpdf/UnLZW.h \
 ../../xpdf/NumberTree.h
Object.o: ../../xpdf/Object.cc ../../xpdf/Object.h \
 ../../xpdf/../server/mystdio.h ../../xpdf/../goo/gtypes.h \
 ../../xpdf/../goo/gmem.h ../../xpdf/../goo/GString.h \
 ../../xpdf/Array.h ../../xpdf/Dict.h ../../xpdf/Stream.h \
 ../../xpdf/Error.h ../../xpdf/config.h ../../xpdf/rc4.h \
 ../../xpdf/UnLZW.h ../../xpdf/XRef.h
Outline.o: ../../xpdf/Outline.cc ../../xpdf/../goo/gmem.h \
 ../../xpdf/Object.h ../../xpdf/../server/mystdio.h \
 ../../xpdf/../goo/gtypes.h ../../xpdf/../goo/GString.h \
 ../../xpdf/Array.h ../../xpdf/Dict.h ../../xpdf/Stream.h \
 ../../xpdf/Error.h ../../xpdf/config.h ../../xpdf/rc4.h \
 ../../xpdf/UnLZW.h ../../xpdf/Link.h ../../xpdf/Outline.h
OutputDev.o: ../../xpdf/OutputDev.cc ../../xpdf/Object.h \
 ../../xpdf/../server/mystdio.h ../../xpdf/../goo/gtypes.h \
 ../../xpdf/../goo/gmem.h ../../xpdf/../goo/GString.h \
 ../../xpdf/Array.h ../../xpdf/Dict.h ../../xpdf/Stream.h \
 ../../xpdf/Error.h ../../xpdf/config.h ../../xpdf/rc4.h \
 ../../xpdf/UnLZW.h ../../xpdf/GfxState.h ../../xpdf/OutputDev.h
Page.o: ../../xpdf/Page.cc ../../xpdf/Object.h \
 ../../xpdf/../server/mystdio.h ../../xpdf/../goo/gtypes.h \
 ../../xpdf/../goo/gmem.h ../../xpdf/../goo/GString.h \
 ../../xpdf/Array.h ../../xpdf/Dict.h ../../xpdf/Stream.h \
 ../../xpdf/Error.h ../../xpdf/config.h ../../xpdf/rc4.h \
 ../../xpdf/UnLZW.h ../../xpdf/XRef.h ../../xpdf/OutputDev.h \
 ../../xpdf/Gfx.h ../../xpdf/Params.h ../../xpdf/Page.h
PageLabel.o: ../../xpdf/PageLabel.cc ../../xpdf/../goo/gmem.h \
 ../../xpdf/../goo/GString.h ../../xpdf/Error.h ../../xpdf/config.h \
 ../../xpdf/Object.h ../../xpdf/../server/mystdio.h \
 ../../xpdf/../goo/gtypes.h ../../xpdf/Array.h ../../xpdf/Dict.h \
 ../../xpdf/Stream.h ../../xpdf/rc4.h ../../xpdf/UnLZW.h \
 ../../xpdf/PageLabel.h ../../xpdf/NumberTree.h
Parser.o: ../../xpdf/Parser.cc ../../xpdf/Object.h \
 ../../xpdf/../server/mystdio.h ../../xpdf/../goo/gtypes.h \
 ../../xpdf/../goo/gmem.h ../../xpdf/../goo/GString.h \
 ../../xpdf/Array.h ../../xpdf/Dict.h ../../xpdf/Stream.h \
 ../../xpdf/Error.h ../../xpdf/config.h ../../xpdf/rc4.h \
 ../../xpdf/UnLZW.h ../../xpdf/Parser.h ../../xpdf/Lexer.h \
 ../../xpdf/md5.h ../../xpdf/XRef.h
PDFDoc.o: ../../xpdf/PDFDoc.cc ../../xpdf/../goo/GString.h \
 ../../xpdf/config.h ../../xpdf/Page.h ../../xpdf/Object.h \
 ../../xpdf/../server/mystdio.h ../../xpdf/../goo/gtypes.h \
 ../../xpdf/../goo/gmem.h ../../xpdf/Array.h ../../xpdf/Dict.h \
 ../../xpdf/Stream.h ../../xpdf/Error.h ../../xpdf/rc4.h \
 ../../xpdf/UnLZW.h ../../xpdf/Catalog.h ../../xpdf/XRef.h \
 ../../xpdf/Link.h ../../xpdf/OutputDev.h ../../xpdf/Params.h \
 ../../xpdf/PDFDoc.h ../../xpdf/FontCache.h ../../xpdf/GfxFont.h \
 ../../xpdf/FontEncoding.h ../../xpdf/FontMap.h
PSOutputDev.o: ../../xpdf/PSOutputDev.cc ../../xpdf/../goo/GString.h \
 ../../xpdf/config.h ../../xpdf/Object.h \
 ../../xpdf/../server/mystdio.h ../../xpdf/../goo/gtypes.h \
 ../../xpdf/../goo/gmem.h ../../xpdf/Array.h ../../xpdf/Dict.h \
 ../../xpdf/Stream.h ../../xpdf/Error.h ../../xpdf/rc4.h \
 ../../xpdf/UnLZW.h ../../xpdf/GfxState.h ../../xpdf/GfxFont.h \
 ../../xpdf/FontEncoding.h ../../xpdf/FontFile.h ../../xpdf/Catalog.h \
 ../../xpdf/Page.h ../../xpdf/PSOutputDev.h ../../xpdf/OutputDev.h
Stream.o: ../../xpdf/Stream.cc ../../xpdf/../goo/gmem.h \
 ../../xpdf/config.h ../../xpdf/Error.h ../../xpdf/Object.h \
 ../../xpdf/../server/mystdio.h ../../xpdf/../goo/gtypes.h \
 ../../xpdf/../goo/GString.h ../../xpdf/Array.h ../../xpdf/Dict.h \
 ../../xpdf/Stream.h ../../xpdf/rc4.h ../../xpdf/UnLZW.h \
 ../../xpdf/Stream-CCITT.h
TextOutputDev.o: ../../xpdf/TextOutputDev.cc \
 ../../xpdf/../goo/GString.h ../../xpdf/../goo/gmem.h \
 ../../xpdf/config.h ../../xpdf/Error.h ../../xpdf/GfxState.h \
 ../../xpdf/../goo/gtypes.h ../../xpdf/FontEncoding.h \
 ../../xpdf/TextOutputDev.h ../../xpdf/GfxFont.h ../../xpdf/Object.h \
 ../../xpdf/../server/mystdio.h ../../xpdf/Array.h ../../xpdf/Dict.h \
 ../../xpdf/Stream.h ../../xpdf/rc4.h ../../xpdf/UnLZW.h \
 ../../xpdf/OutputDev.h ../../xpdf/TextOutputFontInfo.h
XRef.o: ../../xpdf/XRef.cc ../../xpdf/../goo/gmem.h \
 ../../xpdf/Object.h ../../xpdf/../server/mystdio.h \
 ../../xpdf/../goo/gtypes.h ../../xpdf/../goo/GString.h \
 ../../xpdf/Array.h ../../xpdf/Dict.h ../../xpdf/Stream.h \
 ../../xpdf/Error.h ../../xpdf/config.h ../../xpdf/rc4.h \
 ../../xpdf/UnLZW.h ../../xpdf/Lexer.h ../../xpdf/Parser.h \
 ../../xpdf/XRef.h ../../xpdf/md5.h
md5.o: ../../xpdf/md5.cc ../../xpdf/md5.h ../../xpdf/Error.h \
 ../../xpdf/config.h
