# makefile for Haru-PDF-Library on Windows with Microsoft VC++ (5.0) Compiler # Copyright (C) 2004 Takeshi Kanno # # It does not work completely yet. # # Note: libharu is written for the compilers which throw an exception when a new # operator fails. # Since Microsoft VC++ Compiler does not throw exception, it is necessary # to call _set_new_handler(throw_new_handler); at the time of the start # of a program. # CPP=cl.exe CC=cl.exe CL=cl.exe MYLDFLAGS=msvc\zlib.lib msvc\libpng.lib msvc\libjpeg.lib # if you don't have libpng and never use PNG image, use these options. #MYCPPFLAGS=-DNOPNG #MYLDFLAGS=msvc\zlib.lib msvc\libjpeg.lib # if you don't have jpeglib and never use JPEG image, use these options. #MYCPPFLAGS=-DNOJPEG #MYLDFLAGS=msvc\zlib.lib msvc\libpng.lib # if you don't have either jpeglib and libpng, use these options. MYCPPFLAGS=-DNOJPEG -DNOPNG -DNOZLIB #MYLDFLAGS=msvc\zlib.lib ENCRYPTFLAGS= # if you don't need to encryption method, commentout the following line. #ENCRYPTFLAGS=-DUSE_ENCRYPTION VCFLAGS=-Imsvc -EHa -MT -TP -nologo -D__WIN32__ -D_NOT_SUPPORT_STD # release mode. CPPFLAGS=-I. $(VCFLAGS) -Og -DNDEBUG $(MYCPPFLAGS) $(ENCRYPTFLAGS) # debug mode (no message). #CPPFLAGS=-I. $(VCFLAGS) -Od $(MYCPPFLAGS) $(ENCRYPTFLAGS) # debug mode (with message). #CPPFLAGS=-I. $(VCFLAGS) -Od -DDEBUG $(MYCPPFLAGS) $(ENCRYPTFLAGS) LDFLAGS=$(MYLDFLAGS) libharu.lib OBJS= \ PdfExceptions.obj \ PdfList.obj \ PdfUtils.obj \ PdfStreams.obj \ PdfAutoPtrObjects.obj \ PdfObjects.obj \ PdfContents.obj \ PdfPages.obj \ PdfFonts.obj \ PdfXref.obj \ PdfDestinations.obj \ PdfOutlines.obj \ PdfBorderStyle.obj \ PdfAnnotations.obj \ PdfDoc.obj \ PdfCatalog.obj \ PdfInfo.obj \ PdfEncoding.obj \ PdfFontDef.obj \ PdfXObjects.obj \ PdfFontDef_Courier.obj \ PdfFontDef_Helvetica.obj \ PdfFontDef_Times.obj \ PdfFontDef_Symbol.obj \ PdfFontDef_ZapfDingbats.obj \ PdfEncoding_ISO8859.obj \ PdfEncoding_KOI8.obj \ PdfEncoding_MSCP.obj \ PdfMbFonts.obj \ PdfCMap.obj \ PdfUnicodeText.obj \ PdfMbFontDef_Gothic.obj \ PdfMbFontDef_Mincyo.obj \ PdfMbFontDef_SimHei.obj \ PdfMbFontDef_SimSun.obj \ PdfMbFontDef_Ming.obj \ PdfMbFontDef_Batang.obj \ PdfMbFontDef_Dotum.obj \ PdfCMap_RKSJ.obj \ PdfCMap_EUC.obj \ PdfCMap_GB_EUC.obj \ PdfCMap_ETen_B5.obj \ PdfCMap_KSC_EUC.obj \ PdfPngImage.obj \ PdfJpegImage.obj \ PdfEncrypt.obj \ libharuc.obj \ libharuc_jpfonts.obj \ libharuc_krfonts.obj \ libharuc_cnsfonts.obj \ libharuc_cntfonts.obj \ libharu_png.obj \ libharu_jpeg.obj \ PROGRAMS= \ examples\EncodingList.exe \ examples\GraphPaper.exe \ examples\FontExample1.exe \ examples\FontExample2.exe \ examples\LineExample.exe \ examples\LinkExample.exe \ examples\OutlineExample.exe \ examples\JpFontExample1.exe \ examples\JpFontExample2.exe \ examples\Encrypt.exe \ examples\Permission.exe \ examples\PngExample.exe \ examples\JpegExample.exe \ examples\TextAnnotation.exe \ .SUFFIXES : .cc .cc.obj : $(CPP) -c $(CPPFLAGS) $*.cc all: libharu.lib libharu.lib: $(OBJS) if exist libharu.lib del libharu.lib lib -out:$@ $(OBJS) example: $(PROGRAMS) clean: if exist *.obj del *.obj if exist *.lib del *.lib if exist *.dll del *.dll if exist examples\*.exe del examples\*.exe examples\DocMaker.exe: examples\DocMaker.cc libharu.lib $(CPP) $(CPPFLAGS) examples\DocMaker.cc /link $(LDFLAGS) move DocMaker.exe examples examples\DocMaker examples\LIBHARU.TXT HaruPdf.pdf examples\EncodingList.exe: examples\EncodingList.cc libharu.lib $(CL) $(CPPFLAGS) examples\EncodingList.cc /link $(LDFLAGS) move EncodingList.exe examples cd examples EncodingList.exe cd .. examples\PngExample.exe: examples\PngExample.cc libharu.lib $(CL) $(CPPFLAGS) examples\PngExample.cc /link $(LDFLAGS) move PngExample.exe examples cd examples PngExample.exe cd .. examples\JpegExample.exe: examples\JpegExample.cc libharu.lib $(CL) $(CPPFLAGS) examples\JpegExample.cc /link $(LDFLAGS) move JpegExample.exe examples cd examples JpegExample.exe cd .. examples\GraphPaper.exe: examples\GraphPaper.cc libharu.lib $(CL) $(CPPFLAGS) examples\GraphPaper.cc /link $(LDFLAGS) move GraphPaper.exe examples cd examples GraphPaper.exe cd .. examples\LinkExample.exe: examples\LinkExample.cc libharu.lib $(CL) $(CPPFLAGS) examples\LinkExample.cc /link $(LDFLAGS) move LinkExample.exe examples cd examples LinkExample.exe cd .. examples\OutlineExample.exe: examples\OutlineExample.cc libharu.lib $(CL) $(CPPFLAGS) examples\OutlineExample.cc /link $(LDFLAGS) move OutlineExample.exe examples cd examples OutlineExample.exe cd .. examples\FontExample1.exe: examples\FontExample1.cc libharu.lib $(CL) $(CPPFLAGS) examples\FontExample1.cc /link $(LDFLAGS) move FontExample1.exe examples cd examples FontExample1.exe cd .. examples\FontExample2.exe: examples\FontExample2.cc libharu.lib $(CL) $(CPPFLAGS) examples\FontExample2.cc /link $(LDFLAGS) move FontExample2.exe examples cd examples FontExample2.exe cd .. examples\Encrypt.exe: examples\Encrypt.cc libharu.lib $(CL) $(CPPFLAGS) examples\Encrypt.cc /link $(LDFLAGS) move Encrypt.exe examples cd examples Encrypt.exe cd .. examples\Permission.exe: examples\Permission.cc libharu.lib $(CL) $(CPPFLAGS) examples\Permission.cc /link $(LDFLAGS) move Permission.exe examples cd examples Permission.exe cd .. examples\LineExample.exe: examples\LineExample.cc libharu.lib $(CL) $(CPPFLAGS) examples\LineExample.cc /link $(LDFLAGS) move LineExample.exe examples cd examples LineExample.exe cd .. examples\JpFontExample1.exe: examples\JpFontExample1.cc libharu.lib $(CL) $(CPPFLAGS) examples\JpFontExample1.cc /link $(LDFLAGS) move JpFontExample1.exe examples cd examples JpFontExample1.exe cd .. examples\JpFontExample2.exe: examples\JpFontExample2.cc libharu.lib $(CL) $(CPPFLAGS) examples\JpFontExample2.cc /link $(LDFLAGS) move JpFontExample2.exe examples cd examples JpFontExample2.exe cd .. examples\TextAnnotation.exe: examples\TextAnnotation.cc libharu.lib $(CL) $(CPPFLAGS) examples\TextAnnotation.cc /link $(LDFLAGS) move TextAnnotation.exe examples cd examples TextAnnotation.exe cd .. libharuc.obj: libharuc.cc libharu.h libharu_png.obj: libharu_png.cc libharu.h libharu_jpeg.obj: libharu_jpeg.cc libharu.h libharuc_jpfonts.obj: libharuc_jpfonts.cc libharuc_jpfonts.h libharuc_cnsfonts.obj: libharuc_cnsfonts.cc libharuc_cnsfonts.h libharuc_cntfonts.obj: libharuc_cntfonts.cc libharuc_cntfonts.h libharuc_krfonts.obj: libharuc_krfonts.cc libharuc_krfonts.h PdfExceptions.obj: PdfExceptions.cc libharu.h PdfCatalog.obj: PdfCatalog.cc libharu.h PdfContents.obj: PdfContents.cc libharu.h PdfDestinations.obj: PdfDestinations.cc libharu.h PdfDoc.obj: PdfDoc.cc libharu.h PdfEncoding.obj: PdfEncoding.cc libharu.h PdfFontDef_Courier.obj: PdfFontDef_Courier.cc libharu.h PdfFontDef_Helvetica.obj: PdfFontDef_Helvetica.cc libharu.h PdfFontDef_Times.obj: PdfFontDef_Times.cc libharu.h PdfFontDef_Symbol.obj: PdfFontDef_Symbol.cc libharu.h PdfFontDef_ZapfDingbats.obj: PdfFontDef_ZapfDingbats.cc libharu.h PdfFonts.obj: PdfFonts.cc libharu.h PdfInfo.obj: PdfInfo.cc libharu.h PdfUtils.obj: PdfUtils.cc libharu.h PdfList.obj: PdfList.cc libharu.h PdfAutoPtrObjects.obj: PdfAutoPtrObjects.cc libharu.h PdfObjects.obj: PdfObjects.cc libharu.h PdfOutlines.obj: PdfOutlines.cc libharu.h PdfAnnotations.obj: PdfAnnotations.cc libharu.h PdfBorderStyle.obj: PdfBorderStyle.cc libharu.h PdfPages.obj: PdfPages.cc libharu.h PdfPngImage.obj: PdfPngImage.cc libharu.h PdfAutoPtrObjects.obj: PdfAutoPtrObjects.cc libharu.h PdfStreams.obj: PdfStreams.cc libharu.h PdfXObjects.obj: PdfXObjects.cc libharu.h PdfXref.obj: PdfXref.cc libharu.h PdfFontDef.obj: PdfFontDef.cc libharu.h PdfMbFonts.obj: PdfMbFonts.cc libharu.h PdfMbFontDef_Gothic.obj: PdfMbFontDef_Gothic.cc libharu_jpfonts.h PdfMbFontDef_Mincyo.obj: PdfMbFontDef_Gothic.cc libharu_jpfonts.h PdfMbFontDef_SimHei.obj: PdfMbFontDef_SimHei.cc libharu_cnsfonts.h PdfMbFontDef_SimSun.obj: PdfMbFontDef_SimSun.cc libharu_cnsfonts.h PdfMbFontDef_Ming.obj: PdfMbFontDef_Ming.cc libharu_cntfonts.h PdfMbFontDef_Batang.obj: PdfMbFontDef_Batang.cc libharu_krfonts.h PdfMbFontDef_Dotum.obj: PdfMbFontDef_Dotum.cc libharu_krfonts.h PdfUnicodeText.obj: PdfUnicodeText.cc libharu.h PdfCMap.obj: PdfCMap.cc libharu.h PdfCMap_EUC.obj: PdfCMap_EUC.cc libharu_jpfonts.h PdfCMap_RKSJ.obj: PdfCMap_RKSJ.cc libharu_jpfonts.h PdfCMap_GB_EUC.obj: PdfCMap_GB_EUC.cc libharu_cnsfonts.h PdfCMap_ETen_B5.obj: PdfCMap_ETen_B5.cc libharu_cntfonts.h PdfCMap_KSC_EUC.obj: PdfCMap_KSC_EUC.cc libharu_krfonts.h PdfJpegImage.obj: PdfJpegImage.cc libharu.h PdfEncrypt.obj: PdfEncrypt.cc PdfEncoding_ISO8859.obj: PdfEncoding_ISO8859.cc libharu_ISO8859.h libharu.h PdfEncoding_KOI8.obj : PdfEncoding_KOI8.cc libharu_KOI8.h libharu.h PdfEncoding_MSCP.obj : PdfEncoding_MSCP.cc libharu_MSCP.h libharu.h