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