]> git.ipfire.org Git - thirdparty/cups.git/blame - filter/Makefile
Merge changes from CUPS 1.4svn-r7199.
[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#
bc44d920 6# Copyright 2007 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) \
ef416fc2 22 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) \
e1d6a774 42 gziptoany.o imagetops.o imagetoraster.o common.o pstops.o \
ed486911 43 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
e1d6a774 44 testimage.o testraster.o textcommon.o texttops.o
ef416fc2 45
46
47#
48# Make all targets...
49#
50
e1d6a774 51all: $(TARGETS)
ef416fc2 52
53
54#
55# Clean all object files...
56#
57
58clean:
e1d6a774 59 $(RM) $(OBJS) $(TARGETS)
60 $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib
f301802f 61 $(RM) -r 32bit 64bit
ef416fc2 62
63
64#
65# Update dependencies (without system header dependencies...)
66#
67
68depend:
e1d6a774 69 touch Dependencies.tmp
70 makedepend -Y -I.. -fDependencies.tmp $(OBJS:.o=.c) >/dev/null 2>&1
71 $(RM) Dependencies
72 cp Dependencies.tmp Dependencies
73 sed -r -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies
74 sed -r -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp >>Dependencies
75 $(RM) Dependencies.tmp
ef416fc2 76
77
78#
79# Install all targets...
80#
81
e1d6a774 82install: all installhdrs $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
bd7854cb 83 $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
ef416fc2 84 for file in $(FILTERS); do \
85 $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
86 done
87 $(RM) $(SERVERBIN)/filter/rastertodymo
88 $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo
923edb68 89 $(INSTALL_DIR) -m 755 $(LIBDIR)
ef416fc2 90 $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR)
91 -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \
92 $(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
93 $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
94 fi
95 -if test $(LIBCUPSIMAGE) = "libcupsimage.2.dylib"; then \
96 $(STRIP) -x $(LIBDIR)/$(LIBCUPSIMAGE); \
97 $(RM) $(LIBDIR)/libcupsimage.dylib; \
98 $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \
99 fi
09a101d6 100 if test "x$(SYMROOT)" != "x"; then \
101 $(INSTALL_DIR) $(SYMROOT); \
102 for file in $(TARGETS); do \
103 cp $$file $(SYMROOT); \
104 done \
105 fi
923edb68 106
107installstatic:
108 $(INSTALL_DIR) -m 755 $(LIBDIR)
d6ae789d 109 $(INSTALL_LIB) libcupsimage.a $(LIBDIR);
110 $(RANLIB) $(LIBDIR)/libcupsimage.a;
ef416fc2 111
112installhdrs:
bd7854cb 113 $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
ef416fc2 114 $(INSTALL_DATA) image.h $(INCLUDEDIR)/cups
115 $(INSTALL_DATA) raster.h $(INCLUDEDIR)/cups
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
149 $(RM) $(INCLUDEDIR)/cups/raster.h
150 -$(RMDIR) $(INCLUDEDIR)/cups
151
e1d6a774 152uninstall32bit:
153 $(RM) $(LIB32DIR)/libcupsimage.so
154 $(RM) $(LIB32DIR)/libcupsimage.so.2
155 -$(RMDIR) $(LIB32DIR)
156
157uninstall64bit:
158 $(RM) $(LIB64DIR)/libcupsimage.so
159 $(RM) $(LIB64DIR)/libcupsimage.so.2
160 -$(RMDIR) $(LIB64DIR)
161
757d2cad 162
b423cd4c 163#
164# Automatic API help files...
165#
166
167apihelp:
168 echo Generating CUPS API help files...
169 mxmldoc --section "Programming" --title "Raster API" \
170 --intro api-raster.shtml \
171 raster.h interpret.c raster.c >../doc/help/api-raster.html
172
173
ef416fc2 174#
175# formtops
176#
177
178formtops: $(FORMOBJS) common.o ../cups/$(LIBCUPS)
179 echo Linking $@...
180 $(CC) $(LDFLAGS) -o $@ $(FORMOBJS) common.o $(LIBS) -lm
181
182
183#
184# gziptoany
185#
186
187gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
188 echo Linking $@...
189 $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
190
191
192#
193# hpgltops
194#
195
196hpgltops: $(HPGLOBJS) common.o ../cups/$(LIBCUPS)
197 echo Linking $@...
198 $(CC) $(LDFLAGS) -o $@ $(HPGLOBJS) common.o $(LIBS) -lm
199
200
201#
202# libcupsimage.so.2, libcupsimage.sl.2
203#
204
205libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS)
206 echo Linking $@...
a74454a7 207 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \
208 -L../cups $(LINKCUPS) -lm
ef416fc2 209 $(RM) `basename $@ .2`
210 $(LN) $@ `basename $@ .2`
211
212
e1d6a774 213#
f301802f 214# 32bit/libcupsimage.so.2
e1d6a774 215#
216
f301802f 21732bit/libcupsimage.so.2: $(IMAGE32OBJS)
e1d6a774 218 echo Linking 32-bit $@...
f301802f 219 -mkdir 32bit
220 $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(IMAGE32OBJS) $(DSOLIBS) \
221 -L../cups/32bit $(LINKCUPS) -lm
e1d6a774 222
223
224#
f301802f 225# 64bit/libcupsimage.so.2
e1d6a774 226#
227
f301802f 22864bit/libcupsimage.so.2: $(IMAGE64OBJS)
e1d6a774 229 echo Linking 64-bit $@...
f301802f 230 -mkdir 64bit
231 $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(IMAGE64OBJS) $(DSOLIBS) \
232 -L../cups/64bit $(LINKCUPS) -lm
e1d6a774 233
234
ef416fc2 235#
236# libcupsimage.2.dylib
237#
238
355e94dc 239libcupsimage.2.dylib: $(IMAGEOBJS) $(LIBCUPSIMAGEORDER)
ef416fc2 240 echo Linking $@...
e1d6a774 241 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
fa73b229 242 -install_name $(libdir)/$@ \
f7deaa1a 243 -current_version 2.3.0 \
ef416fc2 244 -compatibility_version 2.0.0 \
cc0d019f 245 -sectorder __TEXT __text $(LIBCUPSIMAGEORDER) \
ef416fc2 246 $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm
247 $(RM) libcupsimage.dylib
248 $(LN) $@ libcupsimage.dylib
249
250
251#
252# libcupsimage_s.a
253#
254
a74454a7 255libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp
ef416fc2 256 echo Linking $@...
e1d6a774 257 $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \
258 -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS) -lm
ef416fc2 259 $(RM) $@
260 $(AR) $(ARFLAGS) $@ libcupsimage_s.o
261
262
263#
264# libcupsimage.la
265#
266
267libcupsimage.la: $(IMAGEOBJS)
268 echo Linking $@...
e1d6a774 269 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
a74454a7 270 -L../cups $(LINKCUPS) \
f7deaa1a 271 -rpath $(LIBDIR) -version-info 2:3
ef416fc2 272
273
274#
275# libcupsimage.a
276#
277
278libcupsimage.a: $(IMAGEOBJS)
279 echo Archiving $@...
280 $(RM) $@
281 $(AR) $(ARFLAGS) $@ $(IMAGEOBJS)
282 $(RANLIB) $@
283
284
285#
286# testimage
287#
288
289testimage: testimage.o libcupsimage.a ../Makedefs
290 echo Linking $@...
291 $(CC) $(LDFLAGS) -o $@ testimage.o libcupsimage.a \
292 $(IMGLIBS) $(DSOLIBS) $(LIBS)
293
294
295#
296# imagetops
297#
298
299imagetops: imagetops.o common.o $(LIBCUPSIMAGE) \
300 ../cups/$(LIBCUPS)
301 echo Linking $@...
302 $(CC) $(LDFLAGS) -o $@ imagetops.o common.o $(LINKCUPSIMAGE) \
303 $(IMGLIBS) $(LIBS)
304
305
306#
307# imagetoraster
308#
309
310imagetoraster: imagetoraster.o common.o $(LIBCUPSIMAGE) \
311 ../cups/$(LIBCUPS)
312 echo Linking $@...
313 $(CC) $(LDFLAGS) -o $@ imagetoraster.o common.o $(LINKCUPSIMAGE) \
314 $(IMGLIBS) $(LIBS)
315
316
317#
318# pstops
319#
320
321pstops: pstops.o common.o ../cups/$(LIBCUPS)
322 echo Linking $@...
bd7854cb 323 $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) -lm
ef416fc2 324
325
326#
327# rastertolabel
328#
329
330rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
331 echo Linking $@...
332 $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
333
334
335#
336# rastertoepson
337#
338
339rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
340 echo Linking $@...
341 $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
342
343
344#
345# rastertohp
346#
347
348rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
349 echo Linking $@...
350 $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
351
352
353#
354# testraster
355#
356
b86bc4cf 357testraster: testraster.o ../cups/libcups.a libcupsimage.a
ef416fc2 358 echo Linking $@...
b86bc4cf 359 $(CC) $(LDFLAGS) -o $@ testraster.o libcupsimage.a ../cups/libcups.a \
f7deaa1a 360 $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) $(SSLLIBS) $(LIBGSSAPI)
ef416fc2 361
362
ed486911 363#
364# rasterbench
365#
366
f7deaa1a 367rasterbench: rasterbench.o libcupsimage.a
ed486911 368 echo Linking $@...
f7deaa1a 369 $(CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS)
ed486911 370
371
ef416fc2 372#
373# texttops
374#
375
376texttops: texttops.o textcommon.o common.o \
377 ../cups/$(LIBCUPS)
378 echo Linking $@...
379 $(CC) $(LDFLAGS) -o $@ texttops.o textcommon.o common.o $(LIBS)
380
381
382#
383# Dependencies...
384#
385
386include Dependencies
387
388
389#
355e94dc 390# End of "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $".
ef416fc2 391#