]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
b19ccc9e | 2 | # "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $" |
ef416fc2 | 3 | # |
07ed0e9a | 4 | # Filter makefile for CUPS. |
ef416fc2 | 5 | # |
07ed0e9a | 6 | # Copyright 2007-2011 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 | ||
18 | include ../Makedefs | |
19 | ||
b86bc4cf | 20 | |
c9fc04c6 MS |
21 | FILTERS = \ |
22 | commandtops \ | |
23 | gziptoany \ | |
c9fc04c6 | 24 | pstops \ |
c9fc04c6 | 25 | rastertoepson \ |
07ed0e9a MS |
26 | rastertohp \ |
27 | rastertolabel \ | |
28 | rastertopwg | |
c9fc04c6 | 29 | LIBTARGETS = \ |
e1d6a774 | 30 | $(LIBCUPSIMAGE) \ |
31 | libcupsimage.a \ | |
32 | $(LIB32CUPSIMAGE) \ | |
5f64df29 MS |
33 | $(LIB64CUPSIMAGE) |
34 | UNITTARGETS = \ | |
35 | rasterbench \ | |
e1d6a774 | 36 | testraster |
c9fc04c6 MS |
37 | TARGETS = \ |
38 | $(LIBTARGETS) \ | |
5f64df29 | 39 | $(FILTERS) |
ef416fc2 | 40 | |
a4845881 | 41 | IMAGEOBJS = error.o interpret.o raster.o |
e1d6a774 | 42 | IMAGE32OBJS = $(IMAGEOBJS:.o=.32.o) |
43 | IMAGE64OBJS = $(IMAGEOBJS:.o=.64.o) | |
f8b3a85b | 44 | OBJS = $(IMAGEOBJS) \ |
a4845881 | 45 | commandtops.o gziptoany.o common.o pstops.o \ |
ed486911 | 46 | rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \ |
a4845881 | 47 | rastertopwg.o testraster.o |
ef416fc2 | 48 | |
49 | ||
50 | # | |
51 | # Make all targets... | |
52 | # | |
53 | ||
e1d6a774 | 54 | all: $(TARGETS) |
ef416fc2 | 55 | |
56 | ||
c9fc04c6 MS |
57 | # |
58 | # Make library targets... | |
59 | # | |
60 | ||
61 | libs: $(LIBTARGETS) | |
62 | ||
63 | ||
5f64df29 MS |
64 | # |
65 | # Make unit tests... | |
66 | # | |
67 | ||
68 | unittests: $(UNITTARGETS) | |
69 | ||
70 | ||
ef416fc2 | 71 | # |
72 | # Clean all object files... | |
73 | # | |
74 | ||
75 | clean: | |
5f64df29 | 76 | $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS) |
e1d6a774 | 77 | $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib |
f301802f | 78 | $(RM) -r 32bit 64bit |
ef416fc2 | 79 | |
80 | ||
81 | # | |
82 | # Update dependencies (without system header dependencies...) | |
83 | # | |
84 | ||
85 | depend: | |
e1d6a774 | 86 | touch Dependencies.tmp |
87 | makedepend -Y -I.. -fDependencies.tmp $(OBJS:.o=.c) >/dev/null 2>&1 | |
88 | $(RM) Dependencies | |
89 | cp Dependencies.tmp Dependencies | |
ac884b6a MS |
90 | sed -E -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies |
91 | sed -E -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp >>Dependencies | |
e1d6a774 | 92 | $(RM) Dependencies.tmp |
ef416fc2 | 93 | |
94 | ||
95 | # | |
96 | # Install all targets... | |
97 | # | |
98 | ||
50fe7201 MS |
99 | install: all install-data install-headers install-libs install-exec |
100 | ||
101 | ||
102 | # | |
103 | # Install data files... | |
104 | # | |
105 | ||
106 | install-data: | |
107 | ||
108 | ||
109 | # | |
110 | # Install programs... | |
111 | # | |
112 | ||
113 | install-exec: | |
bd7854cb | 114 | $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter |
ef416fc2 | 115 | for file in $(FILTERS); do \ |
116 | $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \ | |
117 | done | |
118 | $(RM) $(SERVERBIN)/filter/rastertodymo | |
119 | $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo | |
50fe7201 MS |
120 | if test "x$(SYMROOT)" != "x"; then \ |
121 | $(INSTALL_DIR) $(SYMROOT); \ | |
f8b3a85b | 122 | for file in $(FILTERS); do \ |
50fe7201 MS |
123 | cp $$file $(SYMROOT); \ |
124 | done \ | |
125 | fi | |
126 | ||
127 | ||
128 | # | |
129 | # Install headers... | |
130 | # | |
131 | ||
132 | install-headers: | |
50fe7201 MS |
133 | |
134 | ||
135 | # | |
136 | # Install libraries... | |
137 | # | |
138 | ||
139 | install-libs: $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64) | |
923edb68 | 140 | $(INSTALL_DIR) -m 755 $(LIBDIR) |
ef416fc2 | 141 | $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR) |
142 | -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \ | |
143 | $(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \ | |
144 | $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \ | |
145 | fi | |
146 | -if test $(LIBCUPSIMAGE) = "libcupsimage.2.dylib"; then \ | |
ef416fc2 | 147 | $(RM) $(LIBDIR)/libcupsimage.dylib; \ |
148 | $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \ | |
149 | fi | |
f8b3a85b MS |
150 | if test "x$(SYMROOT)" != "x"; then \ |
151 | $(INSTALL_DIR) $(SYMROOT); \ | |
152 | cp $(LIBCUPSIMAGE) $(SYMROOT); \ | |
153 | fi | |
923edb68 | 154 | |
155 | installstatic: | |
156 | $(INSTALL_DIR) -m 755 $(LIBDIR) | |
97c9a8d7 MS |
157 | $(INSTALL_LIB) -m 755 libcupsimage.a $(LIBDIR) |
158 | $(RANLIB) $(LIBDIR)/libcupsimage.a | |
159 | $(CHMOD) 555 $(LIBDIR)/libcupsimage.a | |
ef416fc2 | 160 | |
e1d6a774 | 161 | install32bit: |
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 | |
166 | install64bit: | |
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 | 176 | uninstall: $(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) | |
757d2cad | 192 | |
e1d6a774 | 193 | uninstall32bit: |
194 | $(RM) $(LIB32DIR)/libcupsimage.so | |
195 | $(RM) $(LIB32DIR)/libcupsimage.so.2 | |
196 | -$(RMDIR) $(LIB32DIR) | |
197 | ||
198 | uninstall64bit: | |
199 | $(RM) $(LIB64DIR)/libcupsimage.so | |
200 | $(RM) $(LIB64DIR)/libcupsimage.so.2 | |
201 | -$(RMDIR) $(LIB64DIR) | |
202 | ||
757d2cad | 203 | |
b423cd4c | 204 | # |
205 | # Automatic API help files... | |
206 | # | |
207 | ||
208 | apihelp: | |
209 | echo Generating CUPS API help files... | |
210 | mxmldoc --section "Programming" --title "Raster API" \ | |
5a738aea MS |
211 | --css ../doc/cups-printable.css \ |
212 | --header api-raster.header --intro api-raster.shtml \ | |
f11a948a | 213 | api-raster.xml \ |
ac884b6a MS |
214 | ../cups/raster.h interpret.c raster.c \ |
215 | >../doc/help/api-raster.html | |
f11a948a MS |
216 | mxmldoc --tokens help/api-raster.html api-raster.xml >../doc/help/api-raster.tokens |
217 | $(RM) api-raster.xml | |
8b450588 MS |
218 | mxmldoc --section "Programming" \ |
219 | --title "Developing PostScript Printer Drivers" \ | |
220 | --css ../doc/cups-printable.css \ | |
221 | --header postscript-driver.header \ | |
222 | --intro postscript-driver.shtml \ | |
223 | >../doc/help/postscript-driver.html | |
224 | mxmldoc --section "Programming" \ | |
225 | --title "Introduction to the PPD Compiler" \ | |
226 | --css ../doc/cups-printable.css \ | |
227 | --header ppd-compiler.header \ | |
228 | --intro ppd-compiler.shtml \ | |
229 | >../doc/help/ppd-compiler.html | |
230 | mxmldoc --section "Programming" \ | |
231 | --title "Developing Raster Printer Drivers" \ | |
232 | --css ../doc/cups-printable.css \ | |
233 | --header raster-driver.header \ | |
234 | --intro raster-driver.shtml \ | |
235 | >../doc/help/raster-driver.html | |
10d09e33 MS |
236 | mxmldoc --section "Specifications" \ |
237 | --title "CUPS PPD Extensions" \ | |
238 | --css ../doc/cups-printable.css \ | |
239 | --header spec-ppd.header \ | |
240 | --intro spec-ppd.shtml \ | |
241 | >../doc/help/spec-ppd.html | |
b423cd4c | 242 | |
5a738aea MS |
243 | framedhelp: |
244 | echo Generating CUPS API help files... | |
245 | mxmldoc --section "Programming" --title "Raster API" \ | |
246 | --framed ../cups/api-raster \ | |
247 | --css ../doc/cups-printable.css \ | |
248 | --header api-raster.header --intro api-raster.shtml \ | |
ac884b6a | 249 | ../cups/raster.h interpret.c raster.c |
8b450588 MS |
250 | mxmldoc --section "Programming" \ |
251 | --title "Developing PostScript Printer Drivers" \ | |
252 | --framed ../cups/postscript-driver \ | |
253 | --css ../doc/cups-printable.css \ | |
254 | --header postscript-driver.header \ | |
255 | --intro postscript-driver.shtml | |
256 | mxmldoc --section "Programming" \ | |
257 | --title "Introduction to the PPD Compiler" \ | |
258 | --framed ../cups/ppd-compiler \ | |
259 | --css ../doc/cups-printable.css \ | |
260 | --header ppd-compiler.header \ | |
261 | --intro ppd-compiler.shtml | |
262 | mxmldoc --section "Programming" \ | |
263 | --title "Developing Raster Printer Drivers" \ | |
264 | --framed ../cups/raster-driver \ | |
265 | --css ../doc/cups-printable.css \ | |
266 | --header raster-driver.header \ | |
267 | --intro raster-driver.shtml | |
10d09e33 MS |
268 | mxmldoc --section "Specifications" \ |
269 | --title "CUPS PPD Extensions" \ | |
270 | --framed ../cups/spec-ppd \ | |
271 | --css ../doc/cups-printable.css \ | |
272 | --header spec-ppd.header \ | |
273 | --intro spec-ppd.shtml \ | |
8b450588 | 274 | |
b423cd4c | 275 | |
7a14d768 MS |
276 | # |
277 | # commandtops | |
278 | # | |
279 | ||
280 | commandtops: commandtops.o ../cups/$(LIBCUPS) | |
281 | echo Linking $@... | |
282 | $(CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS) | |
283 | ||
284 | ||
ef416fc2 | 285 | # |
286 | # gziptoany | |
287 | # | |
288 | ||
289 | gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS) | |
290 | echo Linking $@... | |
291 | $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS) | |
292 | ||
293 | ||
ef416fc2 | 294 | # |
295 | # libcupsimage.so.2, libcupsimage.sl.2 | |
296 | # | |
297 | ||
298 | libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS) | |
299 | echo Linking $@... | |
a74454a7 | 300 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \ |
301 | -L../cups $(LINKCUPS) -lm | |
ef416fc2 | 302 | $(RM) `basename $@ .2` |
303 | $(LN) $@ `basename $@ .2` | |
304 | ||
305 | ||
e1d6a774 | 306 | # |
f301802f | 307 | # 32bit/libcupsimage.so.2 |
e1d6a774 | 308 | # |
309 | ||
f301802f | 310 | 32bit/libcupsimage.so.2: $(IMAGE32OBJS) |
e1d6a774 | 311 | echo Linking 32-bit $@... |
f301802f | 312 | -mkdir 32bit |
313 | $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(IMAGE32OBJS) $(DSOLIBS) \ | |
314 | -L../cups/32bit $(LINKCUPS) -lm | |
e1d6a774 | 315 | |
316 | ||
317 | # | |
f301802f | 318 | # 64bit/libcupsimage.so.2 |
e1d6a774 | 319 | # |
320 | ||
f301802f | 321 | 64bit/libcupsimage.so.2: $(IMAGE64OBJS) |
e1d6a774 | 322 | echo Linking 64-bit $@... |
f301802f | 323 | -mkdir 64bit |
324 | $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(IMAGE64OBJS) $(DSOLIBS) \ | |
325 | -L../cups/64bit $(LINKCUPS) -lm | |
e1d6a774 | 326 | |
327 | ||
ef416fc2 | 328 | # |
329 | # libcupsimage.2.dylib | |
330 | # | |
331 | ||
355e94dc | 332 | libcupsimage.2.dylib: $(IMAGEOBJS) $(LIBCUPSIMAGEORDER) |
ef416fc2 | 333 | echo Linking $@... |
e1d6a774 | 334 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \ |
fa73b229 | 335 | -install_name $(libdir)/$@ \ |
f7deaa1a | 336 | -current_version 2.3.0 \ |
ef416fc2 | 337 | -compatibility_version 2.0.0 \ |
338 | $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm | |
339 | $(RM) libcupsimage.dylib | |
340 | $(LN) $@ libcupsimage.dylib | |
341 | ||
342 | ||
343 | # | |
344 | # libcupsimage_s.a | |
345 | # | |
346 | ||
a74454a7 | 347 | libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp |
ef416fc2 | 348 | echo Linking $@... |
e1d6a774 | 349 | $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \ |
350 | -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS) -lm | |
ef416fc2 | 351 | $(RM) $@ |
352 | $(AR) $(ARFLAGS) $@ libcupsimage_s.o | |
353 | ||
354 | ||
355 | # | |
356 | # libcupsimage.la | |
357 | # | |
358 | ||
359 | libcupsimage.la: $(IMAGEOBJS) | |
360 | echo Linking $@... | |
e1d6a774 | 361 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \ |
a74454a7 | 362 | -L../cups $(LINKCUPS) \ |
f7deaa1a | 363 | -rpath $(LIBDIR) -version-info 2:3 |
ef416fc2 | 364 | |
365 | ||
366 | # | |
367 | # libcupsimage.a | |
368 | # | |
369 | ||
370 | libcupsimage.a: $(IMAGEOBJS) | |
371 | echo Archiving $@... | |
372 | $(RM) $@ | |
373 | $(AR) $(ARFLAGS) $@ $(IMAGEOBJS) | |
374 | $(RANLIB) $@ | |
375 | ||
376 | ||
ef416fc2 | 377 | # |
378 | # pstops | |
379 | # | |
380 | ||
381 | pstops: pstops.o common.o ../cups/$(LIBCUPS) | |
382 | echo Linking $@... | |
bd7854cb | 383 | $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) -lm |
ef416fc2 | 384 | |
385 | ||
ef416fc2 | 386 | # |
387 | # rastertoepson | |
388 | # | |
389 | ||
390 | rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
391 | echo Linking $@... | |
392 | $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) | |
393 | ||
394 | ||
395 | # | |
396 | # rastertohp | |
397 | # | |
398 | ||
399 | rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
400 | echo Linking $@... | |
401 | $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) | |
402 | ||
403 | ||
07ed0e9a MS |
404 | # |
405 | # rastertolabel | |
406 | # | |
407 | ||
408 | rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
409 | echo Linking $@... | |
410 | $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) | |
411 | ||
412 | ||
413 | # | |
414 | # rastertopwg | |
415 | # | |
416 | ||
417 | rastertopwg: rastertopwg.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
418 | echo Linking $@... | |
419 | $(CC) $(LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) | |
420 | ||
421 | ||
ef416fc2 | 422 | # |
423 | # testraster | |
424 | # | |
425 | ||
6d2f911b | 426 | testraster: testraster.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a |
ef416fc2 | 427 | echo Linking $@... |
c9fc04c6 | 428 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \ |
6d2f911b | 429 | ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \ |
c168a833 | 430 | $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI) |
c9fc04c6 MS |
431 | echo Running raster API tests... |
432 | ./testraster | |
ef416fc2 | 433 | |
434 | ||
ed486911 | 435 | # |
436 | # rasterbench | |
437 | # | |
438 | ||
f7deaa1a | 439 | rasterbench: rasterbench.o libcupsimage.a |
ed486911 | 440 | echo Linking $@... |
f7deaa1a | 441 | $(CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS) |
ed486911 | 442 | |
443 | ||
ef416fc2 | 444 | # |
445 | # Dependencies... | |
446 | # | |
07ed0e9a | 447 | |
ef416fc2 | 448 | include Dependencies |
449 | ||
450 | ||
451 | # | |
b19ccc9e | 452 | # End of "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $". |
ef416fc2 | 453 | # |