]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
9964a31a | 2 | # Library Makefile for CUPS. |
ef416fc2 | 3 | # |
d728c293 MS |
4 | # Copyright © 2007-2019 by Apple Inc. |
5 | # Copyright © 1997-2006 by Easy Software Products, all rights reserved. | |
ef416fc2 | 6 | # |
123979a9 MS |
7 | # Licensed under Apache License v2.0. See the file "LICENSE" for more |
8 | # information. | |
ef416fc2 | 9 | # |
10 | ||
11 | include ../Makedefs | |
12 | ||
cb7f98ee | 13 | |
ef416fc2 | 14 | # |
15 | # Object files... | |
16 | # | |
17 | ||
58b64dbb | 18 | COREOBJS = \ |
ef416fc2 | 19 | array.o \ |
ef416fc2 | 20 | auth.o \ |
ae71f5de | 21 | debug.o \ |
ef416fc2 | 22 | dest.o \ |
dcb445bc MS |
23 | dest-job.o \ |
24 | dest-localization.o \ | |
25 | dest-options.o \ | |
ef416fc2 | 26 | dir.o \ |
ef416fc2 | 27 | encode.o \ |
28 | file.o \ | |
29 | getputfile.o \ | |
30 | globals.o \ | |
5ae9fbb3 | 31 | hash.o \ |
ef416fc2 | 32 | http.o \ |
33 | http-addr.o \ | |
34 | http-addrlist.o \ | |
35 | http-support.o \ | |
36 | ipp.o \ | |
fd96ad89 MS |
37 | ipp-file.o \ |
38 | ipp-vars.o \ | |
ef416fc2 | 39 | ipp-support.o \ |
40 | langprintf.o \ | |
41 | language.o \ | |
ef416fc2 | 42 | md5.o \ |
43 | md5passwd.o \ | |
fa73b229 | 44 | notify.o \ |
ef416fc2 | 45 | options.o \ |
54afec33 | 46 | pwg-media.o \ |
dd204f7a | 47 | raster-error.o \ |
dd204f7a | 48 | raster-stream.o \ |
58b64dbb | 49 | raster-stubs.o \ |
ecdc0628 | 50 | request.o \ |
ef416fc2 | 51 | snprintf.o \ |
52 | string.o \ | |
53 | tempfile.o \ | |
6d2f911b | 54 | thread.o \ |
25731360 | 55 | tls.o \ |
ef416fc2 | 56 | transcode.o \ |
57 | usersys.o \ | |
58 | util.o | |
58b64dbb MS |
59 | |
60 | DRIVEROBJS = \ | |
61 | adminutil.o \ | |
62 | backchannel.o \ | |
63 | backend.o \ | |
64 | getdevices.o \ | |
65 | getifaddrs.o \ | |
66 | ppd.o \ | |
67 | ppd-attr.o \ | |
68 | ppd-cache.o \ | |
69 | ppd-conflicts.o \ | |
70 | ppd-custom.o \ | |
71 | ppd-emit.o \ | |
72 | ppd-localize.o \ | |
73 | ppd-mark.o \ | |
74 | ppd-page.o \ | |
75 | ppd-util.o \ | |
76 | raster-interpret.o \ | |
77 | raster-interstub.o \ | |
78 | sidechannel.o \ | |
79 | snmp.o | |
80 | ||
81 | LIBOBJS = \ | |
82 | $(LIBCUPSOBJS) | |
83 | ||
123979a9 | 84 | IMAGEOBJS = \ |
dd204f7a MS |
85 | raster-interstub.o \ |
86 | raster-stubs.o | |
58b64dbb | 87 | |
dcb445bc | 88 | TESTOBJS = \ |
123979a9 | 89 | rasterbench.o \ |
757d2cad | 90 | testadmin.o \ |
ef416fc2 | 91 | testarray.o \ |
5315d269 | 92 | testcache.o \ |
123979a9 | 93 | testclient.o \ |
06d4e77b | 94 | testconflicts.o \ |
fe33927d | 95 | testcreds.o \ |
09a101d6 | 96 | testcups.o \ |
104fd4ae | 97 | testdest.o \ |
ef416fc2 | 98 | testfile.o \ |
86390cbf | 99 | testgetdests.o \ |
ef416fc2 | 100 | testhttp.o \ |
101 | testi18n.o \ | |
102 | testipp.o \ | |
20fbc903 | 103 | testoptions.o \ |
ef416fc2 | 104 | testlang.o \ |
fa73b229 | 105 | testppd.o \ |
54afec33 | 106 | testpwg.o \ |
123979a9 | 107 | testraster.o \ |
79a37326 | 108 | testsnmp.o \ |
cfaaa07a | 109 | testthreads.o \ |
79a37326 | 110 | tlscheck.o |
dcb445bc MS |
111 | OBJS = \ |
112 | $(LIBOBJS) \ | |
123979a9 | 113 | $(IMAGEOBJS) \ |
dcb445bc MS |
114 | $(TESTOBJS) |
115 | ||
ef416fc2 | 116 | |
117 | # | |
118 | # Header files to install... | |
119 | # | |
120 | ||
ffbf1e61 | 121 | COREHEADERS = \ |
ef416fc2 | 122 | array.h \ |
123 | cups.h \ | |
124 | dir.h \ | |
125 | file.h \ | |
126 | http.h \ | |
ef416fc2 | 127 | ipp.h \ |
128 | language.h \ | |
6961465f | 129 | pwg.h \ |
ac884b6a | 130 | raster.h \ |
a41f09e2 MS |
131 | transcode.h \ |
132 | versioning.h | |
ef416fc2 | 133 | |
ffbf1e61 MS |
134 | DRIVERHEADERS = \ |
135 | adminutil.h \ | |
136 | backend.h \ | |
137 | ppd.h \ | |
138 | sidechannel.h | |
139 | ||
140 | HEADERS = \ | |
141 | $(LIBHEADERS) | |
142 | ||
143 | COREHEADERSPRIV = \ | |
eac3a0a0 | 144 | array-private.h \ |
71e16022 | 145 | cups-private.h \ |
82428176 | 146 | debug-private.h \ |
71e16022 MS |
147 | file-private.h \ |
148 | http-private.h \ | |
149 | ipp-private.h \ | |
150 | language-private.h \ | |
71e16022 | 151 | pwg-private.h \ |
a4845881 | 152 | raster-private.h \ |
6d2f911b MS |
153 | string-private.h \ |
154 | thread-private.h | |
155 | ||
ffbf1e61 MS |
156 | DRIVERHEADERSPRIV = \ |
157 | ppd-private.h \ | |
158 | snmp-private.h | |
159 | ||
160 | HEADERSPRIV = \ | |
161 | $(LIBHEADERSPRIV) | |
162 | ||
ef416fc2 | 163 | |
164 | # | |
165 | # Targets in this directory... | |
166 | # | |
167 | ||
c9fc04c6 | 168 | LIBTARGETS = \ |
123979a9 | 169 | $(LIBCUPSIMAGE) \ |
f8b3a85b | 170 | $(LIBCUPSSTATIC) \ |
123979a9 MS |
171 | $(LIBCUPS) \ |
172 | libcupsimage.a | |
5f64df29 MS |
173 | |
174 | UNITTARGETS = \ | |
123979a9 | 175 | rasterbench \ |
5f64df29 | 176 | testadmin \ |
ef416fc2 | 177 | testarray \ |
b2b9911d | 178 | testcache \ |
123979a9 | 179 | testclient \ |
5f64df29 | 180 | testconflicts \ |
fe33927d | 181 | testcreds \ |
5f64df29 | 182 | testcups \ |
104fd4ae | 183 | testdest \ |
ef416fc2 | 184 | testfile \ |
86390cbf | 185 | testgetdests \ |
ef416fc2 | 186 | testhttp \ |
187 | testi18n \ | |
188 | testipp \ | |
fa73b229 | 189 | testlang \ |
20fbc903 | 190 | testoptions \ |
5f64df29 | 191 | testppd \ |
54afec33 | 192 | testpwg \ |
123979a9 | 193 | testraster \ |
79a37326 | 194 | testsnmp \ |
cfaaa07a | 195 | testthreads \ |
79a37326 | 196 | tlscheck |
c9fc04c6 MS |
197 | |
198 | TARGETS = \ | |
5f64df29 | 199 | $(LIBTARGETS) |
ef416fc2 | 200 | |
201 | ||
202 | # | |
203 | # Make all targets... | |
204 | # | |
205 | ||
f8b3a85b | 206 | all: $(TARGETS) |
ef416fc2 | 207 | |
208 | ||
c9fc04c6 MS |
209 | # |
210 | # Make library targets... | |
211 | # | |
212 | ||
213 | libs: $(LIBTARGETS) | |
214 | ||
215 | ||
5f64df29 MS |
216 | # |
217 | # Make unit tests... | |
218 | # | |
219 | ||
220 | unittests: $(UNITTARGETS) | |
221 | ||
222 | ||
ef416fc2 | 223 | # |
224 | # Remove object and target files... | |
225 | # | |
226 | ||
227 | clean: | |
5f64df29 | 228 | $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS) |
5a1d7a17 | 229 | $(RM) libcups.so libcups.dylib |
e28345e7 | 230 | $(RM) libcupsimage.so libcupsimage.dylib |
ef416fc2 | 231 | |
232 | ||
233 | # | |
234 | # Update dependencies (without system header dependencies...) | |
235 | # | |
236 | ||
237 | depend: | |
12f89d24 | 238 | $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies |
ef416fc2 | 239 | |
240 | ||
6961465f MS |
241 | # |
242 | # Run oclint to check code coverage... | |
243 | # | |
244 | ||
245 | oclint: | |
246 | oclint -o=oclint.html -html $(LIBOBJS:.o=.c) -- $(ALL_CFLAGS) | |
247 | ||
248 | ||
ef416fc2 | 249 | # |
50fe7201 | 250 | # Install all targets... |
ef416fc2 | 251 | # |
252 | ||
50fe7201 MS |
253 | install: all install-data install-headers install-libs install-exec |
254 | ||
255 | ||
256 | # | |
257 | # Install data files... | |
258 | # | |
259 | ||
260 | install-data: | |
261 | ||
262 | ||
263 | # | |
264 | # Install programs... | |
265 | # | |
266 | ||
267 | install-exec: | |
268 | ||
269 | ||
270 | # | |
271 | # Install headers... | |
272 | # | |
273 | ||
274 | install-headers: | |
275 | echo Installing header files into $(INCLUDEDIR)/cups... | |
276 | $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups | |
277 | for file in $(HEADERS); do \ | |
278 | $(INSTALL_DATA) $$file $(INCLUDEDIR)/cups; \ | |
279 | done | |
71e16022 MS |
280 | if test "x$(privateinclude)" != x; then \ |
281 | echo Installing private header files into $(PRIVATEINCLUDE)...; \ | |
5180a04c | 282 | $(INSTALL_DIR) -m 755 $(PRIVATEINCLUDE); \ |
71e16022 | 283 | for file in $(HEADERSPRIV); do \ |
5180a04c | 284 | $(INSTALL_DATA) $$file $(PRIVATEINCLUDE)/$$file; \ |
71e16022 MS |
285 | done; \ |
286 | fi | |
50fe7201 MS |
287 | |
288 | ||
289 | # | |
290 | # Install libraries... | |
291 | # | |
292 | ||
e4b72d7e | 293 | install-libs: $(LIBTARGETS) $(INSTALLSTATIC) |
50fe7201 | 294 | echo Installing libraries in $(LIBDIR)... |
bd7854cb | 295 | $(INSTALL_DIR) -m 755 $(LIBDIR) |
ef416fc2 | 296 | $(INSTALL_LIB) $(LIBCUPS) $(LIBDIR) |
5a1d7a17 | 297 | if test $(LIBCUPS) = "libcups.so.2"; then \ |
ef416fc2 | 298 | $(RM) $(LIBDIR)/`basename $(LIBCUPS) .2`; \ |
299 | $(LN) $(LIBCUPS) $(LIBDIR)/`basename $(LIBCUPS) .2`; \ | |
300 | fi | |
301 | if test $(LIBCUPS) = "libcups.2.dylib"; then \ | |
ef416fc2 | 302 | $(RM) $(LIBDIR)/libcups.dylib; \ |
303 | $(LN) $(LIBCUPS) $(LIBDIR)/libcups.dylib; \ | |
304 | fi | |
bafe8fce | 305 | -if test "x$(LIBCUPSIMAGE)" != x; then \ |
58b64dbb MS |
306 | $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR); \ |
307 | fi | |
308 | -if test "x$(LIBCUPSIMAGE)" = "xlibcupsimage.so.2"; then \ | |
123979a9 MS |
309 | $(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \ |
310 | $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \ | |
311 | fi | |
58b64dbb | 312 | -if test "x$(LIBCUPSIMAGE)" = "xlibcupsimage.2.dylib"; then \ |
123979a9 MS |
313 | $(RM) $(LIBDIR)/libcupsimage.dylib; \ |
314 | $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \ | |
315 | fi | |
09a101d6 | 316 | if test "x$(SYMROOT)" != "x"; then \ |
317 | $(INSTALL_DIR) $(SYMROOT); \ | |
50fe7201 | 318 | cp $(LIBCUPS) $(SYMROOT); \ |
c1420c87 | 319 | dsymutil $(SYMROOT)/$(LIBCUPS); \ |
bafe8fce | 320 | if test "x$(LIBCUPSIMAGE)" != x; then \ |
58b64dbb MS |
321 | cp $(LIBCUPSIMAGE) $(SYMROOT); \ |
322 | dsymutil $(SYMROOT)/$(LIBCUPSIMAGE); \ | |
bafe8fce | 323 | fi; \ |
09a101d6 | 324 | fi |
923edb68 | 325 | |
326 | installstatic: | |
327 | $(INSTALL_DIR) -m 755 $(LIBDIR) | |
f8b3a85b MS |
328 | $(INSTALL_LIB) -m 755 $(LIBCUPSSTATIC) $(LIBDIR) |
329 | $(RANLIB) $(LIBDIR)/$(LIBCUPSSTATIC) | |
b94f7488 | 330 | $(CHMOD) 555 $(LIBDIR)/$(LIBCUPSSTATIC) |
123979a9 MS |
331 | $(INSTALL_LIB) -m 755 libcupsimage.a $(LIBDIR) |
332 | $(RANLIB) $(LIBDIR)/libcupsimage.a | |
333 | $(CHMOD) 555 $(LIBDIR)/libcupsimage.a | |
ef416fc2 | 334 | |
ef416fc2 | 335 | |
757d2cad | 336 | # |
337 | # Uninstall object and target files... | |
338 | # | |
339 | ||
12f89d24 | 340 | uninstall: |
757d2cad | 341 | $(RM) $(LIBDIR)/libcups.2.dylib |
58b64dbb | 342 | $(RM) $(LIBDIR)/libcups.a |
757d2cad | 343 | $(RM) $(LIBDIR)/libcups.dylib |
757d2cad | 344 | $(RM) $(LIBDIR)/libcups.so |
345 | $(RM) $(LIBDIR)/libcups.so.2 | |
123979a9 MS |
346 | $(RM) $(LIBDIR)/libcupsimage.2.dylib |
347 | $(RM) $(LIBDIR)/libcupsimage.a | |
348 | $(RM) $(LIBDIR)/libcupsimage.dylib | |
349 | $(RM) $(LIBDIR)/libcupsimage.so | |
350 | $(RM) $(LIBDIR)/libcupsimage.so.2 | |
757d2cad | 351 | -$(RMDIR) $(LIBDIR) |
352 | for file in $(HEADERS); do \ | |
353 | $(RM) $(INCLUDEDIR)/cups/$$file; \ | |
354 | done | |
355 | -$(RMDIR) $(INCLUDEDIR)/cups | |
58b64dbb MS |
356 | if test "x$(privateinclude)" != x; then \ |
357 | for file in $(HEADERSPRIV); do \ | |
358 | $(RM) $(PRIVATEINCLUDE)/cups/$$file; \ | |
359 | done | |
360 | $(RMDIR) $(PRIVATEINCLUDE)/cups; \ | |
361 | fi | |
757d2cad | 362 | |
363 | ||
ef416fc2 | 364 | # |
5a1d7a17 | 365 | # libcups.so.2 |
ef416fc2 | 366 | # |
367 | ||
58b64dbb | 368 | libcups.so.2: $(LIBOBJS) |
ef416fc2 | 369 | echo Linking $@... |
3e391a8e | 370 | $(DSO) $(ARCHFLAGS) $(ALL_DSOFLAGS) -o $@ $(LIBOBJS) $(LIBS) |
ef416fc2 | 371 | $(RM) `basename $@ .2` |
372 | $(LN) $@ `basename $@ .2` | |
373 | ||
374 | ||
375 | # | |
376 | # libcups.2.dylib | |
377 | # | |
378 | ||
58b64dbb | 379 | libcups.2.dylib: $(LIBOBJS) |
ef416fc2 | 380 | echo Linking $@... |
21609267 | 381 | $(DSO) $(ARCHFLAGS) $(ALL_DSOFLAGS) -o $@ \ |
fa73b229 | 382 | -install_name $(libdir)/$@ \ |
0c7f533a | 383 | -current_version 2.14.0 \ |
ef416fc2 | 384 | -compatibility_version 2.0.0 \ |
3e391a8e | 385 | $(LIBOBJS) $(LIBS) |
00dbe99f | 386 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
e3586875 | 387 | $(RM) libcups.dylib |
ef416fc2 | 388 | $(LN) $@ libcups.dylib |
389 | ||
390 | ||
ef416fc2 | 391 | # |
392 | # libcups.la | |
393 | # | |
394 | ||
58b64dbb | 395 | libcups.la: $(LIBOBJS) |
ef416fc2 | 396 | echo Linking $@... |
21609267 | 397 | $(LD_CC) $(ARCHFLAGS) $(ALL_DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) \ |
3e391a8e | 398 | -rpath $(LIBDIR) -version-info 2:14 $(LIBS) |
ef416fc2 | 399 | |
400 | ||
401 | # | |
402 | # libcups.a | |
403 | # | |
404 | ||
58b64dbb | 405 | libcups.a: $(LIBOBJS) |
ef416fc2 | 406 | echo Archiving $@... |
407 | $(RM) $@ | |
58b64dbb | 408 | $(AR) $(ARFLAGS) $@ $(LIBOBJS) |
ef416fc2 | 409 | $(RANLIB) $@ |
410 | ||
411 | ||
4128527f MS |
412 | # |
413 | # libcups2.def (Windows DLL exports file...) | |
414 | # | |
415 | ||
123979a9 | 416 | libcups2.def: $(LIBOBJS) $(IMAGEOBJS) Makefile |
4128527f MS |
417 | echo Generating $@... |
418 | echo "LIBRARY libcups2" >libcups2.def | |
0c7f533a | 419 | echo "VERSION 2.14" >>libcups2.def |
4128527f | 420 | echo "EXPORTS" >>libcups2.def |
123979a9 | 421 | (nm $(LIBOBJS) $(IMAGEOBJS) 2>/dev/null | grep "T _" | awk '{print $$3}'; \ |
65774817 MS |
422 | echo __cups_strcpy; echo __cups_strlcat; echo __cups_strlcpy; \ |
423 | echo __cups_snprintf; echo __cups_vsnprintf; echo __cups_gettimeofday) | \ | |
4128527f | 424 | grep -v -E \ |
ace3ea0a | 425 | -e 'cups_debug|Apple|BackChannel|Backend|FileCheck|Filter|GSSService|SetNegotiate|SideChannel|SNMP' \ |
4128527f MS |
426 | -e 'Block$$' | \ |
427 | sed -e '1,$$s/^_//' | sort >>libcups2.def | |
428 | ||
429 | ||
123979a9 MS |
430 | # |
431 | # libcupsimage.so.2 | |
432 | # | |
433 | ||
434 | libcupsimage.so.2: $(IMAGEOBJS) libcups.so.2 | |
435 | echo Linking $@... | |
3e391a8e | 436 | $(DSO) $(ARCHFLAGS) $(ALL_DSOFLAGS) -o $@ $(IMAGEOBJS) $(LINKCUPS) |
123979a9 MS |
437 | $(RM) `basename $@ .2` |
438 | $(LN) $@ `basename $@ .2` | |
439 | ||
440 | ||
441 | # | |
442 | # libcupsimage.2.dylib | |
443 | # | |
444 | ||
445 | libcupsimage.2.dylib: $(IMAGEOBJS) libcups.2.dylib | |
446 | echo Linking $@... | |
21609267 | 447 | $(DSO) $(ARCHFLAGS) $(ALL_DSOFLAGS) -o $@ \ |
123979a9 MS |
448 | -install_name $(libdir)/$@ \ |
449 | -current_version 2.3.0 \ | |
450 | -compatibility_version 2.0.0 \ | |
3e391a8e | 451 | $(IMAGEOBJS) $(LINKCUPS) |
00dbe99f | 452 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
123979a9 MS |
453 | $(RM) libcupsimage.dylib |
454 | $(LN) $@ libcupsimage.dylib | |
455 | ||
456 | ||
457 | # | |
458 | # libcupsimage.la | |
459 | # | |
460 | ||
461 | libcupsimage.la: $(IMAGEOBJS) libcups.la | |
462 | echo Linking $@... | |
3e391a8e | 463 | $(DSO) $(ARCHFLAGS) $(ALL_DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) \ |
f518bf7e | 464 | $(LINKCUPS) -rpath $(LIBDIR) -version-info 2:3 |
123979a9 MS |
465 | |
466 | ||
467 | # | |
468 | # libcupsimage.a | |
469 | # | |
470 | ||
471 | libcupsimage.a: $(IMAGEOBJS) | |
472 | echo Archiving $@... | |
473 | $(RM) $@ | |
474 | $(AR) $(ARFLAGS) $@ $(IMAGEOBJS) | |
475 | $(RANLIB) $@ | |
476 | ||
477 | ||
478 | # | |
6f1c647d | 479 | # rasterbench (dependency on static CUPS library is intentional) |
123979a9 MS |
480 | # |
481 | ||
dd204f7a | 482 | rasterbench: rasterbench.o $(LIBCUPSSTATIC) |
123979a9 | 483 | echo Linking $@... |
3e391a8e | 484 | $(LD_CC) $(ALL_LDFLAGS) -o $@ rasterbench.o $(LINKCUPSSTATIC) |
00dbe99f | 485 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
123979a9 MS |
486 | |
487 | ||
757d2cad | 488 | # |
489 | # testadmin (dependency on static CUPS library is intentional) | |
490 | # | |
491 | ||
f8b3a85b | 492 | testadmin: testadmin.o $(LIBCUPSSTATIC) |
757d2cad | 493 | echo Linking $@... |
3e391a8e | 494 | $(LD_CC) $(ALL_LDFLAGS) -o $@ testadmin.o $(LINKCUPSSTATIC) |
00dbe99f | 495 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
757d2cad | 496 | |
497 | ||
ef416fc2 | 498 | # |
499 | # testarray (dependency on static CUPS library is intentional) | |
500 | # | |
501 | ||
f8b3a85b | 502 | testarray: testarray.o $(LIBCUPSSTATIC) |
ef416fc2 | 503 | echo Linking $@... |
3e391a8e | 504 | $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o $@ testarray.o $(LINKCUPSSTATIC) |
00dbe99f | 505 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
c9fc04c6 MS |
506 | echo Running array API tests... |
507 | ./testarray | |
ef416fc2 | 508 | |
509 | ||
b2b9911d MS |
510 | # |
511 | # testcache (dependency on static CUPS library is intentional) | |
512 | # | |
513 | ||
514 | testcache: testcache.o $(LIBCUPSSTATIC) | |
515 | echo Linking $@... | |
3e391a8e | 516 | $(LD_CC) $(ALL_LDFLAGS) -o $@ testcache.o $(LINKCUPSSTATIC) |
00dbe99f | 517 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
b2b9911d MS |
518 | |
519 | ||
123979a9 MS |
520 | # |
521 | # testclient (dependency on static libraries is intentional) | |
522 | # | |
523 | ||
dcd7f90e | 524 | testclient: testclient.o $(LIBCUPSSTATIC) |
123979a9 | 525 | echo Linking $@... |
3e391a8e | 526 | $(LD_CC) $(ALL_LDFLAGS) -o $@ testclient.o $(LINKCUPSSTATIC) |
00dbe99f | 527 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
123979a9 MS |
528 | |
529 | ||
06d4e77b MS |
530 | # |
531 | # testconflicts (dependency on static CUPS library is intentional) | |
532 | # | |
533 | ||
f8b3a85b | 534 | testconflicts: testconflicts.o $(LIBCUPSSTATIC) |
06d4e77b | 535 | echo Linking $@... |
3e391a8e | 536 | $(LD_CC) $(ALL_LDFLAGS) -o $@ testconflicts.o $(LINKCUPSSTATIC) |
00dbe99f | 537 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
06d4e77b MS |
538 | |
539 | ||
fe33927d MS |
540 | # |
541 | # testcreds (dependency on static CUPS library is intentional) | |
542 | # | |
543 | ||
544 | testcreds: testcreds.o $(LIBCUPSSTATIC) | |
545 | echo Linking $@... | |
3e391a8e | 546 | $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o $@ testcreds.o $(LINKCUPSSTATIC) |
00dbe99f | 547 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
fe33927d MS |
548 | |
549 | ||
09a101d6 | 550 | # |
551 | # testcups (dependency on static CUPS library is intentional) | |
552 | # | |
553 | ||
f8b3a85b | 554 | testcups: testcups.o $(LIBCUPSSTATIC) |
09a101d6 | 555 | echo Linking $@... |
3e391a8e | 556 | $(LD_CC) $(ALL_LDFLAGS) -o $@ testcups.o $(LINKCUPSSTATIC) |
00dbe99f | 557 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
09a101d6 | 558 | |
559 | ||
104fd4ae MS |
560 | # |
561 | # testdest (dependency on static CUPS library is intentional) | |
562 | # | |
563 | ||
564 | testdest: testdest.o $(LIBCUPSSTATIC) | |
565 | echo Linking $@... | |
3e391a8e | 566 | $(LD_CC) $(ALL_LDFLAGS) -o $@ testdest.o $(LINKCUPSSTATIC) |
00dbe99f | 567 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
104fd4ae MS |
568 | |
569 | ||
ef416fc2 | 570 | # |
571 | # testfile (dependency on static CUPS library is intentional) | |
572 | # | |
573 | ||
f8b3a85b | 574 | testfile: testfile.o $(LIBCUPSSTATIC) |
ef416fc2 | 575 | echo Linking $@... |
3e391a8e | 576 | $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o $@ testfile.o $(LINKCUPSSTATIC) |
00dbe99f | 577 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
c9fc04c6 MS |
578 | echo Running file API tests... |
579 | ./testfile | |
ef416fc2 | 580 | |
581 | ||
86390cbf MS |
582 | # |
583 | # testgetdests (dependency on static CUPS library is intentional) | |
584 | # | |
585 | ||
586 | testgetdests: testgetdests.o $(LIBCUPSSTATIC) | |
587 | echo Linking $@... | |
3e391a8e | 588 | $(LD_CC) $(ALL_LDFLAGS) -o $@ testgetdests.o $(LINKCUPSSTATIC) |
00dbe99f | 589 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
86390cbf MS |
590 | |
591 | ||
ef416fc2 | 592 | # |
593 | # testhttp (dependency on static CUPS library is intentional) | |
594 | # | |
595 | ||
f8b3a85b | 596 | testhttp: testhttp.o $(LIBCUPSSTATIC) |
ef416fc2 | 597 | echo Linking $@... |
3e391a8e | 598 | $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o $@ testhttp.o $(LINKCUPSSTATIC) |
00dbe99f | 599 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
c9fc04c6 MS |
600 | echo Running HTTP API tests... |
601 | ./testhttp | |
ef416fc2 | 602 | |
603 | ||
604 | # | |
605 | # testipp (dependency on static CUPS library is intentional) | |
606 | # | |
607 | ||
f8b3a85b | 608 | testipp: testipp.o $(LIBCUPSSTATIC) |
ef416fc2 | 609 | echo Linking $@... |
3e391a8e | 610 | $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o $@ testipp.o $(LINKCUPSSTATIC) |
00dbe99f | 611 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
c9fc04c6 MS |
612 | echo Running IPP API tests... |
613 | ./testipp | |
ef416fc2 | 614 | |
615 | ||
616 | # | |
617 | # testi18n (dependency on static CUPS library is intentional) | |
618 | # | |
619 | ||
f8b3a85b | 620 | testi18n: testi18n.o $(LIBCUPSSTATIC) |
ef416fc2 | 621 | echo Linking $@... |
3e391a8e | 622 | $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o $@ testi18n.o $(LINKCUPSSTATIC) |
00dbe99f | 623 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
c9fc04c6 MS |
624 | echo Running internationalization API tests... |
625 | ./testi18n | |
ef416fc2 | 626 | |
627 | ||
628 | # | |
629 | # testlang (dependency on static CUPS library is intentional) | |
630 | # | |
631 | ||
f8b3a85b | 632 | testlang: testlang.o $(LIBCUPSSTATIC) |
ef416fc2 | 633 | echo Linking $@... |
3e391a8e | 634 | $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o $@ testlang.o $(LINKCUPSSTATIC) |
00dbe99f | 635 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
9964a31a MS |
636 | echo Creating locale directory structure... |
637 | $(RM) -r locale | |
9964a31a MS |
638 | for po in ../locale/cups_*.po; do \ |
639 | lang=`basename $$po .po | sed -e '1,$$s/^cups_//'`; \ | |
640 | $(MKDIR) locale/$$lang; \ | |
5b6caf71 | 641 | $(LN) ../../$$po locale/$$lang; \ |
9964a31a | 642 | done |
c9fc04c6 | 643 | echo Running language API tests... |
9964a31a | 644 | LOCALEDIR=locale ./testlang |
ef416fc2 | 645 | |
646 | ||
20fbc903 MS |
647 | # |
648 | # testoptions (dependency on static CUPS library is intentional) | |
649 | # | |
650 | ||
f8b3a85b | 651 | testoptions: testoptions.o $(LIBCUPSSTATIC) |
20fbc903 | 652 | echo Linking $@... |
3e391a8e | 653 | $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o $@ testoptions.o $(LINKCUPSSTATIC) |
00dbe99f | 654 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
20fbc903 MS |
655 | echo Running option API tests... |
656 | ./testoptions | |
657 | ||
658 | ||
fa73b229 | 659 | # |
660 | # testppd (dependency on static CUPS library is intentional) | |
661 | # | |
662 | ||
f8b3a85b | 663 | testppd: testppd.o $(LIBCUPSSTATIC) test.ppd test2.ppd |
fa73b229 | 664 | echo Linking $@... |
3e391a8e | 665 | $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o $@ testppd.o $(LINKCUPSSTATIC) |
00dbe99f | 666 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
c9fc04c6 MS |
667 | echo Running PPD API tests... |
668 | ./testppd | |
fa73b229 | 669 | |
670 | ||
54afec33 MS |
671 | # |
672 | # testpwg (dependency on static CUPS library is intentional) | |
673 | # | |
674 | ||
675 | testpwg: testpwg.o $(LIBCUPSSTATIC) test.ppd | |
676 | echo Linking $@... | |
3e391a8e | 677 | $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o $@ testpwg.o $(LINKCUPSSTATIC) |
00dbe99f | 678 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
54afec33 MS |
679 | echo Running PWG API tests... |
680 | ./testpwg test.ppd | |
681 | ||
682 | ||
123979a9 | 683 | # |
6f1c647d | 684 | # testraster (dependency on static CUPS library is intentional) |
123979a9 MS |
685 | # |
686 | ||
dd204f7a | 687 | testraster: testraster.o $(LIBCUPSSTATIC) |
123979a9 | 688 | echo Linking $@... |
3e391a8e | 689 | $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o $@ testraster.o $(LINKCUPSSTATIC) |
00dbe99f | 690 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
123979a9 MS |
691 | echo Running raster API tests... |
692 | ./testraster | |
693 | ||
694 | ||
91c84a35 MS |
695 | # |
696 | # testsnmp (dependency on static CUPS library is intentional) | |
697 | # | |
698 | ||
f8b3a85b | 699 | testsnmp: testsnmp.o $(LIBCUPSSTATIC) |
91c84a35 | 700 | echo Linking $@... |
3e391a8e | 701 | $(LD_CC) $(ALL_LDFLAGS) -o $@ testsnmp.o $(LINKCUPSSTATIC) |
00dbe99f | 702 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
91c84a35 MS |
703 | |
704 | ||
cfaaa07a MS |
705 | # |
706 | # testthreads (dependency on static CUPS library is intentional) | |
707 | # | |
708 | ||
709 | testthreads: testthreads.o $(LIBCUPSSTATIC) | |
710 | echo Linking $@... | |
711 | $(LD_CC) $(ALL_LDFLAGS) -o $@ testthreads.o $(LINKCUPSSTATIC) | |
712 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ | |
713 | ||
714 | ||
79a37326 MS |
715 | # |
716 | # tlscheck (dependency on static CUPS library is intentional) | |
717 | # | |
718 | ||
719 | tlscheck: tlscheck.o $(LIBCUPSSTATIC) | |
720 | echo Linking $@... | |
3e391a8e | 721 | $(LD_CC) $(ARCHFLAGS) $(ALL_LDFLAGS) -o $@ tlscheck.o $(LINKCUPSSTATIC) |
00dbe99f | 722 | $(CODE_SIGN) -s "$(CODE_SIGN_IDENTITY)" $@ |
79a37326 MS |
723 | |
724 | ||
ef416fc2 | 725 | # |
726 | # Automatic API help files... | |
727 | # | |
728 | ||
729 | apihelp: | |
730 | echo Generating CUPS API help files... | |
53af7f21 | 731 | $(RM) cupspm.xml |
f294fe22 | 732 | codedoc --section "Programming" --body cupspm.md \ |
798d6e29 | 733 | cupspm.xml \ |
98d88c8d MS |
734 | auth.c cups.h dest*.c encode.c http.h http*.c ipp.h ipp*.c \ |
735 | options.c tls-darwin.c usersys.c util.c \ | |
e1c797ef | 736 | --coverimage cupspm.png \ |
798d6e29 | 737 | --epub ../doc/help/cupspm.epub |
f294fe22 | 738 | codedoc --section "Programming" --body cupspm.md \ |
798d6e29 MS |
739 | cupspm.xml > ../doc/help/cupspm.html |
740 | $(RM) cupspm.xml | |
f294fe22 | 741 | codedoc --section "Programming" --title "Administration APIs" \ |
dffa3c74 | 742 | --css ../doc/cups-printable.css \ |
73721e3e | 743 | --header api-admin.header --body api-admin.shtml \ |
dffa3c74 | 744 | adminutil.c adminutil.h getdevices.c >../doc/help/api-admin.html |
f294fe22 | 745 | codedoc --section "Programming" --title "PPD API (DEPRECATED)" \ |
5a738aea | 746 | --css ../doc/cups-printable.css \ |
73721e3e MS |
747 | --header api-ppd.header --body api-ppd.shtml \ |
748 | ppd.h ppd-*.c raster-interstub.c >../doc/help/api-ppd.html | |
f294fe22 | 749 | codedoc --section "Programming" --title "Raster API" \ |
123979a9 | 750 | --css ../doc/cups-printable.css \ |
73721e3e MS |
751 | --header api-raster.header --body api-raster.shtml \ |
752 | ../cups/raster.h raster-stubs.c \ | |
123979a9 | 753 | >../doc/help/api-raster.html |
f294fe22 | 754 | codedoc --section "Programming" \ |
5a738aea MS |
755 | --title "Filter and Backend Programming" \ |
756 | --css ../doc/cups-printable.css \ | |
73721e3e | 757 | --header api-filter.header --body api-filter.shtml \ |
ac884b6a | 758 | backchannel.c backend.h backend.c sidechannel.c sidechannel.h \ |
7a14d768 | 759 | >../doc/help/api-filter.html |
5a738aea | 760 | |
ef416fc2 | 761 | |
84315f46 MS |
762 | # |
763 | # Lines of code computation... | |
764 | # | |
765 | ||
766 | sloc: | |
84315f46 MS |
767 | echo "libcups: \c" |
768 | sloccount $(LIBOBJS:.o=.c) 2>/dev/null | grep "Total Physical" | awk '{print $$9}' | |
123979a9 MS |
769 | echo "libcupsimage: \c" |
770 | sloccount $(IMAGEOBJS:.o=.c) 2>/dev/null | grep "Total Physical" | awk '{print $$9}' | |
84315f46 MS |
771 | |
772 | ||
ef416fc2 | 773 | # |
774 | # Dependencies... | |
775 | # | |
776 | ||
777 | include Dependencies | |
25731360 | 778 | tls.o: tls-darwin.c tls-gnutls.c tls-sspi.c |