]> git.ipfire.org Git - thirdparty/cups.git/blob - filter/Makefile
Remove all of the Subversion keywords from various source files.
[thirdparty/cups.git] / filter / Makefile
1 #
2 # Filter makefile for CUPS.
3 #
4 # Copyright 2007-2012 by Apple Inc.
5 # Copyright 1997-2006 by Easy Software Products.
6 #
7 # These coded instructions, statements, and computer programs are the
8 # property of Apple Inc. and are protected by Federal copyright
9 # law. Distribution and use rights are outlined in the file "LICENSE.txt"
10 # which should have been included with this file. If this file is
11 # file is missing or damaged, see the license at "http://www.cups.org/".
12 #
13 # This file is subject to the Apple OS-Developed Software exception.
14 #
15
16 include ../Makedefs
17
18
19 FILTERS = \
20 commandtops \
21 gziptoany \
22 pstops \
23 rastertoepson \
24 rastertohp \
25 rastertolabel \
26 rastertopwg
27 LIBTARGETS = \
28 $(LIBCUPSIMAGE) \
29 libcupsimage.a
30 UNITTARGETS = \
31 rasterbench \
32 testraster
33 TARGETS = \
34 $(LIBTARGETS) \
35 $(FILTERS)
36
37 IMAGEOBJS = error.o interpret.o raster.o
38 OBJS = $(IMAGEOBJS) \
39 commandtops.o gziptoany.o common.o pstops.o \
40 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
41 rastertopwg.o testraster.o
42
43
44 #
45 # Make all targets...
46 #
47
48 all: $(TARGETS)
49
50
51 #
52 # Make library targets...
53 #
54
55 libs: $(LIBTARGETS)
56
57
58 #
59 # Make unit tests...
60 #
61
62 unittests: $(UNITTARGETS)
63
64
65 #
66 # Clean all object files...
67 #
68
69 clean:
70 $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS)
71 $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib
72
73
74 #
75 # Update dependencies (without system header dependencies...)
76 #
77
78 depend:
79 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
80
81
82 #
83 # Install all targets...
84 #
85
86 install: all install-data install-headers install-libs install-exec
87
88
89 #
90 # Install data files...
91 #
92
93 install-data:
94
95
96 #
97 # Install programs...
98 #
99
100 install-exec:
101 $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
102 for file in $(FILTERS); do \
103 $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
104 done
105 $(RM) $(SERVERBIN)/filter/rastertodymo
106 $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo
107 if test "x$(SYMROOT)" != "x"; then \
108 $(INSTALL_DIR) $(SYMROOT); \
109 for file in $(FILTERS); do \
110 cp $$file $(SYMROOT); \
111 dsymutil $(SYMROOT)/$$file; \
112 done \
113 fi
114
115
116 #
117 # Install headers...
118 #
119
120 install-headers:
121
122
123 #
124 # Install libraries...
125 #
126
127 install-libs: $(INSTALLSTATIC)
128 $(INSTALL_DIR) -m 755 $(LIBDIR)
129 $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR)
130 -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \
131 $(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
132 $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
133 fi
134 -if test $(LIBCUPSIMAGE) = "libcupsimage.2.dylib"; then \
135 $(RM) $(LIBDIR)/libcupsimage.dylib; \
136 $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \
137 fi
138 if test "x$(SYMROOT)" != "x"; then \
139 $(INSTALL_DIR) $(SYMROOT); \
140 cp $(LIBCUPSIMAGE) $(SYMROOT); \
141 dsymutil $(SYMROOT)/$(LIBCUPSIMAGE); \
142 fi
143
144 installstatic:
145 $(INSTALL_DIR) -m 755 $(LIBDIR)
146 $(INSTALL_LIB) -m 755 libcupsimage.a $(LIBDIR)
147 $(RANLIB) $(LIBDIR)/libcupsimage.a
148 $(CHMOD) 555 $(LIBDIR)/libcupsimage.a
149
150
151 #
152 # Uninstall all targets...
153 #
154
155 uninstall:
156 for file in $(FILTERS); do \
157 $(RM) $(SERVERBIN)/filter/$$file; \
158 done
159 $(RM) $(SERVERBIN)/filter/rastertodymo
160 -$(RMDIR) $(SERVERBIN)/filter
161 -$(RMDIR) $(SERVERBIN)
162 $(RM) $(LIBDIR)/libcupsimage.2.dylib
163 $(RM) $(LIBDIR)/libcupsimage.a
164 $(RM) $(LIBDIR)/libcupsimage.dylib
165 $(RM) $(LIBDIR)/libcupsimage_s.a
166 $(RM) $(LIBDIR)/libcupsimage.sl
167 $(RM) $(LIBDIR)/libcupsimage.sl.2
168 $(RM) $(LIBDIR)/libcupsimage.so
169 $(RM) $(LIBDIR)/libcupsimage.so.2
170 -$(RMDIR) $(LIBDIR)
171
172
173 #
174 # Automatic API help files...
175 #
176
177 apihelp:
178 echo Generating CUPS API help files...
179 mxmldoc --section "Programming" --title "Raster API" \
180 --css ../doc/cups-printable.css \
181 --header api-raster.header --intro api-raster.shtml \
182 api-raster.xml \
183 ../cups/raster.h interpret.c raster.c \
184 >../doc/help/api-raster.html
185 mxmldoc --tokens help/api-raster.html api-raster.xml >../doc/help/api-raster.tokens
186 $(RM) api-raster.xml
187 mxmldoc --section "Programming" \
188 --title "Developing PostScript Printer Drivers" \
189 --css ../doc/cups-printable.css \
190 --header postscript-driver.header \
191 --intro postscript-driver.shtml \
192 >../doc/help/postscript-driver.html
193 mxmldoc --section "Programming" \
194 --title "Introduction to the PPD Compiler" \
195 --css ../doc/cups-printable.css \
196 --header ppd-compiler.header \
197 --intro ppd-compiler.shtml \
198 >../doc/help/ppd-compiler.html
199 mxmldoc --section "Programming" \
200 --title "Developing Raster Printer Drivers" \
201 --css ../doc/cups-printable.css \
202 --header raster-driver.header \
203 --intro raster-driver.shtml \
204 >../doc/help/raster-driver.html
205 mxmldoc --section "Specifications" \
206 --title "CUPS PPD Extensions" \
207 --css ../doc/cups-printable.css \
208 --header spec-ppd.header \
209 --intro spec-ppd.shtml \
210 >../doc/help/spec-ppd.html
211
212 framedhelp:
213 echo Generating CUPS API help files...
214 mxmldoc --section "Programming" --title "Raster API" \
215 --framed ../cups/api-raster \
216 --css ../doc/cups-printable.css \
217 --header api-raster.header --intro api-raster.shtml \
218 ../cups/raster.h interpret.c raster.c
219 mxmldoc --section "Programming" \
220 --title "Developing PostScript Printer Drivers" \
221 --framed ../cups/postscript-driver \
222 --css ../doc/cups-printable.css \
223 --header postscript-driver.header \
224 --intro postscript-driver.shtml
225 mxmldoc --section "Programming" \
226 --title "Introduction to the PPD Compiler" \
227 --framed ../cups/ppd-compiler \
228 --css ../doc/cups-printable.css \
229 --header ppd-compiler.header \
230 --intro ppd-compiler.shtml
231 mxmldoc --section "Programming" \
232 --title "Developing Raster Printer Drivers" \
233 --framed ../cups/raster-driver \
234 --css ../doc/cups-printable.css \
235 --header raster-driver.header \
236 --intro raster-driver.shtml
237 mxmldoc --section "Specifications" \
238 --title "CUPS PPD Extensions" \
239 --framed ../cups/spec-ppd \
240 --css ../doc/cups-printable.css \
241 --header spec-ppd.header \
242 --intro spec-ppd.shtml \
243
244
245 #
246 # commandtops
247 #
248
249 commandtops: commandtops.o ../cups/$(LIBCUPS)
250 echo Linking $@...
251 $(CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS)
252
253
254 #
255 # gziptoany
256 #
257
258 gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
259 echo Linking $@...
260 $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
261
262
263 #
264 # libcupsimage.so.2, libcupsimage.sl.2
265 #
266
267 libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS)
268 echo Linking $@...
269 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \
270 -L../cups $(LINKCUPS)
271 $(RM) `basename $@ .2`
272 $(LN) $@ `basename $@ .2`
273
274
275 #
276 # libcupsimage.2.dylib
277 #
278
279 libcupsimage.2.dylib: $(IMAGEOBJS) $(LIBCUPSIMAGEORDER)
280 echo Linking $@...
281 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
282 -install_name $(libdir)/$@ \
283 -current_version 2.3.0 \
284 -compatibility_version 2.0.0 \
285 $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS)
286 $(RM) libcupsimage.dylib
287 $(LN) $@ libcupsimage.dylib
288
289
290 #
291 # libcupsimage_s.a
292 #
293
294 libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp
295 echo Linking $@...
296 $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \
297 -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS)
298 $(RM) $@
299 $(AR) $(ARFLAGS) $@ libcupsimage_s.o
300
301
302 #
303 # libcupsimage.la
304 #
305
306 libcupsimage.la: $(IMAGEOBJS)
307 echo Linking $@...
308 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
309 -L../cups $(LINKCUPS) \
310 -rpath $(LIBDIR) -version-info 2:3
311
312
313 #
314 # libcupsimage.a
315 #
316
317 libcupsimage.a: $(IMAGEOBJS)
318 echo Archiving $@...
319 $(RM) $@
320 $(AR) $(ARFLAGS) $@ $(IMAGEOBJS)
321 $(RANLIB) $@
322
323
324 #
325 # pstops
326 #
327
328 pstops: pstops.o common.o ../cups/$(LIBCUPS)
329 echo Linking $@...
330 $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS)
331
332
333 #
334 # rastertoepson
335 #
336
337 rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
338 echo Linking $@...
339 $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
340
341
342 #
343 # rastertohp
344 #
345
346 rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
347 echo Linking $@...
348 $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
349
350
351 #
352 # rastertolabel
353 #
354
355 rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
356 echo Linking $@...
357 $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
358
359
360 #
361 # rastertopwg
362 #
363
364 rastertopwg: rastertopwg.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
365 echo Linking $@...
366 $(CC) $(LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
367
368 rastertopwg-static: rastertopwg.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
369 echo Linking $@...
370 $(CC) $(LDFLAGS) -o $@ rastertopwg.o libcupsimage.a \
371 ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
372 $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
373
374
375 #
376 # testraster
377 #
378
379 testraster: testraster.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
380 echo Linking $@...
381 $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \
382 ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
383 $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
384 echo Running raster API tests...
385 ./testraster
386
387
388 #
389 # rasterbench
390 #
391
392 rasterbench: rasterbench.o libcupsimage.a
393 echo Linking $@...
394 $(CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS)
395
396
397 #
398 # Dependencies...
399 #
400
401 include Dependencies