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