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