1 # makefile for Haru Free PDFLibrary II (Libharu)
2 # Copyright (C) 1999-2006 Takeshi Kanno
3 # For conditions of distribution and use, see copyright notice in hpdf.h
7 # If you wish to build zlib as a shared library, use: ./configure -s
8 # To install /usr/local/lib/libhpdf.* and /usr/local/include/hpdf.h, type:
10 # To install in $HOME instead of /usr/local, use:
11 # make install prefix=$HOME
14 PNG_PREFIX = ../../libpng
30 CFLAGS=-MT -nologo -O2 -Iinclude -Iwin32\include -I"$(PNG_PREFIX)" -I"$(ZLIB_PREFIX)"
31 CFLAGS_DEMO=-MT -nologo -O2 -Iinclude -Iwin32\include -D__WIN32__
33 LDFLAGS= /LIBPATH:$(PNG_PREFIX) /LIBPATH:$(ZLIB_PREFIX) /LIBPATH:win32\msvc libpng.lib zlib_a.lib
35 LDFLAGS_DEMO2=/link /LIBPATH:. /LIBPATH:win32\msvc libhpdf.lib libpng.lib zlib.lib
36 DEFNAME=win32/msvc/libhpdf.def
37 RESNAME=win32/msvc/libhpdf.res
44 src\hpdf_streams.obj \
45 src\hpdf_objects.obj \
47 src\hpdf_boolean.obj \
54 src\hpdf_encoder.obj \
57 src\hpdf_encrypt.obj \
58 src\hpdf_encryptdict.obj \
59 src\hpdf_fontdef.obj \
60 src\hpdf_fontdef_tt.obj \
61 src\hpdf_fontdef_type1.obj \
62 src\hpdf_fontdef_base14.obj \
63 src\hpdf_fontdef_cid.obj \
65 src\hpdf_font_type1.obj \
66 src\hpdf_font_tt.obj \
67 src\hpdf_font_cid.obj \
70 src\hpdf_catalog.obj \
71 src\hpdf_page_label.obj\
74 src\hpdf_page_operator.obj \
75 src\hpdf_destination.obj \
76 src\hpdf_annotation.obj \
77 src\hpdf_outline.obj \
79 src\hpdf_encoder_jp.obj \
80 src\hpdf_encoder_kr.obj \
81 src\hpdf_encoder_cns.obj \
82 src\hpdf_encoder_cnt.obj \
83 src\hpdf_fontdef_jp.obj \
84 src\hpdf_fontdef_kr.obj \
85 src\hpdf_fontdef_cns.obj \
86 src\hpdf_fontdef_cnt.obj \
87 src\hpdf_image_png.obj \
88 src\hpdf_image_ccitt.obj \
89 src\hpdf_doc_png.obj \
90 src\hpdf_ext_gstate.obj \
91 src\hpdf_namedict.obj \
92 src\hpdf_3dmeasure.obj \
97 demo\encoding_list.exe \
100 demo\text_demo2.exe \
101 demo\image_demo.exe \
103 demo\jpfont_demo.exe \
105 demo\link_annotation.exe \
106 demo\outline_demo.exe \
108 demo\text_annotation.exe \
109 demo\ttfont_demo.exe \
110 demo\character_map.exe \
111 demo\grid_sheet.exe \
113 demo\raw_image_demo.exe \
114 demo\encryption.exe \
115 demo\permission.exe \
116 demo\slide_show_demo.exe \
117 demo\ext_gstate_demo.exe \
124 if exist *.lib del *.lib
128 -@if exist $(SONAME) del $(SONAME)
129 -@if exist $(LIBAME) del $(LIBNAME)
130 link /DLL /OUT:$(SONAME) $(OBJS) $(RESNAME) $(LDFLAGS) /DEF:$(DEFNAME)
131 rename libhpdf.lib $(LIBNAME)
134 demo: $(LIBTARGET) $(PROGRAMS)
137 if exist src\*.obj del src\*.obj
138 if exist src\*.o del src\*.o
139 if exist *.lib del *.lib
140 if exist *.dll del *.dll
141 if exist demo\*.exe del demo\*.exe
142 if exist demo\*.tds del demo\*.tds
143 if exist *.obj del *.obj
145 install: all installfiles
148 echo target "install" is not supported on windows platforms.
151 $(CC) -Fo$@ $(CFLAGS) -c $*.c
153 demo\encoding_list.exe : demo\encoding_list.c $(LIBTARGET)
154 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\encoding_list.c $(LDFLAGS_DEMO2)
159 demo\font_demo.exe : demo\font_demo.c $(LIBTARGET)
160 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\font_demo.c $(LDFLAGS_DEMO2)
165 demo\text_demo.exe : demo\text_demo.c demo\grid_sheet.c $(LIBTARGET)
166 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\text_demo.c demo\grid_sheet.c $(LDFLAGS_DEMO2)
171 demo\text_demo2.exe : demo\text_demo2.c demo\grid_sheet.c $(LIBTARGET)
172 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\text_demo2.c demo\grid_sheet.c $(LDFLAGS_DEMO2)
177 demo\image_demo.exe : demo\image_demo.c $(LIBTARGET)
178 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\image_demo.c $(LDFLAGS_DEMO2)
183 demo\jpeg_demo.exe : demo\jpeg_demo.c $(LIBTARGET)
184 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\jpeg_demo.c $(LDFLAGS_DEMO2)
189 demo\jpfont_demo.exe : demo\jpfont_demo.c $(LIBTARGET)
190 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\jpfont_demo.c $(LDFLAGS_DEMO2)
195 demo\line_demo.exe : demo\line_demo.c $(LIBTARGET)
196 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\line_demo.c $(LDFLAGS_DEMO2)
201 demo\link_annotation.exe : demo\link_annotation.c $(LIBTARGET)
202 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\link_annotation.c $(LDFLAGS_DEMO2)
204 .\link_annotation.exe
207 demo\outline_demo.exe : demo\outline_demo.c $(LIBTARGET)
208 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\outline_demo.c $(LDFLAGS_DEMO2)
213 demo\png_demo.exe : demo\png_demo.c $(LIBTARGET)
214 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\png_demo.c $(LDFLAGS_DEMO2)
219 demo\text_annotation.exe : demo\text_annotation.c $(LIBTARGET)
220 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\text_annotation.c $(LDFLAGS_DEMO2)
222 .\text_annotation.exe
225 demo\encryption.exe : demo\encryption.c $(LIBTARGET)
226 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\encryption.c $(LDFLAGS_DEMO2)
231 demo\permission.exe : demo\permission.c $(LIBTARGET)
232 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\permission.c $(LDFLAGS_DEMO2)
237 demo\ttfont_demo.exe : demo\ttfont_demo.c $(LIBTARGET)
238 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\ttfont_demo.c $(LDFLAGS_DEMO2)
240 .\ttfont_demo.exe ttfont\PenguinAttack.ttf -E
243 demo\character_map.exe : demo\character_map.c $(LIBTARGET)
244 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\character_map.c $(LDFLAGS_DEMO2)
246 demo\raw_image_demo.exe : demo\raw_image_demo.c $(LIBTARGET)
247 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\grid_sheet.c demo\raw_image_demo.c $(LDFLAGS_DEMO2)
252 demo\arc_demo.exe : demo\arc_demo.c demo\grid_sheet.c $(LIBTARGET)
253 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\grid_sheet.c demo\arc_demo.c $(LDFLAGS_DEMO2)
258 demo\grid_sheet.exe : demo\grid_sheet.c $(LIBTARGET)
259 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) -DSTAND_ALONE $(LDFLAGS_DEMO1) demo\grid_sheet.c $(LDFLAGS_DEMO2)
264 demo\slide_show_demo.exe : demo\slide_show_demo.c $(LIBTARGET)
265 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\slide_show_demo.c $(LDFLAGS_DEMO2)
267 .\slide_show_demo.exe
270 demo\ext_gstate_demo.exe : demo\ext_gstate_demo.c $(LIBTARGET)
271 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\ext_gstate_demo.c $(LDFLAGS_DEMO2)
273 .\ext_gstate_demo.exe