]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
b19ccc9e | 2 | # "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $" |
ef416fc2 | 3 | # |
f8b3a85b | 4 | # API library Makefile for CUPS. |
ef416fc2 | 5 | # |
cb7f98ee | 6 | # Copyright 2007-2013 by Apple Inc. |
ef416fc2 | 7 | # Copyright 1997-2006 by Easy Software Products, all rights reserved. |
8 | # | |
9 | # These coded instructions, statements, and computer programs are the | |
bc44d920 | 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 | # |
15 | # This file is subject to the Apple OS-Developed Software exception. | |
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 \ |
35 | attr.o \ | |
36 | auth.o \ | |
37 | backchannel.o \ | |
a4d04587 | 38 | backend.o \ |
66ab9486 | 39 | conflicts.o \ |
fa73b229 | 40 | custom.o \ |
ae71f5de | 41 | debug.o \ |
ef416fc2 | 42 | dest.o \ |
dcb445bc MS |
43 | dest-job.o \ |
44 | dest-localization.o \ | |
45 | dest-options.o \ | |
ef416fc2 | 46 | dir.o \ |
47 | emit.o \ | |
48 | encode.o \ | |
49 | file.o \ | |
ae71f5de | 50 | getdevices.o \ |
89d46774 | 51 | getifaddrs.o \ |
ef416fc2 | 52 | getputfile.o \ |
53 | globals.o \ | |
54 | http.o \ | |
55 | http-addr.o \ | |
56 | http-addrlist.o \ | |
57 | http-support.o \ | |
58 | ipp.o \ | |
59 | ipp-support.o \ | |
60 | langprintf.o \ | |
61 | language.o \ | |
fa73b229 | 62 | localize.o \ |
ef416fc2 | 63 | mark.o \ |
64 | md5.o \ | |
65 | md5passwd.o \ | |
fa73b229 | 66 | notify.o \ |
ef416fc2 | 67 | options.o \ |
68 | page.o \ | |
69 | ppd.o \ | |
f14324a7 | 70 | ppd-cache.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 \ |
ef416fc2 | 79 | transcode.o \ |
80 | usersys.o \ | |
81 | util.o | |
dcb445bc | 82 | TESTOBJS = \ |
757d2cad | 83 | testadmin.o \ |
ef416fc2 | 84 | testarray.o \ |
06d4e77b | 85 | testconflicts.o \ |
09a101d6 | 86 | testcups.o \ |
ef416fc2 | 87 | testfile.o \ |
88 | testhttp.o \ | |
89 | testi18n.o \ | |
90 | testipp.o \ | |
20fbc903 | 91 | testoptions.o \ |
ef416fc2 | 92 | testlang.o \ |
fa73b229 | 93 | testppd.o \ |
54afec33 | 94 | testpwg.o \ |
cc754834 | 95 | testsnmp.o |
dcb445bc MS |
96 | OBJS = \ |
97 | $(LIBOBJS) \ | |
dcb445bc MS |
98 | $(TESTOBJS) |
99 | ||
ef416fc2 | 100 | |
101 | # | |
102 | # Header files to install... | |
103 | # | |
104 | ||
105 | HEADERS = \ | |
757d2cad | 106 | adminutil.h \ |
ef416fc2 | 107 | array.h \ |
d09495fa | 108 | backend.h \ |
ef416fc2 | 109 | cups.h \ |
110 | dir.h \ | |
111 | file.h \ | |
112 | http.h \ | |
ef416fc2 | 113 | ipp.h \ |
114 | language.h \ | |
ef416fc2 | 115 | ppd.h \ |
ac884b6a | 116 | raster.h \ |
f7deaa1a | 117 | sidechannel.h \ |
a41f09e2 MS |
118 | transcode.h \ |
119 | versioning.h | |
ef416fc2 | 120 | |
71e16022 | 121 | HEADERSPRIV = \ |
eac3a0a0 | 122 | array-private.h \ |
71e16022 MS |
123 | cups-private.h \ |
124 | debug-private.h \ | |
125 | file-private.h \ | |
126 | http-private.h \ | |
127 | ipp-private.h \ | |
128 | language-private.h \ | |
129 | md5-private.h \ | |
130 | ppd-private.h \ | |
131 | pwg-private.h \ | |
a4845881 | 132 | raster-private.h \ |
71e16022 | 133 | snmp-private.h \ |
6d2f911b MS |
134 | string-private.h \ |
135 | thread-private.h | |
136 | ||
ef416fc2 | 137 | |
138 | # | |
139 | # Targets in this directory... | |
140 | # | |
141 | ||
c9fc04c6 | 142 | LIBTARGETS = \ |
f8b3a85b | 143 | $(LIBCUPSSTATIC) \ |
12f89d24 | 144 | $(LIBCUPS) |
5f64df29 MS |
145 | |
146 | UNITTARGETS = \ | |
147 | testadmin \ | |
ef416fc2 | 148 | testarray \ |
5f64df29 MS |
149 | testconflicts \ |
150 | testcups \ | |
ef416fc2 | 151 | testfile \ |
152 | testhttp \ | |
153 | testi18n \ | |
154 | testipp \ | |
fa73b229 | 155 | testlang \ |
20fbc903 | 156 | testoptions \ |
5f64df29 | 157 | testppd \ |
54afec33 | 158 | testpwg \ |
5f64df29 | 159 | testsnmp |
c9fc04c6 MS |
160 | |
161 | TARGETS = \ | |
5f64df29 | 162 | $(LIBTARGETS) |
ef416fc2 | 163 | |
164 | ||
165 | # | |
166 | # Make all targets... | |
167 | # | |
168 | ||
f8b3a85b | 169 | all: $(TARGETS) |
ef416fc2 | 170 | |
171 | ||
c9fc04c6 MS |
172 | # |
173 | # Make library targets... | |
174 | # | |
175 | ||
176 | libs: $(LIBTARGETS) | |
177 | ||
178 | ||
5f64df29 MS |
179 | # |
180 | # Make unit tests... | |
181 | # | |
182 | ||
183 | unittests: $(UNITTARGETS) | |
184 | ||
185 | ||
ef416fc2 | 186 | # |
187 | # Remove object and target files... | |
188 | # | |
189 | ||
190 | clean: | |
5f64df29 | 191 | $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS) |
f301802f | 192 | $(RM) libcups.so libcups.sl libcups.dylib |
ef416fc2 | 193 | |
194 | ||
195 | # | |
196 | # Update dependencies (without system header dependencies...) | |
197 | # | |
198 | ||
199 | depend: | |
12f89d24 | 200 | $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies |
ef416fc2 | 201 | |
202 | ||
203 | # | |
50fe7201 | 204 | # Install all targets... |
ef416fc2 | 205 | # |
206 | ||
50fe7201 MS |
207 | install: all install-data install-headers install-libs install-exec |
208 | ||
209 | ||
210 | # | |
211 | # Install data files... | |
212 | # | |
213 | ||
214 | install-data: | |
215 | ||
216 | ||
217 | # | |
218 | # Install programs... | |
219 | # | |
220 | ||
221 | install-exec: | |
222 | ||
223 | ||
224 | # | |
225 | # Install headers... | |
226 | # | |
227 | ||
228 | install-headers: | |
229 | echo Installing header files into $(INCLUDEDIR)/cups... | |
230 | $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups | |
231 | for file in $(HEADERS); do \ | |
232 | $(INSTALL_DATA) $$file $(INCLUDEDIR)/cups; \ | |
233 | done | |
71e16022 MS |
234 | if test "x$(privateinclude)" != x; then \ |
235 | echo Installing private header files into $(PRIVATEINCLUDE)...; \ | |
5180a04c | 236 | $(INSTALL_DIR) -m 755 $(PRIVATEINCLUDE); \ |
71e16022 | 237 | for file in $(HEADERSPRIV); do \ |
5180a04c | 238 | $(INSTALL_DATA) $$file $(PRIVATEINCLUDE)/$$file; \ |
71e16022 MS |
239 | done; \ |
240 | fi | |
50fe7201 MS |
241 | |
242 | ||
243 | # | |
244 | # Install libraries... | |
245 | # | |
246 | ||
12f89d24 | 247 | install-libs: $(INSTALLSTATIC) |
50fe7201 | 248 | echo Installing libraries in $(LIBDIR)... |
bd7854cb | 249 | $(INSTALL_DIR) -m 755 $(LIBDIR) |
ef416fc2 | 250 | $(INSTALL_LIB) $(LIBCUPS) $(LIBDIR) |
251 | if test $(LIBCUPS) = "libcups.so.2" -o $(LIBCUPS) = "libcups.sl.2"; then \ | |
252 | $(RM) $(LIBDIR)/`basename $(LIBCUPS) .2`; \ | |
253 | $(LN) $(LIBCUPS) $(LIBDIR)/`basename $(LIBCUPS) .2`; \ | |
254 | fi | |
255 | if test $(LIBCUPS) = "libcups.2.dylib"; then \ | |
ef416fc2 | 256 | $(RM) $(LIBDIR)/libcups.dylib; \ |
257 | $(LN) $(LIBCUPS) $(LIBDIR)/libcups.dylib; \ | |
258 | fi | |
09a101d6 | 259 | if test "x$(SYMROOT)" != "x"; then \ |
260 | $(INSTALL_DIR) $(SYMROOT); \ | |
50fe7201 | 261 | cp $(LIBCUPS) $(SYMROOT); \ |
c1420c87 | 262 | dsymutil $(SYMROOT)/$(LIBCUPS); \ |
09a101d6 | 263 | fi |
923edb68 | 264 | |
265 | installstatic: | |
266 | $(INSTALL_DIR) -m 755 $(LIBDIR) | |
f8b3a85b MS |
267 | $(INSTALL_LIB) -m 755 $(LIBCUPSSTATIC) $(LIBDIR) |
268 | $(RANLIB) $(LIBDIR)/$(LIBCUPSSTATIC) | |
269 | $(CHMOD) 555 $(LIBDIR)/$(LIBCUPSSTATIC) | |
ef416fc2 | 270 | |
ef416fc2 | 271 | |
757d2cad | 272 | # |
273 | # Uninstall object and target files... | |
274 | # | |
275 | ||
12f89d24 | 276 | uninstall: |
757d2cad | 277 | $(RM) $(LIBDIR)/libcups.2.dylib |
6d2f911b | 278 | $(RM) $(LIBDIR)/$(LIBCUPSSTATIC) |
757d2cad | 279 | $(RM) $(LIBDIR)/libcups.dylib |
280 | $(RM) $(LIBDIR)/libcups_s.a | |
281 | $(RM) $(LIBDIR)/libcups.sl | |
282 | $(RM) $(LIBDIR)/libcups.sl.2 | |
283 | $(RM) $(LIBDIR)/libcups.so | |
284 | $(RM) $(LIBDIR)/libcups.so.2 | |
285 | -$(RMDIR) $(LIBDIR) | |
286 | for file in $(HEADERS); do \ | |
287 | $(RM) $(INCLUDEDIR)/cups/$$file; \ | |
288 | done | |
289 | -$(RMDIR) $(INCLUDEDIR)/cups | |
290 | ||
291 | ||
ef416fc2 | 292 | # |
293 | # libcups.so.2, libcups.sl.2 | |
294 | # | |
295 | ||
296 | libcups.so.2 libcups.sl.2: $(LIBOBJS) | |
297 | echo Linking $@... | |
c168a833 MS |
298 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS) $(LIBGSSAPI) \ |
299 | $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) | |
ef416fc2 | 300 | $(RM) `basename $@ .2` |
301 | $(LN) $@ `basename $@ .2` | |
302 | ||
303 | ||
304 | # | |
305 | # libcups.2.dylib | |
306 | # | |
307 | ||
f8b3a85b MS |
308 | libcups.2.dylib: $(LIBOBJS) $(LIBCUPSORDER) |
309 | echo Creating export list for $@... | |
310 | nm $(LIBOBJS) 2>/dev/null | grep "T _" | awk '{print $$3}' | \ | |
cc754834 | 311 | grep -v -e '^(_cupsConnect|_cupsCharset|_cupsEncodingName|_cupsSetDefaults|_cupsSetHTTPError|_cupsUserDefault|_httpWait)$$' | \ |
f8b3a85b | 312 | sort >t.exp |
ef416fc2 | 313 | echo Linking $@... |
e1d6a774 | 314 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \ |
fa73b229 | 315 | -install_name $(libdir)/$@ \ |
37e7e6e0 | 316 | -current_version 2.10.0 \ |
ef416fc2 | 317 | -compatibility_version 2.0.0 \ |
f8b3a85b | 318 | -exported_symbols_list t.exp \ |
c168a833 MS |
319 | $(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ |
320 | $(COMMONLIBS) $(LIBZ) | |
f8b3a85b | 321 | $(RM) libcups.dylib t.exp |
ef416fc2 | 322 | $(LN) $@ libcups.dylib |
323 | ||
324 | ||
325 | # | |
326 | # libcups_s.a | |
327 | # | |
328 | ||
a74454a7 | 329 | libcups_s.a: $(LIBOBJS) libcups_s.exp |
ef416fc2 | 330 | echo Creating $@... |
c168a833 MS |
331 | $(DSO) $(DSOFLAGS) -Wl,-bexport:libcups_s.exp -o libcups_s.o \ |
332 | $(LIBOBJS) $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) \ | |
83e08001 | 333 | $(COMMONLIBS) $(LIBZ) |
ef416fc2 | 334 | $(RM) $@ |
335 | $(AR) $(ARFLAGS) $@ libcups_s.o | |
336 | ||
337 | ||
338 | # | |
339 | # libcups.la | |
340 | # | |
341 | ||
342 | libcups.la: $(LIBOBJS) | |
343 | echo Linking $@... | |
c168a833 | 344 | $(CC) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(LIBOBJS:.o=.lo) \ |
37e7e6e0 | 345 | -rpath $(LIBDIR) -version-info 2:10 $(LIBGSSAPI) $(SSLLIBS) \ |
c168a833 | 346 | $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
ef416fc2 | 347 | |
348 | ||
349 | # | |
350 | # libcups.a | |
351 | # | |
352 | ||
353 | libcups.a: $(LIBOBJS) | |
354 | echo Archiving $@... | |
355 | $(RM) $@ | |
356 | $(AR) $(ARFLAGS) $@ $(LIBOBJS) | |
357 | $(RANLIB) $@ | |
358 | ||
359 | ||
757d2cad | 360 | # |
361 | # testadmin (dependency on static CUPS library is intentional) | |
362 | # | |
363 | ||
f8b3a85b | 364 | testadmin: testadmin.o $(LIBCUPSSTATIC) |
757d2cad | 365 | echo Linking $@... |
f8b3a85b | 366 | $(CC) $(LDFLAGS) -o $@ testadmin.o $(LIBCUPSSTATIC) \ |
c168a833 | 367 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
757d2cad | 368 | |
369 | ||
ef416fc2 | 370 | # |
371 | # testarray (dependency on static CUPS library is intentional) | |
372 | # | |
373 | ||
f8b3a85b | 374 | testarray: testarray.o $(LIBCUPSSTATIC) |
ef416fc2 | 375 | echo Linking $@... |
f8b3a85b | 376 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testarray.o $(LIBCUPSSTATIC) \ |
c168a833 | 377 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
378 | echo Running array API tests... |
379 | ./testarray | |
ef416fc2 | 380 | |
381 | ||
06d4e77b MS |
382 | # |
383 | # testconflicts (dependency on static CUPS library is intentional) | |
384 | # | |
385 | ||
f8b3a85b | 386 | testconflicts: testconflicts.o $(LIBCUPSSTATIC) |
06d4e77b | 387 | echo Linking $@... |
f8b3a85b | 388 | $(CC) $(LDFLAGS) -o $@ testconflicts.o $(LIBCUPSSTATIC) \ |
c168a833 | 389 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
06d4e77b MS |
390 | |
391 | ||
09a101d6 | 392 | # |
393 | # testcups (dependency on static CUPS library is intentional) | |
394 | # | |
395 | ||
f8b3a85b | 396 | testcups: testcups.o $(LIBCUPSSTATIC) |
09a101d6 | 397 | echo Linking $@... |
f8b3a85b | 398 | $(CC) $(LDFLAGS) -o $@ testcups.o $(LIBCUPSSTATIC) \ |
c168a833 | 399 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
09a101d6 | 400 | |
401 | ||
ef416fc2 | 402 | # |
403 | # testfile (dependency on static CUPS library is intentional) | |
404 | # | |
405 | ||
f8b3a85b | 406 | testfile: testfile.o $(LIBCUPSSTATIC) |
ef416fc2 | 407 | echo Linking $@... |
f8b3a85b | 408 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testfile.o $(LIBCUPSSTATIC) \ |
c168a833 | 409 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
410 | echo Running file API tests... |
411 | ./testfile | |
ef416fc2 | 412 | |
413 | ||
414 | # | |
415 | # testhttp (dependency on static CUPS library is intentional) | |
416 | # | |
417 | ||
f8b3a85b | 418 | testhttp: testhttp.o $(LIBCUPSSTATIC) |
ef416fc2 | 419 | echo Linking $@... |
f8b3a85b | 420 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testhttp.o $(LIBCUPSSTATIC) \ |
c168a833 | 421 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
422 | echo Running HTTP API tests... |
423 | ./testhttp | |
ef416fc2 | 424 | |
425 | ||
426 | # | |
427 | # testipp (dependency on static CUPS library is intentional) | |
428 | # | |
429 | ||
f8b3a85b | 430 | testipp: testipp.o $(LIBCUPSSTATIC) |
ef416fc2 | 431 | echo Linking $@... |
f8b3a85b | 432 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testipp.o $(LIBCUPSSTATIC) \ |
c168a833 | 433 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
434 | echo Running IPP API tests... |
435 | ./testipp | |
ef416fc2 | 436 | |
437 | ||
438 | # | |
439 | # testi18n (dependency on static CUPS library is intentional) | |
440 | # | |
441 | ||
f8b3a85b | 442 | testi18n: testi18n.o $(LIBCUPSSTATIC) |
ef416fc2 | 443 | echo Linking $@... |
f8b3a85b | 444 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testi18n.o $(LIBCUPSSTATIC) \ |
c168a833 | 445 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
446 | echo Running internationalization API tests... |
447 | ./testi18n | |
ef416fc2 | 448 | |
449 | ||
450 | # | |
451 | # testlang (dependency on static CUPS library is intentional) | |
452 | # | |
453 | ||
f8b3a85b | 454 | testlang: testlang.o $(LIBCUPSSTATIC) |
ef416fc2 | 455 | echo Linking $@... |
f8b3a85b | 456 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testlang.o $(LIBCUPSSTATIC) \ |
c168a833 | 457 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
458 | echo Running language API tests... |
459 | ./testlang | |
ef416fc2 | 460 | |
461 | ||
20fbc903 MS |
462 | # |
463 | # testoptions (dependency on static CUPS library is intentional) | |
464 | # | |
465 | ||
f8b3a85b | 466 | testoptions: testoptions.o $(LIBCUPSSTATIC) |
20fbc903 | 467 | echo Linking $@... |
f8b3a85b | 468 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testoptions.o $(LIBCUPSSTATIC) \ |
c168a833 | 469 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
20fbc903 MS |
470 | echo Running option API tests... |
471 | ./testoptions | |
472 | ||
473 | ||
fa73b229 | 474 | # |
475 | # testppd (dependency on static CUPS library is intentional) | |
476 | # | |
477 | ||
f8b3a85b | 478 | testppd: testppd.o $(LIBCUPSSTATIC) test.ppd test2.ppd |
fa73b229 | 479 | echo Linking $@... |
f8b3a85b | 480 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testppd.o $(LIBCUPSSTATIC) \ |
c168a833 | 481 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
c9fc04c6 MS |
482 | echo Running PPD API tests... |
483 | ./testppd | |
fa73b229 | 484 | |
485 | ||
54afec33 MS |
486 | # |
487 | # testpwg (dependency on static CUPS library is intentional) | |
488 | # | |
489 | ||
490 | testpwg: testpwg.o $(LIBCUPSSTATIC) test.ppd | |
491 | echo Linking $@... | |
492 | $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testpwg.o $(LIBCUPSSTATIC) \ | |
493 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) | |
494 | echo Running PWG API tests... | |
495 | ./testpwg test.ppd | |
496 | ||
497 | ||
91c84a35 MS |
498 | # |
499 | # testsnmp (dependency on static CUPS library is intentional) | |
500 | # | |
501 | ||
f8b3a85b | 502 | testsnmp: testsnmp.o $(LIBCUPSSTATIC) |
91c84a35 | 503 | echo Linking $@... |
f8b3a85b | 504 | $(CC) $(LDFLAGS) -o $@ testsnmp.o $(LIBCUPSSTATIC) \ |
c168a833 | 505 | $(LIBGSSAPI) $(SSLLIBS) $(DNSSDLIBS) $(COMMONLIBS) $(LIBZ) |
91c84a35 MS |
506 | |
507 | ||
ef416fc2 | 508 | # |
509 | # Automatic API help files... | |
510 | # | |
511 | ||
512 | apihelp: | |
513 | echo Generating CUPS API help files... | |
5a738aea MS |
514 | mxmldoc --section "Programming" \ |
515 | --title "Introduction to CUPS Programming" \ | |
516 | --css ../doc/cups-printable.css \ | |
517 | --header api-overview.header --intro api-overview.shtml \ | |
518 | >../doc/help/api-overview.html | |
ef416fc2 | 519 | mxmldoc --section "Programming" --title "Array API" \ |
5a738aea MS |
520 | --css ../doc/cups-printable.css \ |
521 | --header api-array.header --intro api-array.shtml \ | |
f11a948a | 522 | api-array.xml \ |
ef416fc2 | 523 | array.h array.c >../doc/help/api-array.html |
f11a948a MS |
524 | mxmldoc --tokens help/api-array.html api-array.xml >../doc/help/api-array.tokens |
525 | $(RM) api-array.xml | |
ef416fc2 | 526 | mxmldoc --section "Programming" --title "CUPS API" \ |
5a738aea MS |
527 | --css ../doc/cups-printable.css \ |
528 | --header api-cups.header --intro api-cups.shtml \ | |
f11a948a | 529 | api-cups.xml \ |
5a9febac | 530 | cups.h adminutil.c dest*.c language.c notify.c \ |
ef416fc2 | 531 | options.c tempfile.c usersys.c \ |
532 | util.c >../doc/help/api-cups.html | |
f11a948a MS |
533 | mxmldoc --tokens help/api-cups.html api-cups.xml >../doc/help/api-cups.tokens |
534 | $(RM) api-cups.xml | |
ef416fc2 | 535 | mxmldoc --section "Programming" --title "File and Directory APIs" \ |
5a738aea MS |
536 | --css ../doc/cups-printable.css \ |
537 | --header api-filedir.header --intro api-filedir.shtml \ | |
f11a948a | 538 | api-filedir.xml \ |
ef416fc2 | 539 | file.h file.c dir.h dir.c >../doc/help/api-filedir.html |
f11a948a MS |
540 | mxmldoc --tokens api-filedir.xml >../doc/help/api-filedir.tokens |
541 | $(RM) api-filedir.xml | |
a2326b5b | 542 | mxmldoc --section "Programming" --title "PPD API (DEPRECATED)" \ |
5a738aea MS |
543 | --css ../doc/cups-printable.css \ |
544 | --header api-ppd.header --intro api-ppd.shtml \ | |
f11a948a | 545 | api-ppd.xml \ |
66ab9486 | 546 | ppd.h attr.c conflicts.c custom.c emit.c localize.c mark.c page.c \ |
ef416fc2 | 547 | ppd.c >../doc/help/api-ppd.html |
f11a948a MS |
548 | mxmldoc --tokens help/api-ppd.html api-ppd.xml >../doc/help/api-ppd.tokens |
549 | $(RM) api-ppd.xml | |
ef416fc2 | 550 | mxmldoc --section "Programming" --title "HTTP and IPP APIs" \ |
5a738aea MS |
551 | --css ../doc/cups-printable.css \ |
552 | --header api-httpipp.header --intro api-httpipp.shtml \ | |
f11a948a | 553 | api-httpipp.xml \ |
ae71f5de MS |
554 | http.h ipp.h auth.c getdevices.c getputfile.c encode.c \ |
555 | http.c http-addr.c http-support.c ipp.c ipp-support.c \ | |
556 | md5passwd.c request.c >../doc/help/api-httpipp.html | |
f11a948a MS |
557 | mxmldoc --tokens help/api-httpipp.html api-httpipp.xml >../doc/help/api-httpipp.tokens |
558 | $(RM) api-httpipp.xml | |
5a738aea MS |
559 | mxmldoc --section "Programming" \ |
560 | --title "Filter and Backend Programming" \ | |
561 | --css ../doc/cups-printable.css \ | |
562 | --header api-filter.header --intro api-filter.shtml \ | |
f11a948a | 563 | api-filter.xml \ |
ac884b6a | 564 | backchannel.c backend.h backend.c sidechannel.c sidechannel.h \ |
7a14d768 | 565 | >../doc/help/api-filter.html |
f11a948a MS |
566 | mxmldoc --tokens help/api-filter.html api-filter.xml >../doc/help/api-filter.tokens |
567 | $(RM) api-filter.xml | |
5a738aea MS |
568 | |
569 | framedhelp: | |
570 | echo Generating CUPS API help files... | |
571 | mxmldoc --framed api-overview \ | |
572 | --section "Programming" \ | |
573 | --title "Introduction to CUPS Programming" \ | |
574 | --css ../doc/cups-printable.css \ | |
575 | --header api-overview.header --intro api-overview.shtml | |
576 | mxmldoc --framed api-array \ | |
577 | --section "Programming" --title "Array API" \ | |
578 | --css ../doc/cups-printable.css \ | |
579 | --header api-array.header --intro api-array.shtml \ | |
580 | array.h array.c | |
581 | mxmldoc --framed api-cups \ | |
582 | --section "Programming" --title "CUPS API" \ | |
583 | --css ../doc/cups-printable.css \ | |
584 | --header api-cups.header --intro api-cups.shtml \ | |
5a9febac | 585 | cups.h adminutil.c dest*.c language.c notify.c \ |
5a738aea | 586 | options.c tempfile.c usersys.c \ |
ac884b6a | 587 | util.c |
5a738aea MS |
588 | mxmldoc --framed api-filedir \ |
589 | --section "Programming" --title "File and Directory APIs" \ | |
590 | --css ../doc/cups-printable.css \ | |
591 | --header api-filedir.header --intro api-filedir.shtml \ | |
ac884b6a | 592 | file.h file.c dir.h dir.c |
5a738aea | 593 | mxmldoc --framed api-ppd \ |
a2326b5b | 594 | --section "Programming" --title "PPD API (DEPRECATED)" \ |
5a738aea MS |
595 | --css ../doc/cups-printable.css \ |
596 | --header api-ppd.header --intro api-ppd.shtml \ | |
66ab9486 MS |
597 | ppd.h attr.c conflicts.c custom.c emit.c localize.c mark.c \ |
598 | page.c ppd.c | |
5a738aea MS |
599 | mxmldoc --framed api-httpipp \ |
600 | --section "Programming" --title "HTTP and IPP APIs" \ | |
601 | --css ../doc/cups-printable.css \ | |
602 | --header api-httpipp.header --intro api-httpipp.shtml \ | |
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 | |
5a738aea MS |
606 | mxmldoc --framed api-filter \ |
607 | --section "Programming" \ | |
608 | --title "Filter and Backend Programming" \ | |
609 | --css ../doc/cups-printable.css \ | |
610 | --header api-filter.header --intro api-filter.shtml \ | |
7a14d768 | 611 | backchannel.c backend.h backend.c sidechannel.c sidechannel.h |
ef416fc2 | 612 | |
613 | ||
84315f46 MS |
614 | # |
615 | # Lines of code computation... | |
616 | # | |
617 | ||
618 | sloc: | |
619 | echo "libcupslite: \c" | |
620 | sloccount $(LITEOBJS:.o=.c) 2>/dev/null | grep "Total Physical" | awk '{print $$9}' | |
621 | echo "libcups: \c" | |
622 | sloccount $(LIBOBJS:.o=.c) 2>/dev/null | grep "Total Physical" | awk '{print $$9}' | |
623 | ||
624 | ||
ef416fc2 | 625 | # |
626 | # Dependencies... | |
627 | # | |
628 | ||
629 | include Dependencies | |
630 | ||
631 | ||
632 | # | |
b19ccc9e | 633 | # End of "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $". |
ef416fc2 | 634 | # |