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