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