]> git.ipfire.org Git - thirdparty/cups.git/blame - filter/Makefile
Merge CUPS 1.4svn-r7319.
[thirdparty/cups.git] / filter / Makefile
CommitLineData
ef416fc2 1#
355e94dc 2# "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $"
ef416fc2 3#
4# Filter makefile for the Common UNIX Printing System (CUPS).
5#
91c84a35 6# Copyright 2007-2008 by Apple Inc.
bd7854cb 7# Copyright 1997-2006 by Easy Software Products.
ef416fc2 8#
9# These coded instructions, statements, and computer programs are the
bc44d920 10# property of Apple Inc. and are protected by Federal copyright
11# law. Distribution and use rights are outlined in the file "LICENSE.txt"
12# which should have been included with this file. If this file is
13# file is missing or damaged, see the license at "http://www.cups.org/".
ef416fc2 14#
15# This file is subject to the Apple OS-Developed Software exception.
16#
17
18include ../Makedefs
19
b86bc4cf 20
e1d6a774 21FILTERS = gziptoany hpgltops texttops pstops $(IMGFILTERS) \
91c84a35 22 $(PDFTOPS) rastertolabel rastertoepson rastertohp
e1d6a774 23TARGETS = $(FILTERS) \
24 $(LIBCUPSIMAGE) \
25 libcupsimage.a \
26 $(LIB32CUPSIMAGE) \
27 $(LIB64CUPSIMAGE) \
ed486911 28 rasterbench \
e1d6a774 29 testimage \
30 testraster
ef416fc2 31
32HPGLOBJS = hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
33 hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
34IMAGEOBJS = image-bmp.o image-colorspace.o image-gif.o image-jpeg.o \
35 image-photocd.o image-pix.o image-png.o image-pnm.o \
36 image-sgi.o image-sgilib.o image-sun.o image-tiff.o \
f7deaa1a 37 image-zoom.o image.o error.o interpret.o raster.o
e1d6a774 38IMAGE32OBJS = $(IMAGEOBJS:.o=.32.o)
39IMAGE64OBJS = $(IMAGEOBJS:.o=.64.o)
ef416fc2 40FORMOBJS = form-attr.o form-main.o form-ps.o form-text.o form-tree.o
41OBJS = $(HPGLOBJS) $(IMAGEOBJS) $(FORMOBJS) \
91c84a35
MS
42 gziptoany.o imagetops.o imagetoraster.o common.o \
43 pdftops.o pstops.o \
ed486911 44 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
e1d6a774 45 testimage.o testraster.o textcommon.o texttops.o
ef416fc2 46
47
48#
49# Make all targets...
50#
51
e1d6a774 52all: $(TARGETS)
ef416fc2 53
54
55#
56# Clean all object files...
57#
58
59clean:
e1d6a774 60 $(RM) $(OBJS) $(TARGETS)
61 $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib
f301802f 62 $(RM) -r 32bit 64bit
ef416fc2 63
64
65#
66# Update dependencies (without system header dependencies...)
67#
68
69depend:
e1d6a774 70 touch Dependencies.tmp
71 makedepend -Y -I.. -fDependencies.tmp $(OBJS:.o=.c) >/dev/null 2>&1
72 $(RM) Dependencies
73 cp Dependencies.tmp Dependencies
ac884b6a
MS
74 sed -E -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies
75 sed -E -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp >>Dependencies
e1d6a774 76 $(RM) Dependencies.tmp
ef416fc2 77
78
79#
80# Install all targets...
81#
82
e1d6a774 83install: all installhdrs $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
bd7854cb 84 $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
ef416fc2 85 for file in $(FILTERS); do \
86 $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
87 done
88 $(RM) $(SERVERBIN)/filter/rastertodymo
89 $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo
923edb68 90 $(INSTALL_DIR) -m 755 $(LIBDIR)
ef416fc2 91 $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR)
92 -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \
93 $(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
94 $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
95 fi
96 -if test $(LIBCUPSIMAGE) = "libcupsimage.2.dylib"; then \
97 $(STRIP) -x $(LIBDIR)/$(LIBCUPSIMAGE); \
98 $(RM) $(LIBDIR)/libcupsimage.dylib; \
99 $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \
100 fi
09a101d6 101 if test "x$(SYMROOT)" != "x"; then \
102 $(INSTALL_DIR) $(SYMROOT); \
103 for file in $(TARGETS); do \
104 cp $$file $(SYMROOT); \
105 done \
106 fi
923edb68 107
108installstatic:
109 $(INSTALL_DIR) -m 755 $(LIBDIR)
d6ae789d 110 $(INSTALL_LIB) libcupsimage.a $(LIBDIR);
111 $(RANLIB) $(LIBDIR)/libcupsimage.a;
ef416fc2 112
113installhdrs:
bd7854cb 114 $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
ef416fc2 115 $(INSTALL_DATA) image.h $(INCLUDEDIR)/cups
ef416fc2 116
e1d6a774 117install32bit:
118 $(INSTALL_DIR) -m 755 $(LIB32DIR)
f301802f 119 $(INSTALL_LIB) 32bit/libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so.2
ed486911 120 $(LN) libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so
e1d6a774 121
122install64bit:
123 $(INSTALL_DIR) -m 755 $(LIB64DIR)
f301802f 124 $(INSTALL_LIB) 64bit/libcupsimage.so.2 $(LIB64DIR)/libcupsimage.so.2
ed486911 125 $(LN) libcupsimage.so.2 $(LIB64DIR)/libcupsimage.so
e1d6a774 126
ef416fc2 127
757d2cad 128#
129# Uninstall all targets...
130#
131
e1d6a774 132uninstall: $(UNINSTALL32) $(UNINSTALL64)
757d2cad 133 for file in $(FILTERS); do \
134 $(RM) $(SERVERBIN)/filter/$$file; \
135 done
136 $(RM) $(SERVERBIN)/filter/rastertodymo
137 -$(RMDIR) $(SERVERBIN)/filter
138 -$(RMDIR) $(SERVERBIN)
139 $(RM) $(LIBDIR)/libcupsimage.2.dylib
140 $(RM) $(LIBDIR)/libcupsimage.a
141 $(RM) $(LIBDIR)/libcupsimage.dylib
142 $(RM) $(LIBDIR)/libcupsimage_s.a
143 $(RM) $(LIBDIR)/libcupsimage.sl
144 $(RM) $(LIBDIR)/libcupsimage.sl.2
145 $(RM) $(LIBDIR)/libcupsimage.so
146 $(RM) $(LIBDIR)/libcupsimage.so.2
147 -$(RMDIR) $(LIBDIR)
148 $(RM) $(INCLUDEDIR)/cups/image.h
757d2cad 149 -$(RMDIR) $(INCLUDEDIR)/cups
150
e1d6a774 151uninstall32bit:
152 $(RM) $(LIB32DIR)/libcupsimage.so
153 $(RM) $(LIB32DIR)/libcupsimage.so.2
154 -$(RMDIR) $(LIB32DIR)
155
156uninstall64bit:
157 $(RM) $(LIB64DIR)/libcupsimage.so
158 $(RM) $(LIB64DIR)/libcupsimage.so.2
159 -$(RMDIR) $(LIB64DIR)
160
757d2cad 161
b423cd4c 162#
163# Automatic API help files...
164#
165
166apihelp:
167 echo Generating CUPS API help files...
168 mxmldoc --section "Programming" --title "Raster API" \
5a738aea
MS
169 --css ../doc/cups-printable.css \
170 --header api-raster.header --intro api-raster.shtml \
ac884b6a
MS
171 ../cups/raster.h interpret.c raster.c \
172 >../doc/help/api-raster.html
b423cd4c 173
5a738aea
MS
174framedhelp:
175 echo Generating CUPS API help files...
176 mxmldoc --section "Programming" --title "Raster API" \
177 --framed ../cups/api-raster \
178 --css ../doc/cups-printable.css \
179 --header api-raster.header --intro api-raster.shtml \
ac884b6a 180 ../cups/raster.h interpret.c raster.c
5a738aea 181
b423cd4c 182
ef416fc2 183#
184# formtops
185#
186
187formtops: $(FORMOBJS) common.o ../cups/$(LIBCUPS)
188 echo Linking $@...
189 $(CC) $(LDFLAGS) -o $@ $(FORMOBJS) common.o $(LIBS) -lm
190
191
192#
193# gziptoany
194#
195
196gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
197 echo Linking $@...
198 $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
199
200
201#
202# hpgltops
203#
204
205hpgltops: $(HPGLOBJS) common.o ../cups/$(LIBCUPS)
206 echo Linking $@...
207 $(CC) $(LDFLAGS) -o $@ $(HPGLOBJS) common.o $(LIBS) -lm
208
209
210#
211# libcupsimage.so.2, libcupsimage.sl.2
212#
213
214libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS)
215 echo Linking $@...
a74454a7 216 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \
217 -L../cups $(LINKCUPS) -lm
ef416fc2 218 $(RM) `basename $@ .2`
219 $(LN) $@ `basename $@ .2`
220
221
e1d6a774 222#
f301802f 223# 32bit/libcupsimage.so.2
e1d6a774 224#
225
f301802f 22632bit/libcupsimage.so.2: $(IMAGE32OBJS)
e1d6a774 227 echo Linking 32-bit $@...
f301802f 228 -mkdir 32bit
229 $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(IMAGE32OBJS) $(DSOLIBS) \
230 -L../cups/32bit $(LINKCUPS) -lm
e1d6a774 231
232
233#
f301802f 234# 64bit/libcupsimage.so.2
e1d6a774 235#
236
f301802f 23764bit/libcupsimage.so.2: $(IMAGE64OBJS)
e1d6a774 238 echo Linking 64-bit $@...
f301802f 239 -mkdir 64bit
240 $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(IMAGE64OBJS) $(DSOLIBS) \
241 -L../cups/64bit $(LINKCUPS) -lm
e1d6a774 242
243
ef416fc2 244#
245# libcupsimage.2.dylib
246#
247
355e94dc 248libcupsimage.2.dylib: $(IMAGEOBJS) $(LIBCUPSIMAGEORDER)
ef416fc2 249 echo Linking $@...
e1d6a774 250 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
fa73b229 251 -install_name $(libdir)/$@ \
f7deaa1a 252 -current_version 2.3.0 \
ef416fc2 253 -compatibility_version 2.0.0 \
cc0d019f 254 -sectorder __TEXT __text $(LIBCUPSIMAGEORDER) \
ef416fc2 255 $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm
256 $(RM) libcupsimage.dylib
257 $(LN) $@ libcupsimage.dylib
258
259
260#
261# libcupsimage_s.a
262#
263
a74454a7 264libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp
ef416fc2 265 echo Linking $@...
e1d6a774 266 $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \
267 -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS) -lm
ef416fc2 268 $(RM) $@
269 $(AR) $(ARFLAGS) $@ libcupsimage_s.o
270
271
272#
273# libcupsimage.la
274#
275
276libcupsimage.la: $(IMAGEOBJS)
277 echo Linking $@...
e1d6a774 278 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
a74454a7 279 -L../cups $(LINKCUPS) \
f7deaa1a 280 -rpath $(LIBDIR) -version-info 2:3
ef416fc2 281
282
283#
284# libcupsimage.a
285#
286
287libcupsimage.a: $(IMAGEOBJS)
288 echo Archiving $@...
289 $(RM) $@
290 $(AR) $(ARFLAGS) $@ $(IMAGEOBJS)
291 $(RANLIB) $@
292
293
294#
295# testimage
296#
297
298testimage: testimage.o libcupsimage.a ../Makedefs
299 echo Linking $@...
300 $(CC) $(LDFLAGS) -o $@ testimage.o libcupsimage.a \
301 $(IMGLIBS) $(DSOLIBS) $(LIBS)
302
303
304#
305# imagetops
306#
307
308imagetops: imagetops.o common.o $(LIBCUPSIMAGE) \
309 ../cups/$(LIBCUPS)
310 echo Linking $@...
311 $(CC) $(LDFLAGS) -o $@ imagetops.o common.o $(LINKCUPSIMAGE) \
312 $(IMGLIBS) $(LIBS)
313
314
315#
316# imagetoraster
317#
318
319imagetoraster: imagetoraster.o common.o $(LIBCUPSIMAGE) \
320 ../cups/$(LIBCUPS)
321 echo Linking $@...
322 $(CC) $(LDFLAGS) -o $@ imagetoraster.o common.o $(LINKCUPSIMAGE) \
323 $(IMGLIBS) $(LIBS)
324
325
326#
327# pstops
328#
329
330pstops: pstops.o common.o ../cups/$(LIBCUPS)
331 echo Linking $@...
bd7854cb 332 $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) -lm
ef416fc2 333
334
91c84a35
MS
335#
336# pdftops
337#
338
339pdftops: pdftops.o common.o ../cups/$(LIBCUPS)
340 echo Linking $@...
341 $(CC) $(LDFLAGS) -o $@ pdftops.o common.o $(LIBS)
342
343
ef416fc2 344#
345# rastertolabel
346#
347
348rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
349 echo Linking $@...
350 $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
351
352
353#
354# rastertoepson
355#
356
357rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
358 echo Linking $@...
359 $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
360
361
362#
363# rastertohp
364#
365
366rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
367 echo Linking $@...
368 $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
369
370
371#
372# testraster
373#
374
b86bc4cf 375testraster: testraster.o ../cups/libcups.a libcupsimage.a
ef416fc2 376 echo Linking $@...
b86bc4cf 377 $(CC) $(LDFLAGS) -o $@ testraster.o libcupsimage.a ../cups/libcups.a \
f7deaa1a 378 $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) $(SSLLIBS) $(LIBGSSAPI)
ef416fc2 379
380
ed486911 381#
382# rasterbench
383#
384
f7deaa1a 385rasterbench: rasterbench.o libcupsimage.a
ed486911 386 echo Linking $@...
f7deaa1a 387 $(CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS)
ed486911 388
389
ef416fc2 390#
391# texttops
392#
393
394texttops: texttops.o textcommon.o common.o \
395 ../cups/$(LIBCUPS)
396 echo Linking $@...
397 $(CC) $(LDFLAGS) -o $@ texttops.o textcommon.o common.o $(LIBS)
398
399
400#
401# Dependencies...
402#
403
404include Dependencies
405
406
407#
355e94dc 408# End of "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $".
ef416fc2 409#