]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
355e94dc | 2 | # "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $" |
ef416fc2 | 3 | # |
4 | # Filter makefile for the Common UNIX Printing System (CUPS). | |
5 | # | |
91c84a35 | 6 | # Copyright 2007-2008 by Apple Inc. |
bd7854cb | 7 | # Copyright 1997-2006 by Easy Software Products. |
ef416fc2 | 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 | ||
b86bc4cf | 20 | |
e1d6a774 | 21 | FILTERS = gziptoany hpgltops texttops pstops $(IMGFILTERS) \ |
91c84a35 | 22 | $(PDFTOPS) rastertolabel rastertoepson rastertohp |
e1d6a774 | 23 | TARGETS = $(FILTERS) \ |
24 | $(LIBCUPSIMAGE) \ | |
25 | libcupsimage.a \ | |
26 | $(LIB32CUPSIMAGE) \ | |
27 | $(LIB64CUPSIMAGE) \ | |
ed486911 | 28 | rasterbench \ |
e1d6a774 | 29 | testimage \ |
30 | testraster | |
ef416fc2 | 31 | |
32 | HPGLOBJS = hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \ | |
33 | hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o | |
34 | IMAGEOBJS = image-bmp.o image-colorspace.o image-gif.o image-jpeg.o \ | |
35 | image-photocd.o image-pix.o image-png.o image-pnm.o \ | |
36 | image-sgi.o image-sgilib.o image-sun.o image-tiff.o \ | |
f7deaa1a | 37 | image-zoom.o image.o error.o interpret.o raster.o |
e1d6a774 | 38 | IMAGE32OBJS = $(IMAGEOBJS:.o=.32.o) |
39 | IMAGE64OBJS = $(IMAGEOBJS:.o=.64.o) | |
ef416fc2 | 40 | FORMOBJS = form-attr.o form-main.o form-ps.o form-text.o form-tree.o |
41 | OBJS = $(HPGLOBJS) $(IMAGEOBJS) $(FORMOBJS) \ | |
91c84a35 MS |
42 | gziptoany.o imagetops.o imagetoraster.o common.o \ |
43 | pdftops.o pstops.o \ | |
ed486911 | 44 | rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \ |
e1d6a774 | 45 | testimage.o testraster.o textcommon.o texttops.o |
ef416fc2 | 46 | |
47 | ||
48 | # | |
49 | # Make all targets... | |
50 | # | |
51 | ||
e1d6a774 | 52 | all: $(TARGETS) |
ef416fc2 | 53 | |
54 | ||
55 | # | |
56 | # Clean all object files... | |
57 | # | |
58 | ||
59 | clean: | |
e1d6a774 | 60 | $(RM) $(OBJS) $(TARGETS) |
61 | $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib | |
f301802f | 62 | $(RM) -r 32bit 64bit |
ef416fc2 | 63 | |
64 | ||
65 | # | |
66 | # Update dependencies (without system header dependencies...) | |
67 | # | |
68 | ||
69 | depend: | |
e1d6a774 | 70 | touch Dependencies.tmp |
71 | makedepend -Y -I.. -fDependencies.tmp $(OBJS:.o=.c) >/dev/null 2>&1 | |
72 | $(RM) Dependencies | |
73 | cp Dependencies.tmp Dependencies | |
ac884b6a MS |
74 | sed -E -e '1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp >>Dependencies |
75 | sed -E -e '1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp >>Dependencies | |
e1d6a774 | 76 | $(RM) Dependencies.tmp |
ef416fc2 | 77 | |
78 | ||
79 | # | |
80 | # Install all targets... | |
81 | # | |
82 | ||
50fe7201 MS |
83 | install: all install-data install-headers install-libs install-exec |
84 | ||
85 | ||
86 | # | |
87 | # Install data files... | |
88 | # | |
89 | ||
90 | install-data: | |
91 | ||
92 | ||
93 | # | |
94 | # Install programs... | |
95 | # | |
96 | ||
97 | install-exec: | |
bd7854cb | 98 | $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter |
ef416fc2 | 99 | for file in $(FILTERS); do \ |
100 | $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \ | |
101 | done | |
102 | $(RM) $(SERVERBIN)/filter/rastertodymo | |
103 | $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo | |
50fe7201 MS |
104 | if test "x$(SYMROOT)" != "x"; then \ |
105 | $(INSTALL_DIR) $(SYMROOT); \ | |
106 | for file in $(TARGETS); do \ | |
107 | cp $$file $(SYMROOT); \ | |
108 | done \ | |
109 | fi | |
110 | ||
111 | ||
112 | # | |
113 | # Install headers... | |
114 | # | |
115 | ||
116 | install-headers: | |
117 | $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups | |
118 | $(INSTALL_DATA) image.h $(INCLUDEDIR)/cups | |
119 | ||
120 | ||
121 | # | |
122 | # Install libraries... | |
123 | # | |
124 | ||
125 | install-libs: $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64) | |
923edb68 | 126 | $(INSTALL_DIR) -m 755 $(LIBDIR) |
ef416fc2 | 127 | $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR) |
128 | -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \ | |
129 | $(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \ | |
130 | $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \ | |
131 | fi | |
132 | -if test $(LIBCUPSIMAGE) = "libcupsimage.2.dylib"; then \ | |
133 | $(STRIP) -x $(LIBDIR)/$(LIBCUPSIMAGE); \ | |
134 | $(RM) $(LIBDIR)/libcupsimage.dylib; \ | |
135 | $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \ | |
136 | fi | |
923edb68 | 137 | |
138 | installstatic: | |
139 | $(INSTALL_DIR) -m 755 $(LIBDIR) | |
d6ae789d | 140 | $(INSTALL_LIB) libcupsimage.a $(LIBDIR); |
141 | $(RANLIB) $(LIBDIR)/libcupsimage.a; | |
ef416fc2 | 142 | |
e1d6a774 | 143 | install32bit: |
144 | $(INSTALL_DIR) -m 755 $(LIB32DIR) | |
f301802f | 145 | $(INSTALL_LIB) 32bit/libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so.2 |
ed486911 | 146 | $(LN) libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so |
e1d6a774 | 147 | |
148 | install64bit: | |
149 | $(INSTALL_DIR) -m 755 $(LIB64DIR) | |
f301802f | 150 | $(INSTALL_LIB) 64bit/libcupsimage.so.2 $(LIB64DIR)/libcupsimage.so.2 |
ed486911 | 151 | $(LN) libcupsimage.so.2 $(LIB64DIR)/libcupsimage.so |
e1d6a774 | 152 | |
ef416fc2 | 153 | |
757d2cad | 154 | # |
155 | # Uninstall all targets... | |
156 | # | |
157 | ||
e1d6a774 | 158 | uninstall: $(UNINSTALL32) $(UNINSTALL64) |
757d2cad | 159 | for file in $(FILTERS); do \ |
160 | $(RM) $(SERVERBIN)/filter/$$file; \ | |
161 | done | |
162 | $(RM) $(SERVERBIN)/filter/rastertodymo | |
163 | -$(RMDIR) $(SERVERBIN)/filter | |
164 | -$(RMDIR) $(SERVERBIN) | |
165 | $(RM) $(LIBDIR)/libcupsimage.2.dylib | |
166 | $(RM) $(LIBDIR)/libcupsimage.a | |
167 | $(RM) $(LIBDIR)/libcupsimage.dylib | |
168 | $(RM) $(LIBDIR)/libcupsimage_s.a | |
169 | $(RM) $(LIBDIR)/libcupsimage.sl | |
170 | $(RM) $(LIBDIR)/libcupsimage.sl.2 | |
171 | $(RM) $(LIBDIR)/libcupsimage.so | |
172 | $(RM) $(LIBDIR)/libcupsimage.so.2 | |
173 | -$(RMDIR) $(LIBDIR) | |
174 | $(RM) $(INCLUDEDIR)/cups/image.h | |
757d2cad | 175 | -$(RMDIR) $(INCLUDEDIR)/cups |
176 | ||
e1d6a774 | 177 | uninstall32bit: |
178 | $(RM) $(LIB32DIR)/libcupsimage.so | |
179 | $(RM) $(LIB32DIR)/libcupsimage.so.2 | |
180 | -$(RMDIR) $(LIB32DIR) | |
181 | ||
182 | uninstall64bit: | |
183 | $(RM) $(LIB64DIR)/libcupsimage.so | |
184 | $(RM) $(LIB64DIR)/libcupsimage.so.2 | |
185 | -$(RMDIR) $(LIB64DIR) | |
186 | ||
757d2cad | 187 | |
b423cd4c | 188 | # |
189 | # Automatic API help files... | |
190 | # | |
191 | ||
192 | apihelp: | |
193 | echo Generating CUPS API help files... | |
194 | mxmldoc --section "Programming" --title "Raster API" \ | |
5a738aea MS |
195 | --css ../doc/cups-printable.css \ |
196 | --header api-raster.header --intro api-raster.shtml \ | |
ac884b6a MS |
197 | ../cups/raster.h interpret.c raster.c \ |
198 | >../doc/help/api-raster.html | |
b423cd4c | 199 | |
5a738aea MS |
200 | framedhelp: |
201 | echo Generating CUPS API help files... | |
202 | mxmldoc --section "Programming" --title "Raster API" \ | |
203 | --framed ../cups/api-raster \ | |
204 | --css ../doc/cups-printable.css \ | |
205 | --header api-raster.header --intro api-raster.shtml \ | |
ac884b6a | 206 | ../cups/raster.h interpret.c raster.c |
5a738aea | 207 | |
b423cd4c | 208 | |
ef416fc2 | 209 | # |
210 | # formtops | |
211 | # | |
212 | ||
213 | formtops: $(FORMOBJS) common.o ../cups/$(LIBCUPS) | |
214 | echo Linking $@... | |
215 | $(CC) $(LDFLAGS) -o $@ $(FORMOBJS) common.o $(LIBS) -lm | |
216 | ||
217 | ||
218 | # | |
219 | # gziptoany | |
220 | # | |
221 | ||
222 | gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS) | |
223 | echo Linking $@... | |
224 | $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS) | |
225 | ||
226 | ||
227 | # | |
228 | # hpgltops | |
229 | # | |
230 | ||
231 | hpgltops: $(HPGLOBJS) common.o ../cups/$(LIBCUPS) | |
232 | echo Linking $@... | |
233 | $(CC) $(LDFLAGS) -o $@ $(HPGLOBJS) common.o $(LIBS) -lm | |
234 | ||
235 | ||
236 | # | |
237 | # libcupsimage.so.2, libcupsimage.sl.2 | |
238 | # | |
239 | ||
240 | libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS) | |
241 | echo Linking $@... | |
a74454a7 | 242 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \ |
243 | -L../cups $(LINKCUPS) -lm | |
ef416fc2 | 244 | $(RM) `basename $@ .2` |
245 | $(LN) $@ `basename $@ .2` | |
246 | ||
247 | ||
e1d6a774 | 248 | # |
f301802f | 249 | # 32bit/libcupsimage.so.2 |
e1d6a774 | 250 | # |
251 | ||
f301802f | 252 | 32bit/libcupsimage.so.2: $(IMAGE32OBJS) |
e1d6a774 | 253 | echo Linking 32-bit $@... |
f301802f | 254 | -mkdir 32bit |
255 | $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(IMAGE32OBJS) $(DSOLIBS) \ | |
256 | -L../cups/32bit $(LINKCUPS) -lm | |
e1d6a774 | 257 | |
258 | ||
259 | # | |
f301802f | 260 | # 64bit/libcupsimage.so.2 |
e1d6a774 | 261 | # |
262 | ||
f301802f | 263 | 64bit/libcupsimage.so.2: $(IMAGE64OBJS) |
e1d6a774 | 264 | echo Linking 64-bit $@... |
f301802f | 265 | -mkdir 64bit |
266 | $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(IMAGE64OBJS) $(DSOLIBS) \ | |
267 | -L../cups/64bit $(LINKCUPS) -lm | |
e1d6a774 | 268 | |
269 | ||
ef416fc2 | 270 | # |
271 | # libcupsimage.2.dylib | |
272 | # | |
273 | ||
355e94dc | 274 | libcupsimage.2.dylib: $(IMAGEOBJS) $(LIBCUPSIMAGEORDER) |
ef416fc2 | 275 | echo Linking $@... |
e1d6a774 | 276 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \ |
fa73b229 | 277 | -install_name $(libdir)/$@ \ |
f7deaa1a | 278 | -current_version 2.3.0 \ |
ef416fc2 | 279 | -compatibility_version 2.0.0 \ |
cc0d019f | 280 | -sectorder __TEXT __text $(LIBCUPSIMAGEORDER) \ |
ef416fc2 | 281 | $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm |
282 | $(RM) libcupsimage.dylib | |
283 | $(LN) $@ libcupsimage.dylib | |
284 | ||
285 | ||
286 | # | |
287 | # libcupsimage_s.a | |
288 | # | |
289 | ||
a74454a7 | 290 | libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp |
ef416fc2 | 291 | echo Linking $@... |
e1d6a774 | 292 | $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \ |
293 | -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS) -lm | |
ef416fc2 | 294 | $(RM) $@ |
295 | $(AR) $(ARFLAGS) $@ libcupsimage_s.o | |
296 | ||
297 | ||
298 | # | |
299 | # libcupsimage.la | |
300 | # | |
301 | ||
302 | libcupsimage.la: $(IMAGEOBJS) | |
303 | echo Linking $@... | |
e1d6a774 | 304 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \ |
a74454a7 | 305 | -L../cups $(LINKCUPS) \ |
f7deaa1a | 306 | -rpath $(LIBDIR) -version-info 2:3 |
ef416fc2 | 307 | |
308 | ||
309 | # | |
310 | # libcupsimage.a | |
311 | # | |
312 | ||
313 | libcupsimage.a: $(IMAGEOBJS) | |
314 | echo Archiving $@... | |
315 | $(RM) $@ | |
316 | $(AR) $(ARFLAGS) $@ $(IMAGEOBJS) | |
317 | $(RANLIB) $@ | |
318 | ||
319 | ||
320 | # | |
321 | # testimage | |
322 | # | |
323 | ||
324 | testimage: testimage.o libcupsimage.a ../Makedefs | |
325 | echo Linking $@... | |
326 | $(CC) $(LDFLAGS) -o $@ testimage.o libcupsimage.a \ | |
327 | $(IMGLIBS) $(DSOLIBS) $(LIBS) | |
328 | ||
329 | ||
330 | # | |
331 | # imagetops | |
332 | # | |
333 | ||
334 | imagetops: imagetops.o common.o $(LIBCUPSIMAGE) \ | |
335 | ../cups/$(LIBCUPS) | |
336 | echo Linking $@... | |
337 | $(CC) $(LDFLAGS) -o $@ imagetops.o common.o $(LINKCUPSIMAGE) \ | |
338 | $(IMGLIBS) $(LIBS) | |
339 | ||
340 | ||
341 | # | |
342 | # imagetoraster | |
343 | # | |
344 | ||
345 | imagetoraster: imagetoraster.o common.o $(LIBCUPSIMAGE) \ | |
346 | ../cups/$(LIBCUPS) | |
347 | echo Linking $@... | |
348 | $(CC) $(LDFLAGS) -o $@ imagetoraster.o common.o $(LINKCUPSIMAGE) \ | |
349 | $(IMGLIBS) $(LIBS) | |
350 | ||
351 | ||
352 | # | |
353 | # pstops | |
354 | # | |
355 | ||
356 | pstops: pstops.o common.o ../cups/$(LIBCUPS) | |
357 | echo Linking $@... | |
bd7854cb | 358 | $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) -lm |
ef416fc2 | 359 | |
360 | ||
91c84a35 MS |
361 | # |
362 | # pdftops | |
363 | # | |
364 | ||
365 | pdftops: pdftops.o common.o ../cups/$(LIBCUPS) | |
366 | echo Linking $@... | |
367 | $(CC) $(LDFLAGS) -o $@ pdftops.o common.o $(LIBS) | |
368 | ||
369 | ||
ef416fc2 | 370 | # |
371 | # rastertolabel | |
372 | # | |
373 | ||
374 | rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
375 | echo Linking $@... | |
376 | $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) | |
377 | ||
378 | ||
379 | # | |
380 | # rastertoepson | |
381 | # | |
382 | ||
383 | rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
384 | echo Linking $@... | |
385 | $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) | |
386 | ||
387 | ||
388 | # | |
389 | # rastertohp | |
390 | # | |
391 | ||
392 | rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
393 | echo Linking $@... | |
394 | $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) | |
395 | ||
396 | ||
397 | # | |
398 | # testraster | |
399 | # | |
400 | ||
b86bc4cf | 401 | testraster: testraster.o ../cups/libcups.a libcupsimage.a |
ef416fc2 | 402 | echo Linking $@... |
b86bc4cf | 403 | $(CC) $(LDFLAGS) -o $@ testraster.o libcupsimage.a ../cups/libcups.a \ |
f7deaa1a | 404 | $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) $(SSLLIBS) $(LIBGSSAPI) |
ef416fc2 | 405 | |
406 | ||
ed486911 | 407 | # |
408 | # rasterbench | |
409 | # | |
410 | ||
f7deaa1a | 411 | rasterbench: rasterbench.o libcupsimage.a |
ed486911 | 412 | echo Linking $@... |
f7deaa1a | 413 | $(CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS) |
ed486911 | 414 | |
415 | ||
ef416fc2 | 416 | # |
417 | # texttops | |
418 | # | |
419 | ||
420 | texttops: texttops.o textcommon.o common.o \ | |
421 | ../cups/$(LIBCUPS) | |
422 | echo Linking $@... | |
423 | $(CC) $(LDFLAGS) -o $@ texttops.o textcommon.o common.o $(LIBS) | |
424 | ||
425 | ||
426 | # | |
427 | # Dependencies... | |
428 | # | |
429 | ||
430 | include Dependencies | |
431 | ||
432 | ||
433 | # | |
355e94dc | 434 | # End of "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $". |
ef416fc2 | 435 | # |