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