]> git.ipfire.org Git - thirdparty/cups.git/blame - filter/Makefile
Merge fixes from CUPS 1.4svn-r7555.
[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
7a14d768 21FILTERS = commandtops 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) \
7a14d768 42 commandtops.o gziptoany.o imagetops.o imagetoraster.o common.o \
91c84a35 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
50fe7201
MS
83install: all install-data install-headers install-libs install-exec
84
85
86#
87# Install data files...
88#
89
90install-data:
91
92
93#
94# Install programs...
95#
96
97install-exec:
bd7854cb 98 $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
ef416fc2 99 for file in $(FILTERS); do \
100 $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
101 done
102 $(RM) $(SERVERBIN)/filter/rastertodymo
103 $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo
50fe7201
MS
104 if test "x$(SYMROOT)" != "x"; then \
105 $(INSTALL_DIR) $(SYMROOT); \
106 for file in $(TARGETS); do \
107 cp $$file $(SYMROOT); \
108 done \
109 fi
110
111
112#
113# Install headers...
114#
115
116install-headers:
117 $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
118 $(INSTALL_DATA) image.h $(INCLUDEDIR)/cups
119
120
121#
122# Install libraries...
123#
124
125install-libs: $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
923edb68 126 $(INSTALL_DIR) -m 755 $(LIBDIR)
ef416fc2 127 $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR)
128 -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \
129 $(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
130 $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
131 fi
132 -if test $(LIBCUPSIMAGE) = "libcupsimage.2.dylib"; then \
ef416fc2 133 $(RM) $(LIBDIR)/libcupsimage.dylib; \
134 $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \
135 fi
923edb68 136
137installstatic:
138 $(INSTALL_DIR) -m 755 $(LIBDIR)
d6ae789d 139 $(INSTALL_LIB) libcupsimage.a $(LIBDIR);
140 $(RANLIB) $(LIBDIR)/libcupsimage.a;
ef416fc2 141
e1d6a774 142install32bit:
143 $(INSTALL_DIR) -m 755 $(LIB32DIR)
f301802f 144 $(INSTALL_LIB) 32bit/libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so.2
ed486911 145 $(LN) libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so
e1d6a774 146
147install64bit:
148 $(INSTALL_DIR) -m 755 $(LIB64DIR)
f301802f 149 $(INSTALL_LIB) 64bit/libcupsimage.so.2 $(LIB64DIR)/libcupsimage.so.2
ed486911 150 $(LN) libcupsimage.so.2 $(LIB64DIR)/libcupsimage.so
e1d6a774 151
ef416fc2 152
757d2cad 153#
154# Uninstall all targets...
155#
156
e1d6a774 157uninstall: $(UNINSTALL32) $(UNINSTALL64)
757d2cad 158 for file in $(FILTERS); do \
159 $(RM) $(SERVERBIN)/filter/$$file; \
160 done
161 $(RM) $(SERVERBIN)/filter/rastertodymo
162 -$(RMDIR) $(SERVERBIN)/filter
163 -$(RMDIR) $(SERVERBIN)
164 $(RM) $(LIBDIR)/libcupsimage.2.dylib
165 $(RM) $(LIBDIR)/libcupsimage.a
166 $(RM) $(LIBDIR)/libcupsimage.dylib
167 $(RM) $(LIBDIR)/libcupsimage_s.a
168 $(RM) $(LIBDIR)/libcupsimage.sl
169 $(RM) $(LIBDIR)/libcupsimage.sl.2
170 $(RM) $(LIBDIR)/libcupsimage.so
171 $(RM) $(LIBDIR)/libcupsimage.so.2
172 -$(RMDIR) $(LIBDIR)
173 $(RM) $(INCLUDEDIR)/cups/image.h
757d2cad 174 -$(RMDIR) $(INCLUDEDIR)/cups
175
e1d6a774 176uninstall32bit:
177 $(RM) $(LIB32DIR)/libcupsimage.so
178 $(RM) $(LIB32DIR)/libcupsimage.so.2
179 -$(RMDIR) $(LIB32DIR)
180
181uninstall64bit:
182 $(RM) $(LIB64DIR)/libcupsimage.so
183 $(RM) $(LIB64DIR)/libcupsimage.so.2
184 -$(RMDIR) $(LIB64DIR)
185
757d2cad 186
b423cd4c 187#
188# Automatic API help files...
189#
190
191apihelp:
192 echo Generating CUPS API help files...
193 mxmldoc --section "Programming" --title "Raster API" \
5a738aea
MS
194 --css ../doc/cups-printable.css \
195 --header api-raster.header --intro api-raster.shtml \
ac884b6a
MS
196 ../cups/raster.h interpret.c raster.c \
197 >../doc/help/api-raster.html
b423cd4c 198
5a738aea
MS
199framedhelp:
200 echo Generating CUPS API help files...
201 mxmldoc --section "Programming" --title "Raster API" \
202 --framed ../cups/api-raster \
203 --css ../doc/cups-printable.css \
204 --header api-raster.header --intro api-raster.shtml \
ac884b6a 205 ../cups/raster.h interpret.c raster.c
5a738aea 206
b423cd4c 207
7a14d768
MS
208#
209# commandtops
210#
211
212commandtops: commandtops.o ../cups/$(LIBCUPS)
213 echo Linking $@...
214 $(CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS)
215
216
ef416fc2 217#
218# formtops
219#
220
221formtops: $(FORMOBJS) common.o ../cups/$(LIBCUPS)
222 echo Linking $@...
223 $(CC) $(LDFLAGS) -o $@ $(FORMOBJS) common.o $(LIBS) -lm
224
225
226#
227# gziptoany
228#
229
230gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
231 echo Linking $@...
232 $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
233
234
235#
236# hpgltops
237#
238
239hpgltops: $(HPGLOBJS) common.o ../cups/$(LIBCUPS)
240 echo Linking $@...
241 $(CC) $(LDFLAGS) -o $@ $(HPGLOBJS) common.o $(LIBS) -lm
242
243
244#
245# libcupsimage.so.2, libcupsimage.sl.2
246#
247
248libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS)
249 echo Linking $@...
a74454a7 250 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \
251 -L../cups $(LINKCUPS) -lm
ef416fc2 252 $(RM) `basename $@ .2`
253 $(LN) $@ `basename $@ .2`
254
255
e1d6a774 256#
f301802f 257# 32bit/libcupsimage.so.2
e1d6a774 258#
259
f301802f 26032bit/libcupsimage.so.2: $(IMAGE32OBJS)
e1d6a774 261 echo Linking 32-bit $@...
f301802f 262 -mkdir 32bit
263 $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(IMAGE32OBJS) $(DSOLIBS) \
264 -L../cups/32bit $(LINKCUPS) -lm
e1d6a774 265
266
267#
f301802f 268# 64bit/libcupsimage.so.2
e1d6a774 269#
270
f301802f 27164bit/libcupsimage.so.2: $(IMAGE64OBJS)
e1d6a774 272 echo Linking 64-bit $@...
f301802f 273 -mkdir 64bit
274 $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(IMAGE64OBJS) $(DSOLIBS) \
275 -L../cups/64bit $(LINKCUPS) -lm
e1d6a774 276
277
ef416fc2 278#
279# libcupsimage.2.dylib
280#
281
355e94dc 282libcupsimage.2.dylib: $(IMAGEOBJS) $(LIBCUPSIMAGEORDER)
ef416fc2 283 echo Linking $@...
e1d6a774 284 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
fa73b229 285 -install_name $(libdir)/$@ \
f7deaa1a 286 -current_version 2.3.0 \
ef416fc2 287 -compatibility_version 2.0.0 \
cc0d019f 288 -sectorder __TEXT __text $(LIBCUPSIMAGEORDER) \
ef416fc2 289 $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm
290 $(RM) libcupsimage.dylib
291 $(LN) $@ libcupsimage.dylib
292
293
294#
295# libcupsimage_s.a
296#
297
a74454a7 298libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp
ef416fc2 299 echo Linking $@...
e1d6a774 300 $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \
301 -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS) -lm
ef416fc2 302 $(RM) $@
303 $(AR) $(ARFLAGS) $@ libcupsimage_s.o
304
305
306#
307# libcupsimage.la
308#
309
310libcupsimage.la: $(IMAGEOBJS)
311 echo Linking $@...
e1d6a774 312 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
a74454a7 313 -L../cups $(LINKCUPS) \
f7deaa1a 314 -rpath $(LIBDIR) -version-info 2:3
ef416fc2 315
316
317#
318# libcupsimage.a
319#
320
321libcupsimage.a: $(IMAGEOBJS)
322 echo Archiving $@...
323 $(RM) $@
324 $(AR) $(ARFLAGS) $@ $(IMAGEOBJS)
325 $(RANLIB) $@
326
327
328#
329# testimage
330#
331
332testimage: testimage.o libcupsimage.a ../Makedefs
333 echo Linking $@...
334 $(CC) $(LDFLAGS) -o $@ testimage.o libcupsimage.a \
335 $(IMGLIBS) $(DSOLIBS) $(LIBS)
336
337
338#
339# imagetops
340#
341
342imagetops: imagetops.o common.o $(LIBCUPSIMAGE) \
343 ../cups/$(LIBCUPS)
344 echo Linking $@...
345 $(CC) $(LDFLAGS) -o $@ imagetops.o common.o $(LINKCUPSIMAGE) \
346 $(IMGLIBS) $(LIBS)
347
348
349#
350# imagetoraster
351#
352
353imagetoraster: imagetoraster.o common.o $(LIBCUPSIMAGE) \
354 ../cups/$(LIBCUPS)
355 echo Linking $@...
356 $(CC) $(LDFLAGS) -o $@ imagetoraster.o common.o $(LINKCUPSIMAGE) \
357 $(IMGLIBS) $(LIBS)
358
359
360#
361# pstops
362#
363
364pstops: pstops.o common.o ../cups/$(LIBCUPS)
365 echo Linking $@...
bd7854cb 366 $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) -lm
ef416fc2 367
368
91c84a35
MS
369#
370# pdftops
371#
372
373pdftops: pdftops.o common.o ../cups/$(LIBCUPS)
374 echo Linking $@...
375 $(CC) $(LDFLAGS) -o $@ pdftops.o common.o $(LIBS)
376
377
ef416fc2 378#
379# rastertolabel
380#
381
382rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
383 echo Linking $@...
384 $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
385
386
387#
388# rastertoepson
389#
390
391rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
392 echo Linking $@...
393 $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
394
395
396#
397# rastertohp
398#
399
400rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
401 echo Linking $@...
402 $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
403
404
405#
406# testraster
407#
408
b86bc4cf 409testraster: testraster.o ../cups/libcups.a libcupsimage.a
ef416fc2 410 echo Linking $@...
b86bc4cf 411 $(CC) $(LDFLAGS) -o $@ testraster.o libcupsimage.a ../cups/libcups.a \
f7deaa1a 412 $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) $(SSLLIBS) $(LIBGSSAPI)
ef416fc2 413
414
ed486911 415#
416# rasterbench
417#
418
f7deaa1a 419rasterbench: rasterbench.o libcupsimage.a
ed486911 420 echo Linking $@...
f7deaa1a 421 $(CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS)
ed486911 422
423
ef416fc2 424#
425# texttops
426#
427
428texttops: texttops.o textcommon.o common.o \
429 ../cups/$(LIBCUPS)
430 echo Linking $@...
431 $(CC) $(LDFLAGS) -o $@ texttops.o textcommon.o common.o $(LIBS)
432
433
434#
435# Dependencies...
436#
437
438include Dependencies
439
440
441#
355e94dc 442# End of "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $".
ef416fc2 443#