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