]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
f2d18633 | 2 | # "$Id$" |
ef416fc2 | 3 | # |
5a1d7a17 | 4 | # API library Makefile for CUPS. |
ef416fc2 | 5 | # |
f787e1e3 | 6 | # Copyright 2007-2015 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 \ |
ef416fc2 | 35 | auth.o \ |
36 | backchannel.o \ | |
a4d04587 | 37 | backend.o \ |
ae71f5de | 38 | debug.o \ |
ef416fc2 | 39 | dest.o \ |
dcb445bc MS |
40 | dest-job.o \ |
41 | dest-localization.o \ | |
42 | dest-options.o \ | |
ef416fc2 | 43 | dir.o \ |
ef416fc2 | 44 | encode.o \ |
45 | file.o \ | |
ae71f5de | 46 | getdevices.o \ |
89d46774 | 47 | getifaddrs.o \ |
ef416fc2 | 48 | getputfile.o \ |
49 | globals.o \ | |
5ae9fbb3 | 50 | hash.o \ |
ef416fc2 | 51 | http.o \ |
52 | http-addr.o \ | |
53 | http-addrlist.o \ | |
54 | http-support.o \ | |
55 | ipp.o \ | |
56 | ipp-support.o \ | |
57 | langprintf.o \ | |
58 | language.o \ | |
ef416fc2 | 59 | md5.o \ |
60 | md5passwd.o \ | |
fa73b229 | 61 | notify.o \ |
ef416fc2 | 62 | options.o \ |
ef416fc2 | 63 | ppd.o \ |
f787e1e3 | 64 | ppd-attr.o \ |
f14324a7 | 65 | ppd-cache.o \ |
f787e1e3 MS |
66 | ppd-conflicts.o \ |
67 | ppd-custom.o \ | |
68 | ppd-emit.o \ | |
69 | ppd-localize.o \ | |
70 | ppd-mark.o \ | |
71 | ppd-page.o \ | |
72 | ppd-util.o \ | |
54afec33 | 73 | pwg-media.o \ |
ecdc0628 | 74 | request.o \ |
f7deaa1a | 75 | sidechannel.o \ |
91c84a35 | 76 | snmp.o \ |
ef416fc2 | 77 | snprintf.o \ |
78 | string.o \ | |
79 | tempfile.o \ | |
6d2f911b | 80 | thread.o \ |
25731360 | 81 | tls.o \ |
ef416fc2 | 82 | transcode.o \ |
83 | usersys.o \ | |
84 | util.o | |
dcb445bc | 85 | TESTOBJS = \ |
757d2cad | 86 | testadmin.o \ |
ef416fc2 | 87 | testarray.o \ |
5315d269 | 88 | testcache.o \ |
06d4e77b | 89 | testconflicts.o \ |
09a101d6 | 90 | testcups.o \ |
104fd4ae | 91 | testdest.o \ |
ef416fc2 | 92 | testfile.o \ |
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 MS |
157 | testconflicts \ |
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 $@... | |
325 | nm $(LIBOBJS) 2>/dev/null | grep "T _" | awk '{print $$3}' | \ | |
cc754834 | 326 | grep -v -e '^(_cupsConnect|_cupsCharset|_cupsEncodingName|_cupsSetDefaults|_cupsSetHTTPError|_cupsUserDefault|_httpWait)$$' | \ |
f8b3a85b | 327 | sort >t.exp |
ef416fc2 | 328 | echo Linking $@... |
e1d6a774 | 329 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \ |
fa73b229 | 330 | -install_name $(libdir)/$@ \ |
95d03f33 | 331 | -current_version 2.11.0 \ |
ef416fc2 | 332 | -compatibility_version 2.0.0 \ |
f8b3a85b | 333 | -exported_symbols_list t.exp \ |
c168a833 MS |
334 | $(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ |
335 | $(COMMONLIBS) $(LIBZ) | |
f8b3a85b | 336 | $(RM) libcups.dylib t.exp |
ef416fc2 | 337 | $(LN) $@ libcups.dylib |
338 | ||
339 | ||
ef416fc2 | 340 | # |
341 | # libcups.la | |
342 | # | |
343 | ||
344 | libcups.la: $(LIBOBJS) | |
345 | echo Linking $@... | |
c168a833 | 346 | $(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) \ |
95d03f33 | 347 | -rpath $(LIBDIR) -version-info 2:11 $(LIBGSSAPI) $(SSLLIBS) \ |
c168a833 | 348 | $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
ef416fc2 | 349 | |
350 | ||
351 | # | |
352 | # libcups.a | |
353 | # | |
354 | ||
355 | libcups.a: $(LIBOBJS) | |
356 | echo Archiving $@... | |
357 | $(RM) $@ | |
358 | $(AR) $(ARFLAGS) $@ $(LIBOBJS) | |
359 | $(RANLIB) $@ | |
360 | ||
361 | ||
4128527f MS |
362 | # |
363 | # libcups2.def (Windows DLL exports file...) | |
364 | # | |
365 | ||
366 | libcups2.def: $(LIBOBJS) Makefile | |
367 | echo Generating $@... | |
368 | echo "LIBRARY libcups2" >libcups2.def | |
369 | echo "VERSION 2.11" >>libcups2.def | |
370 | echo "EXPORTS" >>libcups2.def | |
371 | (nm $(LIBOBJS) 2>/dev/null | grep "T _" | awk '{print $$3}'; \ | |
372 | echo __cups_strcpy; echo __cups_strlcat; echo __cups_strlcpy) | \ | |
373 | grep -v -E \ | |
374 | -e 'cups_debug|Apple|BackChannel|Backend|FileCheck|Filter|GSSService|SetNegotiate|SideChannel' \ | |
375 | -e 'Block$$' | \ | |
376 | sed -e '1,$$s/^_//' | sort >>libcups2.def | |
377 | ||
378 | ||
757d2cad | 379 | # |
380 | # testadmin (dependency on static CUPS library is intentional) | |
381 | # | |
382 | ||
f8b3a85b | 383 | testadmin: testadmin.o $(LIBCUPSSTATIC) |
757d2cad | 384 | echo Linking $@... |
f8b3a85b | 385 | $(CC) $(LDFLAGS) -o $@ testadmin.o $(LIBCUPSSTATIC) \ |
c168a833 | 386 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
757d2cad | 387 | |
388 | ||
ef416fc2 | 389 | # |
390 | # testarray (dependency on static CUPS library is intentional) | |
391 | # | |
392 | ||
f8b3a85b | 393 | testarray: testarray.o $(LIBCUPSSTATIC) |
ef416fc2 | 394 | echo Linking $@... |
f8b3a85b | 395 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testarray.o $(LIBCUPSSTATIC) \ |
c168a833 | 396 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
397 | echo Running array API tests... |
398 | ./testarray | |
ef416fc2 | 399 | |
400 | ||
b2b9911d MS |
401 | # |
402 | # testcache (dependency on static CUPS library is intentional) | |
403 | # | |
404 | ||
405 | testcache: testcache.o $(LIBCUPSSTATIC) | |
406 | echo Linking $@... | |
407 | $(CC) $(LDFLAGS) -o $@ testcache.o $(LIBCUPSSTATIC) \ | |
408 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) | |
409 | ||
410 | ||
06d4e77b MS |
411 | # |
412 | # testconflicts (dependency on static CUPS library is intentional) | |
413 | # | |
414 | ||
f8b3a85b | 415 | testconflicts: testconflicts.o $(LIBCUPSSTATIC) |
06d4e77b | 416 | echo Linking $@... |
f8b3a85b | 417 | $(CC) $(LDFLAGS) -o $@ testconflicts.o $(LIBCUPSSTATIC) \ |
c168a833 | 418 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
06d4e77b MS |
419 | |
420 | ||
09a101d6 | 421 | # |
422 | # testcups (dependency on static CUPS library is intentional) | |
423 | # | |
424 | ||
f8b3a85b | 425 | testcups: testcups.o $(LIBCUPSSTATIC) |
09a101d6 | 426 | echo Linking $@... |
f8b3a85b | 427 | $(CC) $(LDFLAGS) -o $@ testcups.o $(LIBCUPSSTATIC) \ |
c168a833 | 428 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
09a101d6 | 429 | |
430 | ||
104fd4ae MS |
431 | # |
432 | # testdest (dependency on static CUPS library is intentional) | |
433 | # | |
434 | ||
435 | testdest: testdest.o $(LIBCUPSSTATIC) | |
436 | echo Linking $@... | |
437 | $(CC) $(LDFLAGS) -o $@ testdest.o $(LIBCUPSSTATIC) \ | |
438 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) | |
439 | ||
440 | ||
ef416fc2 | 441 | # |
442 | # testfile (dependency on static CUPS library is intentional) | |
443 | # | |
444 | ||
f8b3a85b | 445 | testfile: testfile.o $(LIBCUPSSTATIC) |
ef416fc2 | 446 | echo Linking $@... |
f8b3a85b | 447 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testfile.o $(LIBCUPSSTATIC) \ |
c168a833 | 448 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
449 | echo Running file API tests... |
450 | ./testfile | |
ef416fc2 | 451 | |
452 | ||
453 | # | |
454 | # testhttp (dependency on static CUPS library is intentional) | |
455 | # | |
456 | ||
f8b3a85b | 457 | testhttp: testhttp.o $(LIBCUPSSTATIC) |
ef416fc2 | 458 | echo Linking $@... |
f8b3a85b | 459 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhttp.o $(LIBCUPSSTATIC) \ |
c168a833 | 460 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
461 | echo Running HTTP API tests... |
462 | ./testhttp | |
ef416fc2 | 463 | |
464 | ||
465 | # | |
466 | # testipp (dependency on static CUPS library is intentional) | |
467 | # | |
468 | ||
f8b3a85b | 469 | testipp: testipp.o $(LIBCUPSSTATIC) |
ef416fc2 | 470 | echo Linking $@... |
f8b3a85b | 471 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testipp.o $(LIBCUPSSTATIC) \ |
c168a833 | 472 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
473 | echo Running IPP API tests... |
474 | ./testipp | |
ef416fc2 | 475 | |
476 | ||
477 | # | |
478 | # testi18n (dependency on static CUPS library is intentional) | |
479 | # | |
480 | ||
f8b3a85b | 481 | testi18n: testi18n.o $(LIBCUPSSTATIC) |
ef416fc2 | 482 | echo Linking $@... |
f8b3a85b | 483 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testi18n.o $(LIBCUPSSTATIC) \ |
c168a833 | 484 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
485 | echo Running internationalization API tests... |
486 | ./testi18n | |
ef416fc2 | 487 | |
488 | ||
489 | # | |
490 | # testlang (dependency on static CUPS library is intentional) | |
491 | # | |
492 | ||
f8b3a85b | 493 | testlang: testlang.o $(LIBCUPSSTATIC) |
ef416fc2 | 494 | echo Linking $@... |
f8b3a85b | 495 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testlang.o $(LIBCUPSSTATIC) \ |
c168a833 | 496 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
497 | echo Running language API tests... |
498 | ./testlang | |
ef416fc2 | 499 | |
500 | ||
20fbc903 MS |
501 | # |
502 | # testoptions (dependency on static CUPS library is intentional) | |
503 | # | |
504 | ||
f8b3a85b | 505 | testoptions: testoptions.o $(LIBCUPSSTATIC) |
20fbc903 | 506 | echo Linking $@... |
f8b3a85b | 507 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testoptions.o $(LIBCUPSSTATIC) \ |
c168a833 | 508 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
20fbc903 MS |
509 | echo Running option API tests... |
510 | ./testoptions | |
511 | ||
512 | ||
fa73b229 | 513 | # |
514 | # testppd (dependency on static CUPS library is intentional) | |
515 | # | |
516 | ||
f8b3a85b | 517 | testppd: testppd.o $(LIBCUPSSTATIC) test.ppd test2.ppd |
fa73b229 | 518 | echo Linking $@... |
f8b3a85b | 519 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testppd.o $(LIBCUPSSTATIC) \ |
c168a833 | 520 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
521 | echo Running PPD API tests... |
522 | ./testppd | |
fa73b229 | 523 | |
524 | ||
54afec33 MS |
525 | # |
526 | # testpwg (dependency on static CUPS library is intentional) | |
527 | # | |
528 | ||
529 | testpwg: testpwg.o $(LIBCUPSSTATIC) test.ppd | |
530 | echo Linking $@... | |
531 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testpwg.o $(LIBCUPSSTATIC) \ | |
532 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) | |
533 | echo Running PWG API tests... | |
534 | ./testpwg test.ppd | |
535 | ||
536 | ||
91c84a35 MS |
537 | # |
538 | # testsnmp (dependency on static CUPS library is intentional) | |
539 | # | |
540 | ||
f8b3a85b | 541 | testsnmp: testsnmp.o $(LIBCUPSSTATIC) |
91c84a35 | 542 | echo Linking $@... |
f8b3a85b | 543 | $(CC) $(LDFLAGS) -o $@ testsnmp.o $(LIBCUPSSTATIC) \ |
c168a833 | 544 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
91c84a35 MS |
545 | |
546 | ||
79a37326 MS |
547 | # |
548 | # tlscheck (dependency on static CUPS library is intentional) | |
549 | # | |
550 | ||
551 | tlscheck: tlscheck.o $(LIBCUPSSTATIC) | |
552 | echo Linking $@... | |
553 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ tlscheck.o $(LIBCUPSSTATIC) \ | |
554 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) | |
555 | ||
556 | ||
ef416fc2 | 557 | # |
558 | # Automatic API help files... | |
559 | # | |
560 | ||
561 | apihelp: | |
562 | echo Generating CUPS API help files... | |
5a738aea MS |
563 | mxmldoc --section "Programming" \ |
564 | --title "Introduction to CUPS Programming" \ | |
565 | --css ../doc/cups-printable.css \ | |
566 | --header api-overview.header --intro api-overview.shtml \ | |
567 | >../doc/help/api-overview.html | |
ef416fc2 | 568 | mxmldoc --section "Programming" --title "Array API" \ |
5a738aea MS |
569 | --css ../doc/cups-printable.css \ |
570 | --header api-array.header --intro api-array.shtml \ | |
f11a948a | 571 | api-array.xml \ |
ef416fc2 | 572 | array.h array.c >../doc/help/api-array.html |
f11a948a MS |
573 | mxmldoc --tokens help/api-array.html api-array.xml >../doc/help/api-array.tokens |
574 | $(RM) api-array.xml | |
ef416fc2 | 575 | mxmldoc --section "Programming" --title "CUPS API" \ |
5a738aea MS |
576 | --css ../doc/cups-printable.css \ |
577 | --header api-cups.header --intro api-cups.shtml \ | |
f11a948a | 578 | api-cups.xml \ |
6961465f MS |
579 | cups.h pwg.h adminutil.c dest*.c language.c notify.c \ |
580 | options.c pwg-media.c tempfile.c usersys.c \ | |
ef416fc2 | 581 | util.c >../doc/help/api-cups.html |
f11a948a MS |
582 | mxmldoc --tokens help/api-cups.html api-cups.xml >../doc/help/api-cups.tokens |
583 | $(RM) api-cups.xml | |
ef416fc2 | 584 | mxmldoc --section "Programming" --title "File and Directory APIs" \ |
5a738aea MS |
585 | --css ../doc/cups-printable.css \ |
586 | --header api-filedir.header --intro api-filedir.shtml \ | |
f11a948a | 587 | api-filedir.xml \ |
ef416fc2 | 588 | file.h file.c dir.h dir.c >../doc/help/api-filedir.html |
f11a948a MS |
589 | mxmldoc --tokens api-filedir.xml >../doc/help/api-filedir.tokens |
590 | $(RM) api-filedir.xml | |
a2326b5b | 591 | mxmldoc --section "Programming" --title "PPD API (DEPRECATED)" \ |
5a738aea MS |
592 | --css ../doc/cups-printable.css \ |
593 | --header api-ppd.header --intro api-ppd.shtml \ | |
f11a948a | 594 | api-ppd.xml \ |
66ab9486 | 595 | ppd.h attr.c conflicts.c custom.c emit.c localize.c mark.c page.c \ |
ef416fc2 | 596 | ppd.c >../doc/help/api-ppd.html |
f11a948a MS |
597 | mxmldoc --tokens help/api-ppd.html api-ppd.xml >../doc/help/api-ppd.tokens |
598 | $(RM) api-ppd.xml | |
ef416fc2 | 599 | mxmldoc --section "Programming" --title "HTTP and IPP APIs" \ |
5a738aea MS |
600 | --css ../doc/cups-printable.css \ |
601 | --header api-httpipp.header --intro api-httpipp.shtml \ | |
f11a948a | 602 | api-httpipp.xml \ |
ae71f5de MS |
603 | http.h ipp.h auth.c getdevices.c getputfile.c encode.c \ |
604 | http.c http-addr.c http-support.c ipp.c ipp-support.c \ | |
605 | md5passwd.c request.c >../doc/help/api-httpipp.html | |
f11a948a MS |
606 | mxmldoc --tokens help/api-httpipp.html api-httpipp.xml >../doc/help/api-httpipp.tokens |
607 | $(RM) api-httpipp.xml | |
5a738aea MS |
608 | mxmldoc --section "Programming" \ |
609 | --title "Filter and Backend Programming" \ | |
610 | --css ../doc/cups-printable.css \ | |
611 | --header api-filter.header --intro api-filter.shtml \ | |
f11a948a | 612 | api-filter.xml \ |
ac884b6a | 613 | backchannel.c backend.h backend.c sidechannel.c sidechannel.h \ |
7a14d768 | 614 | >../doc/help/api-filter.html |
f11a948a MS |
615 | mxmldoc --tokens help/api-filter.html api-filter.xml >../doc/help/api-filter.tokens |
616 | $(RM) api-filter.xml | |
5a738aea MS |
617 | |
618 | framedhelp: | |
619 | echo Generating CUPS API help files... | |
620 | mxmldoc --framed api-overview \ | |
621 | --section "Programming" \ | |
622 | --title "Introduction to CUPS Programming" \ | |
623 | --css ../doc/cups-printable.css \ | |
624 | --header api-overview.header --intro api-overview.shtml | |
625 | mxmldoc --framed api-array \ | |
626 | --section "Programming" --title "Array API" \ | |
627 | --css ../doc/cups-printable.css \ | |
628 | --header api-array.header --intro api-array.shtml \ | |
629 | array.h array.c | |
630 | mxmldoc --framed api-cups \ | |
631 | --section "Programming" --title "CUPS API" \ | |
632 | --css ../doc/cups-printable.css \ | |
633 | --header api-cups.header --intro api-cups.shtml \ | |
5a9febac | 634 | cups.h adminutil.c dest*.c language.c notify.c \ |
5a738aea | 635 | options.c tempfile.c usersys.c \ |
ac884b6a | 636 | util.c |
5a738aea MS |
637 | mxmldoc --framed api-filedir \ |
638 | --section "Programming" --title "File and Directory APIs" \ | |
639 | --css ../doc/cups-printable.css \ | |
640 | --header api-filedir.header --intro api-filedir.shtml \ | |
ac884b6a | 641 | file.h file.c dir.h dir.c |
5a738aea | 642 | mxmldoc --framed api-ppd \ |
a2326b5b | 643 | --section "Programming" --title "PPD API (DEPRECATED)" \ |
5a738aea MS |
644 | --css ../doc/cups-printable.css \ |
645 | --header api-ppd.header --intro api-ppd.shtml \ | |
66ab9486 MS |
646 | ppd.h attr.c conflicts.c custom.c emit.c localize.c mark.c \ |
647 | page.c ppd.c | |
5a738aea MS |
648 | mxmldoc --framed api-httpipp \ |
649 | --section "Programming" --title "HTTP and IPP APIs" \ | |
650 | --css ../doc/cups-printable.css \ | |
651 | --header api-httpipp.header --intro api-httpipp.shtml \ | |
ae71f5de MS |
652 | http.h ipp.h auth.c getdevices.c getputfile.c encode.c \ |
653 | http.c http-addr.c http-support.c ipp.c ipp-support.c \ | |
654 | md5passwd.c request.c | |
5a738aea MS |
655 | mxmldoc --framed api-filter \ |
656 | --section "Programming" \ | |
657 | --title "Filter and Backend Programming" \ | |
658 | --css ../doc/cups-printable.css \ | |
659 | --header api-filter.header --intro api-filter.shtml \ | |
7a14d768 | 660 | backchannel.c backend.h backend.c sidechannel.c sidechannel.h |
ef416fc2 | 661 | |
662 | ||
84315f46 MS |
663 | # |
664 | # Lines of code computation... | |
665 | # | |
666 | ||
667 | sloc: | |
668 | echo "libcupslite: \c" | |
669 | sloccount $(LITEOBJS:.o=.c) 2>/dev/null | grep "Total Physical" | awk '{print $$9}' | |
670 | echo "libcups: \c" | |
671 | sloccount $(LIBOBJS:.o=.c) 2>/dev/null | grep "Total Physical" | awk '{print $$9}' | |
672 | ||
673 | ||
ef416fc2 | 674 | # |
675 | # Dependencies... | |
676 | # | |
677 | ||
678 | include Dependencies | |
25731360 | 679 | tls.o: tls-darwin.c tls-gnutls.c tls-sspi.c |
ef416fc2 | 680 | |
681 | ||
682 | # | |
f2d18633 | 683 | # End of "$Id$". |
ef416fc2 | 684 | # |