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