]> git.ipfire.org Git - thirdparty/cups.git/blame - filter/Makefile
Merge changes from CUPS trunk, r7566.
[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
c9fc04c6
MS
21FILTERS = \
22 commandtops \
23 gziptoany \
24 hpgltops \
25 texttops \
26 pstops \
27 $(IMGFILTERS) \
28 $(PDFTOPS) \
29 rastertolabel \
30 rastertoepson \
31 rastertohp
32LIBTARGETS = \
e1d6a774 33 $(LIBCUPSIMAGE) \
34 libcupsimage.a \
35 $(LIB32CUPSIMAGE) \
36 $(LIB64CUPSIMAGE) \
e1d6a774 37 testraster
c9fc04c6
MS
38TARGETS = \
39 $(LIBTARGETS) \
40 $(FILTERS) \
41 rasterbench \
42 testimage
ef416fc2 43
44HPGLOBJS = hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
45 hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
46IMAGEOBJS = image-bmp.o image-colorspace.o image-gif.o image-jpeg.o \
47 image-photocd.o image-pix.o image-png.o image-pnm.o \
48 image-sgi.o image-sgilib.o image-sun.o image-tiff.o \
f7deaa1a 49 image-zoom.o image.o error.o interpret.o raster.o
e1d6a774 50IMAGE32OBJS = $(IMAGEOBJS:.o=.32.o)
51IMAGE64OBJS = $(IMAGEOBJS:.o=.64.o)
ef416fc2 52FORMOBJS = form-attr.o form-main.o form-ps.o form-text.o form-tree.o
53OBJS = $(HPGLOBJS) $(IMAGEOBJS) $(FORMOBJS) \
7a14d768 54 commandtops.o gziptoany.o imagetops.o imagetoraster.o common.o \
91c84a35 55 pdftops.o pstops.o \
ed486911 56 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
e1d6a774 57 testimage.o testraster.o textcommon.o texttops.o
ef416fc2 58
59
60#
61# Make all targets...
62#
63
e1d6a774 64all: $(TARGETS)
ef416fc2 65
66
c9fc04c6
MS
67#
68# Make library targets...
69#
70
71libs: $(LIBTARGETS)
72
73
ef416fc2 74#
75# Clean all object files...
76#
77
78clean:
e1d6a774 79 $(RM) $(OBJS) $(TARGETS)
80 $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib
f301802f 81 $(RM) -r 32bit 64bit
ef416fc2 82
83
84#
85# Update dependencies (without system header dependencies...)
86#
87
88depend:
e1d6a774 89 touch Dependencies.tmp
90 makedepend -Y -I.. -fDependencies.tmp $(OBJS:.o=.c) >/dev/null 2>&1
91 $(RM) Dependencies
92 cp Dependencies.tmp Dependencies
ac884b6a
MS
93 sed -E -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies
94 sed -E -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp >>Dependencies
e1d6a774 95 $(RM) Dependencies.tmp
ef416fc2 96
97
98#
99# Install all targets...
100#
101
50fe7201
MS
102install: all install-data install-headers install-libs install-exec
103
104
105#
106# Install data files...
107#
108
109install-data:
110
111
112#
113# Install programs...
114#
115
116install-exec:
bd7854cb 117 $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
ef416fc2 118 for file in $(FILTERS); do \
119 $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
120 done
121 $(RM) $(SERVERBIN)/filter/rastertodymo
122 $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo
50fe7201
MS
123 if test "x$(SYMROOT)" != "x"; then \
124 $(INSTALL_DIR) $(SYMROOT); \
125 for file in $(TARGETS); do \
126 cp $$file $(SYMROOT); \
127 done \
128 fi
129
130
131#
132# Install headers...
133#
134
135install-headers:
136 $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
137 $(INSTALL_DATA) image.h $(INCLUDEDIR)/cups
138
139
140#
141# Install libraries...
142#
143
144install-libs: $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
923edb68 145 $(INSTALL_DIR) -m 755 $(LIBDIR)
ef416fc2 146 $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR)
147 -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \
148 $(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
149 $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
150 fi
151 -if test $(LIBCUPSIMAGE) = "libcupsimage.2.dylib"; then \
ef416fc2 152 $(RM) $(LIBDIR)/libcupsimage.dylib; \
153 $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \
154 fi
923edb68 155
156installstatic:
157 $(INSTALL_DIR) -m 755 $(LIBDIR)
d6ae789d 158 $(INSTALL_LIB) libcupsimage.a $(LIBDIR);
159 $(RANLIB) $(LIBDIR)/libcupsimage.a;
ef416fc2 160
e1d6a774 161install32bit:
162 $(INSTALL_DIR) -m 755 $(LIB32DIR)
f301802f 163 $(INSTALL_LIB) 32bit/libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so.2
ed486911 164 $(LN) libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so
e1d6a774 165
166install64bit:
167 $(INSTALL_DIR) -m 755 $(LIB64DIR)
f301802f 168 $(INSTALL_LIB) 64bit/libcupsimage.so.2 $(LIB64DIR)/libcupsimage.so.2
ed486911 169 $(LN) libcupsimage.so.2 $(LIB64DIR)/libcupsimage.so
e1d6a774 170
ef416fc2 171
757d2cad 172#
173# Uninstall all targets...
174#
175
e1d6a774 176uninstall: $(UNINSTALL32) $(UNINSTALL64)
757d2cad 177 for file in $(FILTERS); do \
178 $(RM) $(SERVERBIN)/filter/$$file; \
179 done
180 $(RM) $(SERVERBIN)/filter/rastertodymo
181 -$(RMDIR) $(SERVERBIN)/filter
182 -$(RMDIR) $(SERVERBIN)
183 $(RM) $(LIBDIR)/libcupsimage.2.dylib
184 $(RM) $(LIBDIR)/libcupsimage.a
185 $(RM) $(LIBDIR)/libcupsimage.dylib
186 $(RM) $(LIBDIR)/libcupsimage_s.a
187 $(RM) $(LIBDIR)/libcupsimage.sl
188 $(RM) $(LIBDIR)/libcupsimage.sl.2
189 $(RM) $(LIBDIR)/libcupsimage.so
190 $(RM) $(LIBDIR)/libcupsimage.so.2
191 -$(RMDIR) $(LIBDIR)
192 $(RM) $(INCLUDEDIR)/cups/image.h
757d2cad 193 -$(RMDIR) $(INCLUDEDIR)/cups
194
e1d6a774 195uninstall32bit:
196 $(RM) $(LIB32DIR)/libcupsimage.so
197 $(RM) $(LIB32DIR)/libcupsimage.so.2
198 -$(RMDIR) $(LIB32DIR)
199
200uninstall64bit:
201 $(RM) $(LIB64DIR)/libcupsimage.so
202 $(RM) $(LIB64DIR)/libcupsimage.so.2
203 -$(RMDIR) $(LIB64DIR)
204
757d2cad 205
b423cd4c 206#
207# Automatic API help files...
208#
209
210apihelp:
211 echo Generating CUPS API help files...
212 mxmldoc --section "Programming" --title "Raster API" \
5a738aea
MS
213 --css ../doc/cups-printable.css \
214 --header api-raster.header --intro api-raster.shtml \
ac884b6a
MS
215 ../cups/raster.h interpret.c raster.c \
216 >../doc/help/api-raster.html
b423cd4c 217
5a738aea
MS
218framedhelp:
219 echo Generating CUPS API help files...
220 mxmldoc --section "Programming" --title "Raster API" \
221 --framed ../cups/api-raster \
222 --css ../doc/cups-printable.css \
223 --header api-raster.header --intro api-raster.shtml \
ac884b6a 224 ../cups/raster.h interpret.c raster.c
5a738aea 225
b423cd4c 226
7a14d768
MS
227#
228# commandtops
229#
230
231commandtops: commandtops.o ../cups/$(LIBCUPS)
232 echo Linking $@...
233 $(CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS)
234
235
ef416fc2 236#
237# formtops
238#
239
240formtops: $(FORMOBJS) common.o ../cups/$(LIBCUPS)
241 echo Linking $@...
242 $(CC) $(LDFLAGS) -o $@ $(FORMOBJS) common.o $(LIBS) -lm
243
244
245#
246# gziptoany
247#
248
249gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
250 echo Linking $@...
251 $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
252
253
254#
255# hpgltops
256#
257
258hpgltops: $(HPGLOBJS) common.o ../cups/$(LIBCUPS)
259 echo Linking $@...
260 $(CC) $(LDFLAGS) -o $@ $(HPGLOBJS) common.o $(LIBS) -lm
261
262
263#
264# libcupsimage.so.2, libcupsimage.sl.2
265#
266
267libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS)
268 echo Linking $@...
a74454a7 269 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \
270 -L../cups $(LINKCUPS) -lm
ef416fc2 271 $(RM) `basename $@ .2`
272 $(LN) $@ `basename $@ .2`
273
274
e1d6a774 275#
f301802f 276# 32bit/libcupsimage.so.2
e1d6a774 277#
278
f301802f 27932bit/libcupsimage.so.2: $(IMAGE32OBJS)
e1d6a774 280 echo Linking 32-bit $@...
f301802f 281 -mkdir 32bit
282 $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(IMAGE32OBJS) $(DSOLIBS) \
283 -L../cups/32bit $(LINKCUPS) -lm
e1d6a774 284
285
286#
f301802f 287# 64bit/libcupsimage.so.2
e1d6a774 288#
289
f301802f 29064bit/libcupsimage.so.2: $(IMAGE64OBJS)
e1d6a774 291 echo Linking 64-bit $@...
f301802f 292 -mkdir 64bit
293 $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(IMAGE64OBJS) $(DSOLIBS) \
294 -L../cups/64bit $(LINKCUPS) -lm
e1d6a774 295
296
ef416fc2 297#
298# libcupsimage.2.dylib
299#
300
355e94dc 301libcupsimage.2.dylib: $(IMAGEOBJS) $(LIBCUPSIMAGEORDER)
ef416fc2 302 echo Linking $@...
e1d6a774 303 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
fa73b229 304 -install_name $(libdir)/$@ \
f7deaa1a 305 -current_version 2.3.0 \
ef416fc2 306 -compatibility_version 2.0.0 \
cc0d019f 307 -sectorder __TEXT __text $(LIBCUPSIMAGEORDER) \
ef416fc2 308 $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm
309 $(RM) libcupsimage.dylib
310 $(LN) $@ libcupsimage.dylib
311
312
313#
314# libcupsimage_s.a
315#
316
a74454a7 317libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp
ef416fc2 318 echo Linking $@...
e1d6a774 319 $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \
320 -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS) -lm
ef416fc2 321 $(RM) $@
322 $(AR) $(ARFLAGS) $@ libcupsimage_s.o
323
324
325#
326# libcupsimage.la
327#
328
329libcupsimage.la: $(IMAGEOBJS)
330 echo Linking $@...
e1d6a774 331 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
a74454a7 332 -L../cups $(LINKCUPS) \
f7deaa1a 333 -rpath $(LIBDIR) -version-info 2:3
ef416fc2 334
335
336#
337# libcupsimage.a
338#
339
340libcupsimage.a: $(IMAGEOBJS)
341 echo Archiving $@...
342 $(RM) $@
343 $(AR) $(ARFLAGS) $@ $(IMAGEOBJS)
344 $(RANLIB) $@
345
346
347#
348# testimage
349#
350
351testimage: testimage.o libcupsimage.a ../Makedefs
352 echo Linking $@...
353 $(CC) $(LDFLAGS) -o $@ testimage.o libcupsimage.a \
354 $(IMGLIBS) $(DSOLIBS) $(LIBS)
355
356
357#
358# imagetops
359#
360
361imagetops: imagetops.o common.o $(LIBCUPSIMAGE) \
362 ../cups/$(LIBCUPS)
363 echo Linking $@...
364 $(CC) $(LDFLAGS) -o $@ imagetops.o common.o $(LINKCUPSIMAGE) \
365 $(IMGLIBS) $(LIBS)
366
367
368#
369# imagetoraster
370#
371
372imagetoraster: imagetoraster.o common.o $(LIBCUPSIMAGE) \
373 ../cups/$(LIBCUPS)
374 echo Linking $@...
375 $(CC) $(LDFLAGS) -o $@ imagetoraster.o common.o $(LINKCUPSIMAGE) \
376 $(IMGLIBS) $(LIBS)
377
378
379#
380# pstops
381#
382
383pstops: pstops.o common.o ../cups/$(LIBCUPS)
384 echo Linking $@...
bd7854cb 385 $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) -lm
ef416fc2 386
387
91c84a35
MS
388#
389# pdftops
390#
391
392pdftops: pdftops.o common.o ../cups/$(LIBCUPS)
393 echo Linking $@...
394 $(CC) $(LDFLAGS) -o $@ pdftops.o common.o $(LIBS)
395
396
ef416fc2 397#
398# rastertolabel
399#
400
401rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
402 echo Linking $@...
403 $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
404
405
406#
407# rastertoepson
408#
409
410rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
411 echo Linking $@...
412 $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
413
414
415#
416# rastertohp
417#
418
419rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
420 echo Linking $@...
421 $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
422
423
424#
425# testraster
426#
427
b86bc4cf 428testraster: testraster.o ../cups/libcups.a libcupsimage.a
ef416fc2 429 echo Linking $@...
c9fc04c6
MS
430 $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \
431 ../cups/libcups.a $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
432 $(SSLLIBS) $(LIBGSSAPI)
433 echo Running raster API tests...
434 ./testraster
ef416fc2 435
436
ed486911 437#
438# rasterbench
439#
440
f7deaa1a 441rasterbench: rasterbench.o libcupsimage.a
ed486911 442 echo Linking $@...
f7deaa1a 443 $(CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS)
ed486911 444
445
ef416fc2 446#
447# texttops
448#
449
450texttops: texttops.o textcommon.o common.o \
451 ../cups/$(LIBCUPS)
452 echo Linking $@...
453 $(CC) $(LDFLAGS) -o $@ texttops.o textcommon.o common.o $(LIBS)
454
455
456#
457# Dependencies...
458#
459
460include Dependencies
461
462
463#
355e94dc 464# End of "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $".
ef416fc2 465#