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
21 CFLAGS=-WM -O2 -d -q -w-8057 -w-8012 -Iinclude -Iwin32\include -nsrc -DHPDF_DLL_MAKE
22 CFLAGS_DEMO=-WM -O2 -d -q -w-8057 -w-8012 -Iinclude -Iwin32\include -D__WIN32__ -DHPDF_DLL
24 LDFLAGS=/Lwin32\bcc32 libpng.lib zlib.lib
25 LDFLAGS_DEMO1=/L. /Lwin32\bcc32 libhpdf.lib
28 RESNAME=win32/bcc32/libhpdf.res
35 src\hpdf_streams.obj \
36 src\hpdf_objects.obj \
38 src\hpdf_boolean.obj \
45 src\hpdf_encoder.obj \
48 src\hpdf_encrypt.obj \
49 src\hpdf_encryptdict.obj \
50 src\hpdf_fontdef.obj \
51 src\hpdf_fontdef_tt.obj \
52 src\hpdf_fontdef_type1.obj \
53 src\hpdf_fontdef_base14.obj \
54 src\hpdf_fontdef_cid.obj \
56 src\hpdf_font_type1.obj \
57 src\hpdf_font_tt.obj \
58 src\hpdf_font_cid.obj \
61 src\hpdf_catalog.obj \
62 src\hpdf_page_label.obj\
65 src\hpdf_page_operator.obj \
66 src\hpdf_destination.obj \
67 src\hpdf_annotation.obj \
68 src\hpdf_outline.obj \
70 src\hpdf_encoder_jp.obj \
71 src\hpdf_encoder_kr.obj \
72 src\hpdf_encoder_cns.obj \
73 src\hpdf_encoder_cnt.obj \
74 src\hpdf_fontdef_jp.obj \
75 src\hpdf_fontdef_kr.obj \
76 src\hpdf_fontdef_cns.obj \
77 src\hpdf_fontdef_cnt.obj \
78 src\hpdf_image_png.obj \
79 src\hpdf_image_ccitt.obj \
80 src\hpdf_doc_png.obj \
81 src\hpdf_ext_gstate.obj \
82 src\hpdf_3dmeasure.obj \
83 src\hpdf_namedict.obj \
88 demo\encoding_list.exe \
94 demo\jpfont_demo.exe \
96 demo\link_annotation.exe \
97 demo\outline_demo.exe \
99 demo\text_annotation.exe \
100 demo\ttfont_demo.exe \
101 demo\character_map.exe \
102 demo\grid_sheet.exe \
104 demo\raw_image_demo.exe \
105 demo\encryption.exe \
106 demo\permission.exe \
107 demo\slide_show_demo.exe \
108 demo\ext_gstate_demo.exe \
115 if exist *.lib del *.lib
116 tlib /a $@ +$(OBJS),$@.txt
119 -@if exist libhpdf* del libhpdf*
120 $(CC) -O2 -WD -e$(SONAME) -DHPDF_DLL_MAKE $(LDFLAGS) $(OBJS)
121 implib -f $(LIBNAME) $(SONAME)
125 demo: $(LIBTARGET) $(PROGRAMS)
128 if exist src\*.obj del src\*.obj
129 if exist src\*.o del src\*.o
130 if exist *.lib del *.lib
131 if exist *.dll del *.dll
132 if exist demo\*.exe del demo\*.exe
133 if exist demo\*.tds del demo\*.tds
134 if exist *.obj del *.obj
136 install: all installfiles
139 echo target "install" is not supported on windows platforms.
148 $(CC) $(CFLAGS) -c $*.c
150 demo\encoding_list.exe : demo\encoding_list.c $(LIBTARGET)
151 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\encoding_list.c $(LDFLAGS_DEMO2)
156 demo\font_demo.exe : demo\font_demo.c $(LIBTARGET)
157 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\font_demo.c $(LDFLAGS_DEMO2)
162 demo\text_demo.exe : demo\text_demo.c demo\grid_sheet.c $(LIBTARGET)
163 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\text_demo.c demo\grid_sheet.c $(LDFLAGS_DEMO2)
168 demo\text_demo2.exe : demo\text_demo2.c demo\grid_sheet.c $(LIBTARGET)
169 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\text_demo2.c demo\grid_sheet.c $(LDFLAGS_DEMO2)
174 demo\image_demo.exe : demo\image_demo.c $(LIBTARGET)
175 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\image_demo.c $(LDFLAGS_DEMO2)
180 demo\jpeg_demo.exe : demo\jpeg_demo.c $(LIBTARGET)
181 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\jpeg_demo.c $(LDFLAGS_DEMO2)
186 demo\jpfont_demo.exe : demo\jpfont_demo.c $(LIBTARGET)
187 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\jpfont_demo.c $(LDFLAGS_DEMO2)
192 demo\line_demo.exe : demo\line_demo.c $(LIBTARGET)
193 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\line_demo.c $(LDFLAGS_DEMO2)
198 demo\link_annotation.exe : demo\link_annotation.c $(LIBTARGET)
199 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\link_annotation.c $(LDFLAGS_DEMO2)
201 .\link_annotation.exe
204 demo\outline_demo.exe : demo\outline_demo.c $(LIBTARGET)
205 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\outline_demo.c $(LDFLAGS_DEMO2)
210 demo\png_demo.exe : demo\png_demo.c $(LIBTARGET)
211 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\png_demo.c $(LDFLAGS_DEMO2)
216 demo\text_annotation.exe : demo\text_annotation.c $(LIBTARGET)
217 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\text_annotation.c $(LDFLAGS_DEMO2)
219 .\text_annotation.exe
222 demo\encryption.exe : demo\encryption.c $(LIBTARGET)
223 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\encryption.c $(LDFLAGS_DEMO2)
228 demo\permission.exe : demo\permission.c $(LIBTARGET)
229 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\permission.c $(LDFLAGS_DEMO2)
234 demo\ttfont_demo.exe : demo\ttfont_demo.c $(LIBTARGET)
235 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\ttfont_demo.c $(LDFLAGS_DEMO2)
237 .\ttfont_demo.exe ttfont\PenguinAttack.ttf -E
240 demo\character_map.exe : demo\character_map.c $(LIBTARGET)
241 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\character_map.c $(LDFLAGS_DEMO2)
243 demo\raw_image_demo.exe : demo\raw_image_demo.c $(LIBTARGET)
244 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\grid_sheet.c demo\raw_image_demo.c $(LDFLAGS_DEMO2)
249 demo\arc_demo.exe : demo\arc_demo.c demo\grid_sheet.c $(LIBTARGET)
250 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\grid_sheet.c demo\arc_demo.c $(LDFLAGS_DEMO2)
255 demo\grid_sheet.exe : demo\grid_sheet.c $(LIBTARGET)
256 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) -DSTAND_ALONE $(LDFLAGS_DEMO1) demo\grid_sheet.c $(LDFLAGS_DEMO2)
261 demo\slide_show_demo.exe : demo\slide_show_demo.c $(LIBTARGET)
262 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\slide_show_demo.c $(LDFLAGS_DEMO2)
264 .\slide_show_demo.exe
267 demo\ext_gstate_demo.exe : demo\ext_gstate_demo.c $(LIBTARGET)
268 $(CC) $(CFLAGS_EXE)$@ $(CFLAGS_DEMO) $(LDFLAGS_DEMO1) demo\ext_gstate_demo.c $(LDFLAGS_DEMO2)
270 .\ext_gstate_demo.exe