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