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