]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
f2d18633 | 2 | # "$Id$" |
ef416fc2 | 3 | # |
5a1d7a17 | 4 | # API library Makefile for CUPS. |
ef416fc2 | 5 | # |
b2b9911d | 6 | # Copyright 2007-2014 by Apple Inc. |
5a1d7a17 | 7 | # Copyright 1997-2006 by Easy Software Products, all rights reserved. |
ef416fc2 | 8 | # |
5a1d7a17 MS |
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/". | |
ef416fc2 | 14 | # |
5a1d7a17 | 15 | # This file is subject to the Apple OS-Developed Software exception. |
ef416fc2 | 16 | # |
17 | ||
18 | include ../Makedefs | |
19 | ||
cb7f98ee MS |
20 | |
21 | # | |
22 | # Options to build libcups without the use of deprecated APIs... | |
23 | # | |
24 | ||
25 | OPTIONS = -D_CUPS_NO_DEPRECATED=1 -D_PPD_DEPRECATED="" | |
26 | ||
27 | ||
ef416fc2 | 28 | # |
29 | # Object files... | |
30 | # | |
31 | ||
32 | LIBOBJS = \ | |
757d2cad | 33 | adminutil.o \ |
ef416fc2 | 34 | array.o \ |
35 | attr.o \ | |
36 | auth.o \ | |
37 | backchannel.o \ | |
a4d04587 | 38 | backend.o \ |
66ab9486 | 39 | conflicts.o \ |
fa73b229 | 40 | custom.o \ |
ae71f5de | 41 | debug.o \ |
ef416fc2 | 42 | dest.o \ |
dcb445bc MS |
43 | dest-job.o \ |
44 | dest-localization.o \ | |
45 | dest-options.o \ | |
ef416fc2 | 46 | dir.o \ |
47 | emit.o \ | |
48 | encode.o \ | |
49 | file.o \ | |
ae71f5de | 50 | getdevices.o \ |
89d46774 | 51 | getifaddrs.o \ |
ef416fc2 | 52 | getputfile.o \ |
53 | globals.o \ | |
54 | http.o \ | |
55 | http-addr.o \ | |
56 | http-addrlist.o \ | |
57 | http-support.o \ | |
58 | ipp.o \ | |
59 | ipp-support.o \ | |
60 | langprintf.o \ | |
61 | language.o \ | |
fa73b229 | 62 | localize.o \ |
ef416fc2 | 63 | mark.o \ |
64 | md5.o \ | |
65 | md5passwd.o \ | |
fa73b229 | 66 | notify.o \ |
ef416fc2 | 67 | options.o \ |
68 | page.o \ | |
69 | ppd.o \ | |
f14324a7 | 70 | ppd-cache.o \ |
54afec33 | 71 | pwg-media.o \ |
ecdc0628 | 72 | request.o \ |
f7deaa1a | 73 | sidechannel.o \ |
91c84a35 | 74 | snmp.o \ |
ef416fc2 | 75 | snprintf.o \ |
76 | string.o \ | |
77 | tempfile.o \ | |
6d2f911b | 78 | thread.o \ |
25731360 | 79 | tls.o \ |
ef416fc2 | 80 | transcode.o \ |
81 | usersys.o \ | |
82 | util.o | |
dcb445bc | 83 | TESTOBJS = \ |
757d2cad | 84 | testadmin.o \ |
ef416fc2 | 85 | testarray.o \ |
06d4e77b | 86 | testconflicts.o \ |
09a101d6 | 87 | testcups.o \ |
104fd4ae | 88 | testdest.o \ |
ef416fc2 | 89 | testfile.o \ |
90 | testhttp.o \ | |
91 | testi18n.o \ | |
92 | testipp.o \ | |
20fbc903 | 93 | testoptions.o \ |
ef416fc2 | 94 | testlang.o \ |
fa73b229 | 95 | testppd.o \ |
54afec33 | 96 | testpwg.o \ |
cc754834 | 97 | testsnmp.o |
dcb445bc MS |
98 | OBJS = \ |
99 | $(LIBOBJS) \ | |
dcb445bc MS |
100 | $(TESTOBJS) |
101 | ||
ef416fc2 | 102 | |
103 | # | |
104 | # Header files to install... | |
105 | # | |
106 | ||
107 | HEADERS = \ | |
757d2cad | 108 | adminutil.h \ |
ef416fc2 | 109 | array.h \ |
d09495fa | 110 | backend.h \ |
ef416fc2 | 111 | cups.h \ |
112 | dir.h \ | |
113 | file.h \ | |
114 | http.h \ | |
ef416fc2 | 115 | ipp.h \ |
116 | language.h \ | |
ef416fc2 | 117 | ppd.h \ |
6961465f | 118 | pwg.h \ |
ac884b6a | 119 | raster.h \ |
f7deaa1a | 120 | sidechannel.h \ |
a41f09e2 MS |
121 | transcode.h \ |
122 | versioning.h | |
ef416fc2 | 123 | |
71e16022 | 124 | HEADERSPRIV = \ |
eac3a0a0 | 125 | array-private.h \ |
71e16022 MS |
126 | cups-private.h \ |
127 | debug-private.h \ | |
128 | file-private.h \ | |
129 | http-private.h \ | |
130 | ipp-private.h \ | |
131 | language-private.h \ | |
132 | md5-private.h \ | |
133 | ppd-private.h \ | |
134 | pwg-private.h \ | |
a4845881 | 135 | raster-private.h \ |
71e16022 | 136 | snmp-private.h \ |
6d2f911b MS |
137 | string-private.h \ |
138 | thread-private.h | |
139 | ||
ef416fc2 | 140 | |
141 | # | |
142 | # Targets in this directory... | |
143 | # | |
144 | ||
c9fc04c6 | 145 | LIBTARGETS = \ |
f8b3a85b | 146 | $(LIBCUPSSTATIC) \ |
12f89d24 | 147 | $(LIBCUPS) |
5f64df29 MS |
148 | |
149 | UNITTARGETS = \ | |
150 | testadmin \ | |
ef416fc2 | 151 | testarray \ |
b2b9911d | 152 | testcache \ |
5f64df29 MS |
153 | testconflicts \ |
154 | testcups \ | |
104fd4ae | 155 | testdest \ |
ef416fc2 | 156 | testfile \ |
157 | testhttp \ | |
158 | testi18n \ | |
159 | testipp \ | |
fa73b229 | 160 | testlang \ |
20fbc903 | 161 | testoptions \ |
5f64df29 | 162 | testppd \ |
54afec33 | 163 | testpwg \ |
5f64df29 | 164 | testsnmp |
c9fc04c6 MS |
165 | |
166 | TARGETS = \ | |
5f64df29 | 167 | $(LIBTARGETS) |
ef416fc2 | 168 | |
169 | ||
170 | # | |
171 | # Make all targets... | |
172 | # | |
173 | ||
f8b3a85b | 174 | all: $(TARGETS) |
ef416fc2 | 175 | |
176 | ||
c9fc04c6 MS |
177 | # |
178 | # Make library targets... | |
179 | # | |
180 | ||
181 | libs: $(LIBTARGETS) | |
182 | ||
183 | ||
5f64df29 MS |
184 | # |
185 | # Make unit tests... | |
186 | # | |
187 | ||
188 | unittests: $(UNITTARGETS) | |
189 | ||
190 | ||
ef416fc2 | 191 | # |
192 | # Remove object and target files... | |
193 | # | |
194 | ||
195 | clean: | |
5f64df29 | 196 | $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS) |
5a1d7a17 | 197 | $(RM) libcups.so libcups.dylib |
ef416fc2 | 198 | |
199 | ||
200 | # | |
201 | # Update dependencies (without system header dependencies...) | |
202 | # | |
203 | ||
204 | depend: | |
12f89d24 | 205 | $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies |
ef416fc2 | 206 | |
207 | ||
6961465f MS |
208 | # |
209 | # Run oclint to check code coverage... | |
210 | # | |
211 | ||
212 | oclint: | |
213 | oclint -o=oclint.html -html $(LIBOBJS:.o=.c) -- $(ALL_CFLAGS) | |
214 | ||
215 | ||
ef416fc2 | 216 | # |
50fe7201 | 217 | # Install all targets... |
ef416fc2 | 218 | # |
219 | ||
50fe7201 MS |
220 | install: all install-data install-headers install-libs install-exec |
221 | ||
222 | ||
223 | # | |
224 | # Install data files... | |
225 | # | |
226 | ||
227 | install-data: | |
228 | ||
229 | ||
230 | # | |
231 | # Install programs... | |
232 | # | |
233 | ||
234 | install-exec: | |
235 | ||
236 | ||
237 | # | |
238 | # Install headers... | |
239 | # | |
240 | ||
241 | install-headers: | |
242 | echo Installing header files into $(INCLUDEDIR)/cups... | |
243 | $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups | |
244 | for file in $(HEADERS); do \ | |
245 | $(INSTALL_DATA) $$file $(INCLUDEDIR)/cups; \ | |
246 | done | |
71e16022 MS |
247 | if test "x$(privateinclude)" != x; then \ |
248 | echo Installing private header files into $(PRIVATEINCLUDE)...; \ | |
5180a04c | 249 | $(INSTALL_DIR) -m 755 $(PRIVATEINCLUDE); \ |
71e16022 | 250 | for file in $(HEADERSPRIV); do \ |
5180a04c | 251 | $(INSTALL_DATA) $$file $(PRIVATEINCLUDE)/$$file; \ |
71e16022 MS |
252 | done; \ |
253 | fi | |
50fe7201 MS |
254 | |
255 | ||
256 | # | |
257 | # Install libraries... | |
258 | # | |
259 | ||
12f89d24 | 260 | install-libs: $(INSTALLSTATIC) |
50fe7201 | 261 | echo Installing libraries in $(LIBDIR)... |
bd7854cb | 262 | $(INSTALL_DIR) -m 755 $(LIBDIR) |
ef416fc2 | 263 | $(INSTALL_LIB) $(LIBCUPS) $(LIBDIR) |
5a1d7a17 | 264 | if test $(LIBCUPS) = "libcups.so.2"; then \ |
ef416fc2 | 265 | $(RM) $(LIBDIR)/`basename $(LIBCUPS) .2`; \ |
266 | $(LN) $(LIBCUPS) $(LIBDIR)/`basename $(LIBCUPS) .2`; \ | |
267 | fi | |
268 | if test $(LIBCUPS) = "libcups.2.dylib"; then \ | |
ef416fc2 | 269 | $(RM) $(LIBDIR)/libcups.dylib; \ |
270 | $(LN) $(LIBCUPS) $(LIBDIR)/libcups.dylib; \ | |
271 | fi | |
09a101d6 | 272 | if test "x$(SYMROOT)" != "x"; then \ |
273 | $(INSTALL_DIR) $(SYMROOT); \ | |
50fe7201 | 274 | cp $(LIBCUPS) $(SYMROOT); \ |
c1420c87 | 275 | dsymutil $(SYMROOT)/$(LIBCUPS); \ |
09a101d6 | 276 | fi |
923edb68 | 277 | |
278 | installstatic: | |
279 | $(INSTALL_DIR) -m 755 $(LIBDIR) | |
f8b3a85b MS |
280 | $(INSTALL_LIB) -m 755 $(LIBCUPSSTATIC) $(LIBDIR) |
281 | $(RANLIB) $(LIBDIR)/$(LIBCUPSSTATIC) | |
282 | $(CHMOD) 555 $(LIBDIR)/$(LIBCUPSSTATIC) | |
ef416fc2 | 283 | |
ef416fc2 | 284 | |
757d2cad | 285 | # |
286 | # Uninstall object and target files... | |
287 | # | |
288 | ||
12f89d24 | 289 | uninstall: |
757d2cad | 290 | $(RM) $(LIBDIR)/libcups.2.dylib |
6d2f911b | 291 | $(RM) $(LIBDIR)/$(LIBCUPSSTATIC) |
757d2cad | 292 | $(RM) $(LIBDIR)/libcups.dylib |
757d2cad | 293 | $(RM) $(LIBDIR)/libcups.so |
294 | $(RM) $(LIBDIR)/libcups.so.2 | |
295 | -$(RMDIR) $(LIBDIR) | |
296 | for file in $(HEADERS); do \ | |
297 | $(RM) $(INCLUDEDIR)/cups/$$file; \ | |
298 | done | |
299 | -$(RMDIR) $(INCLUDEDIR)/cups | |
300 | ||
301 | ||
ef416fc2 | 302 | # |
5a1d7a17 | 303 | # libcups.so.2 |
ef416fc2 | 304 | # |
305 | ||
5a1d7a17 | 306 | libcups.so.2: $(LIBOBJS) |
ef416fc2 | 307 | echo Linking $@... |
c168a833 MS |
308 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS) $(LIBGSSAPI) \ |
309 | $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) | |
ef416fc2 | 310 | $(RM) `basename $@ .2` |
311 | $(LN) $@ `basename $@ .2` | |
312 | ||
313 | ||
314 | # | |
315 | # libcups.2.dylib | |
316 | # | |
317 | ||
f8b3a85b MS |
318 | libcups.2.dylib: $(LIBOBJS) $(LIBCUPSORDER) |
319 | echo Creating export list for $@... | |
320 | nm $(LIBOBJS) 2>/dev/null | grep "T _" | awk '{print $$3}' | \ | |
cc754834 | 321 | grep -v -e '^(_cupsConnect|_cupsCharset|_cupsEncodingName|_cupsSetDefaults|_cupsSetHTTPError|_cupsUserDefault|_httpWait)$$' | \ |
f8b3a85b | 322 | sort >t.exp |
ef416fc2 | 323 | echo Linking $@... |
e1d6a774 | 324 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \ |
fa73b229 | 325 | -install_name $(libdir)/$@ \ |
37e7e6e0 | 326 | -current_version 2.10.0 \ |
ef416fc2 | 327 | -compatibility_version 2.0.0 \ |
f8b3a85b | 328 | -exported_symbols_list t.exp \ |
c168a833 MS |
329 | $(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ |
330 | $(COMMONLIBS) $(LIBZ) | |
f8b3a85b | 331 | $(RM) libcups.dylib t.exp |
ef416fc2 | 332 | $(LN) $@ libcups.dylib |
333 | ||
334 | ||
ef416fc2 | 335 | # |
336 | # libcups.la | |
337 | # | |
338 | ||
339 | libcups.la: $(LIBOBJS) | |
340 | echo Linking $@... | |
c168a833 | 341 | $(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) \ |
37e7e6e0 | 342 | -rpath $(LIBDIR) -version-info 2:10 $(LIBGSSAPI) $(SSLLIBS) \ |
c168a833 | 343 | $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
ef416fc2 | 344 | |
345 | ||
346 | # | |
347 | # libcups.a | |
348 | # | |
349 | ||
350 | libcups.a: $(LIBOBJS) | |
351 | echo Archiving $@... | |
352 | $(RM) $@ | |
353 | $(AR) $(ARFLAGS) $@ $(LIBOBJS) | |
354 | $(RANLIB) $@ | |
355 | ||
356 | ||
757d2cad | 357 | # |
358 | # testadmin (dependency on static CUPS library is intentional) | |
359 | # | |
360 | ||
f8b3a85b | 361 | testadmin: testadmin.o $(LIBCUPSSTATIC) |
757d2cad | 362 | echo Linking $@... |
f8b3a85b | 363 | $(CC) $(LDFLAGS) -o $@ testadmin.o $(LIBCUPSSTATIC) \ |
c168a833 | 364 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
757d2cad | 365 | |
366 | ||
ef416fc2 | 367 | # |
368 | # testarray (dependency on static CUPS library is intentional) | |
369 | # | |
370 | ||
f8b3a85b | 371 | testarray: testarray.o $(LIBCUPSSTATIC) |
ef416fc2 | 372 | echo Linking $@... |
f8b3a85b | 373 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testarray.o $(LIBCUPSSTATIC) \ |
c168a833 | 374 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
375 | echo Running array API tests... |
376 | ./testarray | |
ef416fc2 | 377 | |
378 | ||
b2b9911d MS |
379 | # |
380 | # testcache (dependency on static CUPS library is intentional) | |
381 | # | |
382 | ||
383 | testcache: testcache.o $(LIBCUPSSTATIC) | |
384 | echo Linking $@... | |
385 | $(CC) $(LDFLAGS) -o $@ testcache.o $(LIBCUPSSTATIC) \ | |
386 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) | |
387 | ||
388 | ||
06d4e77b MS |
389 | # |
390 | # testconflicts (dependency on static CUPS library is intentional) | |
391 | # | |
392 | ||
f8b3a85b | 393 | testconflicts: testconflicts.o $(LIBCUPSSTATIC) |
06d4e77b | 394 | echo Linking $@... |
f8b3a85b | 395 | $(CC) $(LDFLAGS) -o $@ testconflicts.o $(LIBCUPSSTATIC) \ |
c168a833 | 396 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
06d4e77b MS |
397 | |
398 | ||
09a101d6 | 399 | # |
400 | # testcups (dependency on static CUPS library is intentional) | |
401 | # | |
402 | ||
f8b3a85b | 403 | testcups: testcups.o $(LIBCUPSSTATIC) |
09a101d6 | 404 | echo Linking $@... |
f8b3a85b | 405 | $(CC) $(LDFLAGS) -o $@ testcups.o $(LIBCUPSSTATIC) \ |
c168a833 | 406 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
09a101d6 | 407 | |
408 | ||
104fd4ae MS |
409 | # |
410 | # testdest (dependency on static CUPS library is intentional) | |
411 | # | |
412 | ||
413 | testdest: testdest.o $(LIBCUPSSTATIC) | |
414 | echo Linking $@... | |
415 | $(CC) $(LDFLAGS) -o $@ testdest.o $(LIBCUPSSTATIC) \ | |
416 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) | |
417 | ||
418 | ||
ef416fc2 | 419 | # |
420 | # testfile (dependency on static CUPS library is intentional) | |
421 | # | |
422 | ||
f8b3a85b | 423 | testfile: testfile.o $(LIBCUPSSTATIC) |
ef416fc2 | 424 | echo Linking $@... |
f8b3a85b | 425 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testfile.o $(LIBCUPSSTATIC) \ |
c168a833 | 426 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
427 | echo Running file API tests... |
428 | ./testfile | |
ef416fc2 | 429 | |
430 | ||
431 | # | |
432 | # testhttp (dependency on static CUPS library is intentional) | |
433 | # | |
434 | ||
f8b3a85b | 435 | testhttp: testhttp.o $(LIBCUPSSTATIC) |
ef416fc2 | 436 | echo Linking $@... |
f8b3a85b | 437 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhttp.o $(LIBCUPSSTATIC) \ |
c168a833 | 438 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
439 | echo Running HTTP API tests... |
440 | ./testhttp | |
ef416fc2 | 441 | |
442 | ||
443 | # | |
444 | # testipp (dependency on static CUPS library is intentional) | |
445 | # | |
446 | ||
f8b3a85b | 447 | testipp: testipp.o $(LIBCUPSSTATIC) |
ef416fc2 | 448 | echo Linking $@... |
f8b3a85b | 449 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testipp.o $(LIBCUPSSTATIC) \ |
c168a833 | 450 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
451 | echo Running IPP API tests... |
452 | ./testipp | |
ef416fc2 | 453 | |
454 | ||
455 | # | |
456 | # testi18n (dependency on static CUPS library is intentional) | |
457 | # | |
458 | ||
f8b3a85b | 459 | testi18n: testi18n.o $(LIBCUPSSTATIC) |
ef416fc2 | 460 | echo Linking $@... |
f8b3a85b | 461 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testi18n.o $(LIBCUPSSTATIC) \ |
c168a833 | 462 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
463 | echo Running internationalization API tests... |
464 | ./testi18n | |
ef416fc2 | 465 | |
466 | ||
467 | # | |
468 | # testlang (dependency on static CUPS library is intentional) | |
469 | # | |
470 | ||
f8b3a85b | 471 | testlang: testlang.o $(LIBCUPSSTATIC) |
ef416fc2 | 472 | echo Linking $@... |
f8b3a85b | 473 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testlang.o $(LIBCUPSSTATIC) \ |
c168a833 | 474 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
475 | echo Running language API tests... |
476 | ./testlang | |
ef416fc2 | 477 | |
478 | ||
20fbc903 MS |
479 | # |
480 | # testoptions (dependency on static CUPS library is intentional) | |
481 | # | |
482 | ||
f8b3a85b | 483 | testoptions: testoptions.o $(LIBCUPSSTATIC) |
20fbc903 | 484 | echo Linking $@... |
f8b3a85b | 485 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testoptions.o $(LIBCUPSSTATIC) \ |
c168a833 | 486 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
20fbc903 MS |
487 | echo Running option API tests... |
488 | ./testoptions | |
489 | ||
490 | ||
fa73b229 | 491 | # |
492 | # testppd (dependency on static CUPS library is intentional) | |
493 | # | |
494 | ||
f8b3a85b | 495 | testppd: testppd.o $(LIBCUPSSTATIC) test.ppd test2.ppd |
fa73b229 | 496 | echo Linking $@... |
f8b3a85b | 497 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testppd.o $(LIBCUPSSTATIC) \ |
c168a833 | 498 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
499 | echo Running PPD API tests... |
500 | ./testppd | |
fa73b229 | 501 | |
502 | ||
54afec33 MS |
503 | # |
504 | # testpwg (dependency on static CUPS library is intentional) | |
505 | # | |
506 | ||
507 | testpwg: testpwg.o $(LIBCUPSSTATIC) test.ppd | |
508 | echo Linking $@... | |
509 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testpwg.o $(LIBCUPSSTATIC) \ | |
510 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) | |
511 | echo Running PWG API tests... | |
512 | ./testpwg test.ppd | |
513 | ||
514 | ||
91c84a35 MS |
515 | # |
516 | # testsnmp (dependency on static CUPS library is intentional) | |
517 | # | |
518 | ||
f8b3a85b | 519 | testsnmp: testsnmp.o $(LIBCUPSSTATIC) |
91c84a35 | 520 | echo Linking $@... |
f8b3a85b | 521 | $(CC) $(LDFLAGS) -o $@ testsnmp.o $(LIBCUPSSTATIC) \ |
c168a833 | 522 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
91c84a35 MS |
523 | |
524 | ||
ef416fc2 | 525 | # |
526 | # Automatic API help files... | |
527 | # | |
528 | ||
529 | apihelp: | |
530 | echo Generating CUPS API help files... | |
5a738aea MS |
531 | mxmldoc --section "Programming" \ |
532 | --title "Introduction to CUPS Programming" \ | |
533 | --css ../doc/cups-printable.css \ | |
534 | --header api-overview.header --intro api-overview.shtml \ | |
535 | >../doc/help/api-overview.html | |
ef416fc2 | 536 | mxmldoc --section "Programming" --title "Array API" \ |
5a738aea MS |
537 | --css ../doc/cups-printable.css \ |
538 | --header api-array.header --intro api-array.shtml \ | |
f11a948a | 539 | api-array.xml \ |
ef416fc2 | 540 | array.h array.c >../doc/help/api-array.html |
f11a948a MS |
541 | mxmldoc --tokens help/api-array.html api-array.xml >../doc/help/api-array.tokens |
542 | $(RM) api-array.xml | |
ef416fc2 | 543 | mxmldoc --section "Programming" --title "CUPS API" \ |
5a738aea MS |
544 | --css ../doc/cups-printable.css \ |
545 | --header api-cups.header --intro api-cups.shtml \ | |
f11a948a | 546 | api-cups.xml \ |
6961465f MS |
547 | cups.h pwg.h adminutil.c dest*.c language.c notify.c \ |
548 | options.c pwg-media.c tempfile.c usersys.c \ | |
ef416fc2 | 549 | util.c >../doc/help/api-cups.html |
f11a948a MS |
550 | mxmldoc --tokens help/api-cups.html api-cups.xml >../doc/help/api-cups.tokens |
551 | $(RM) api-cups.xml | |
ef416fc2 | 552 | mxmldoc --section "Programming" --title "File and Directory APIs" \ |
5a738aea MS |
553 | --css ../doc/cups-printable.css \ |
554 | --header api-filedir.header --intro api-filedir.shtml \ | |
f11a948a | 555 | api-filedir.xml \ |
ef416fc2 | 556 | file.h file.c dir.h dir.c >../doc/help/api-filedir.html |
f11a948a MS |
557 | mxmldoc --tokens api-filedir.xml >../doc/help/api-filedir.tokens |
558 | $(RM) api-filedir.xml | |
a2326b5b | 559 | mxmldoc --section "Programming" --title "PPD API (DEPRECATED)" \ |
5a738aea MS |
560 | --css ../doc/cups-printable.css \ |
561 | --header api-ppd.header --intro api-ppd.shtml \ | |
f11a948a | 562 | api-ppd.xml \ |
66ab9486 | 563 | ppd.h attr.c conflicts.c custom.c emit.c localize.c mark.c page.c \ |
ef416fc2 | 564 | ppd.c >../doc/help/api-ppd.html |
f11a948a MS |
565 | mxmldoc --tokens help/api-ppd.html api-ppd.xml >../doc/help/api-ppd.tokens |
566 | $(RM) api-ppd.xml | |
ef416fc2 | 567 | mxmldoc --section "Programming" --title "HTTP and IPP APIs" \ |
5a738aea MS |
568 | --css ../doc/cups-printable.css \ |
569 | --header api-httpipp.header --intro api-httpipp.shtml \ | |
f11a948a | 570 | api-httpipp.xml \ |
ae71f5de MS |
571 | http.h ipp.h auth.c getdevices.c getputfile.c encode.c \ |
572 | http.c http-addr.c http-support.c ipp.c ipp-support.c \ | |
573 | md5passwd.c request.c >../doc/help/api-httpipp.html | |
f11a948a MS |
574 | mxmldoc --tokens help/api-httpipp.html api-httpipp.xml >../doc/help/api-httpipp.tokens |
575 | $(RM) api-httpipp.xml | |
5a738aea MS |
576 | mxmldoc --section "Programming" \ |
577 | --title "Filter and Backend Programming" \ | |
578 | --css ../doc/cups-printable.css \ | |
579 | --header api-filter.header --intro api-filter.shtml \ | |
f11a948a | 580 | api-filter.xml \ |
ac884b6a | 581 | backchannel.c backend.h backend.c sidechannel.c sidechannel.h \ |
7a14d768 | 582 | >../doc/help/api-filter.html |
f11a948a MS |
583 | mxmldoc --tokens help/api-filter.html api-filter.xml >../doc/help/api-filter.tokens |
584 | $(RM) api-filter.xml | |
5a738aea MS |
585 | |
586 | framedhelp: | |
587 | echo Generating CUPS API help files... | |
588 | mxmldoc --framed api-overview \ | |
589 | --section "Programming" \ | |
590 | --title "Introduction to CUPS Programming" \ | |
591 | --css ../doc/cups-printable.css \ | |
592 | --header api-overview.header --intro api-overview.shtml | |
593 | mxmldoc --framed api-array \ | |
594 | --section "Programming" --title "Array API" \ | |
595 | --css ../doc/cups-printable.css \ | |
596 | --header api-array.header --intro api-array.shtml \ | |
597 | array.h array.c | |
598 | mxmldoc --framed api-cups \ | |
599 | --section "Programming" --title "CUPS API" \ | |
600 | --css ../doc/cups-printable.css \ | |
601 | --header api-cups.header --intro api-cups.shtml \ | |
5a9febac | 602 | cups.h adminutil.c dest*.c language.c notify.c \ |
5a738aea | 603 | options.c tempfile.c usersys.c \ |
ac884b6a | 604 | util.c |
5a738aea MS |
605 | mxmldoc --framed api-filedir \ |
606 | --section "Programming" --title "File and Directory APIs" \ | |
607 | --css ../doc/cups-printable.css \ | |
608 | --header api-filedir.header --intro api-filedir.shtml \ | |
ac884b6a | 609 | file.h file.c dir.h dir.c |
5a738aea | 610 | mxmldoc --framed api-ppd \ |
a2326b5b | 611 | --section "Programming" --title "PPD API (DEPRECATED)" \ |
5a738aea MS |
612 | --css ../doc/cups-printable.css \ |
613 | --header api-ppd.header --intro api-ppd.shtml \ | |
66ab9486 MS |
614 | ppd.h attr.c conflicts.c custom.c emit.c localize.c mark.c \ |
615 | page.c ppd.c | |
5a738aea MS |
616 | mxmldoc --framed api-httpipp \ |
617 | --section "Programming" --title "HTTP and IPP APIs" \ | |
618 | --css ../doc/cups-printable.css \ | |
619 | --header api-httpipp.header --intro api-httpipp.shtml \ | |
ae71f5de MS |
620 | http.h ipp.h auth.c getdevices.c getputfile.c encode.c \ |
621 | http.c http-addr.c http-support.c ipp.c ipp-support.c \ | |
622 | md5passwd.c request.c | |
5a738aea MS |
623 | mxmldoc --framed api-filter \ |
624 | --section "Programming" \ | |
625 | --title "Filter and Backend Programming" \ | |
626 | --css ../doc/cups-printable.css \ | |
627 | --header api-filter.header --intro api-filter.shtml \ | |
7a14d768 | 628 | backchannel.c backend.h backend.c sidechannel.c sidechannel.h |
ef416fc2 | 629 | |
630 | ||
84315f46 MS |
631 | # |
632 | # Lines of code computation... | |
633 | # | |
634 | ||
635 | sloc: | |
636 | echo "libcupslite: \c" | |
637 | sloccount $(LITEOBJS:.o=.c) 2>/dev/null | grep "Total Physical" | awk '{print $$9}' | |
638 | echo "libcups: \c" | |
639 | sloccount $(LIBOBJS:.o=.c) 2>/dev/null | grep "Total Physical" | awk '{print $$9}' | |
640 | ||
641 | ||
ef416fc2 | 642 | # |
643 | # Dependencies... | |
644 | # | |
645 | ||
646 | include Dependencies | |
25731360 | 647 | tls.o: tls-darwin.c tls-gnutls.c tls-sspi.c |
ef416fc2 | 648 | |
649 | ||
650 | # | |
f2d18633 | 651 | # End of "$Id$". |
ef416fc2 | 652 | # |