]>
Commit | Line | Data |
---|---|---|
ef416fc2 | 1 | # |
a74454a7 | 2 | # "$Id: Makefile 5491 2006-05-04 20:53:35Z 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) | |
d6ae789d | 110 | $(INSTALL_LIB) libcupsimage.a $(LIBDIR); |
111 | $(RANLIB) $(LIBDIR)/libcupsimage.a; | |
ef416fc2 | 112 | |
113 | installhdrs: | |
bd7854cb | 114 | $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups |
ef416fc2 | 115 | $(INSTALL_DATA) image.h $(INCLUDEDIR)/cups |
116 | $(INSTALL_DATA) raster.h $(INCLUDEDIR)/cups | |
117 | ||
e1d6a774 | 118 | install32bit: |
119 | $(INSTALL_DIR) -m 755 $(LIB32DIR) | |
120 | $(INSTALL_LIB) libcupsimage.32.so.2 $(LIB32DIR)/libcupsimage.so.2 | |
121 | $(LN) libcupsimage.so $(LIB32DIR)/libcupsimage.so.2 | |
122 | ||
123 | install64bit: | |
124 | $(INSTALL_DIR) -m 755 $(LIB64DIR) | |
125 | $(INSTALL_LIB) libcupsimage.64.so.2 $(LIB64DIR)/libcupsimage.so.2 | |
126 | $(LN) libcupsimage.so $(LIB64DIR)/libcupsimage.so.2 | |
127 | ||
ef416fc2 | 128 | |
757d2cad | 129 | # |
130 | # Uninstall all targets... | |
131 | # | |
132 | ||
e1d6a774 | 133 | uninstall: $(UNINSTALL32) $(UNINSTALL64) |
757d2cad | 134 | for file in $(FILTERS); do \ |
135 | $(RM) $(SERVERBIN)/filter/$$file; \ | |
136 | done | |
137 | $(RM) $(SERVERBIN)/filter/rastertodymo | |
138 | -$(RMDIR) $(SERVERBIN)/filter | |
139 | -$(RMDIR) $(SERVERBIN) | |
140 | $(RM) $(LIBDIR)/libcupsimage.2.dylib | |
141 | $(RM) $(LIBDIR)/libcupsimage.a | |
142 | $(RM) $(LIBDIR)/libcupsimage.dylib | |
143 | $(RM) $(LIBDIR)/libcupsimage_s.a | |
144 | $(RM) $(LIBDIR)/libcupsimage.sl | |
145 | $(RM) $(LIBDIR)/libcupsimage.sl.2 | |
146 | $(RM) $(LIBDIR)/libcupsimage.so | |
147 | $(RM) $(LIBDIR)/libcupsimage.so.2 | |
148 | -$(RMDIR) $(LIBDIR) | |
149 | $(RM) $(INCLUDEDIR)/cups/image.h | |
150 | $(RM) $(INCLUDEDIR)/cups/raster.h | |
151 | -$(RMDIR) $(INCLUDEDIR)/cups | |
152 | ||
e1d6a774 | 153 | uninstall32bit: |
154 | $(RM) $(LIB32DIR)/libcupsimage.so | |
155 | $(RM) $(LIB32DIR)/libcupsimage.so.2 | |
156 | -$(RMDIR) $(LIB32DIR) | |
157 | ||
158 | uninstall64bit: | |
159 | $(RM) $(LIB64DIR)/libcupsimage.so | |
160 | $(RM) $(LIB64DIR)/libcupsimage.so.2 | |
161 | -$(RMDIR) $(LIB64DIR) | |
162 | ||
757d2cad | 163 | |
b423cd4c | 164 | # |
165 | # Automatic API help files... | |
166 | # | |
167 | ||
168 | apihelp: | |
169 | echo Generating CUPS API help files... | |
170 | mxmldoc --section "Programming" --title "Raster API" \ | |
171 | --intro api-raster.shtml \ | |
172 | raster.h interpret.c raster.c >../doc/help/api-raster.html | |
173 | ||
174 | ||
ef416fc2 | 175 | # |
176 | # formtops | |
177 | # | |
178 | ||
179 | formtops: $(FORMOBJS) common.o ../cups/$(LIBCUPS) | |
180 | echo Linking $@... | |
181 | $(CC) $(LDFLAGS) -o $@ $(FORMOBJS) common.o $(LIBS) -lm | |
182 | ||
183 | ||
184 | # | |
185 | # gziptoany | |
186 | # | |
187 | ||
188 | gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS) | |
189 | echo Linking $@... | |
190 | $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS) | |
191 | ||
192 | ||
193 | # | |
194 | # hpgltops | |
195 | # | |
196 | ||
197 | hpgltops: $(HPGLOBJS) common.o ../cups/$(LIBCUPS) | |
198 | echo Linking $@... | |
199 | $(CC) $(LDFLAGS) -o $@ $(HPGLOBJS) common.o $(LIBS) -lm | |
200 | ||
201 | ||
202 | # | |
203 | # libcupsimage.so.2, libcupsimage.sl.2 | |
204 | # | |
205 | ||
206 | libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS) | |
207 | echo Linking $@... | |
a74454a7 | 208 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \ |
209 | -L../cups $(LINKCUPS) -lm | |
ef416fc2 | 210 | $(RM) `basename $@ .2` |
211 | $(LN) $@ `basename $@ .2` | |
212 | ||
213 | ||
e1d6a774 | 214 | # |
215 | # libcupsimage.32.so.2 | |
216 | # | |
217 | ||
218 | libcupsimage.32.so.2: $(IMAGE32OBJS) | |
219 | echo Linking 32-bit $@... | |
a74454a7 | 220 | $(DSO) $(ARCH32FLAGS) $(DSOFLAGS) -o $@ $(IMAGE32OBJS) $(DSOLIBS) \ |
221 | -L../cups $(LINKCUPS) -lm | |
e1d6a774 | 222 | |
223 | ||
224 | # | |
225 | # libcupsimage.64.so.2 | |
226 | # | |
227 | ||
228 | libcupsimage.64.so.2: $(IMAGE64OBJS) | |
229 | echo Linking 64-bit $@... | |
a74454a7 | 230 | $(DSO) $(ARCH64FLAGS) $(DSOFLAGS) -o $@ $(IMAGE64OBJS) $(DSOLIBS) \ |
231 | -L../cups $(LINKCUPS) -lm | |
e1d6a774 | 232 | |
233 | ||
ef416fc2 | 234 | # |
235 | # libcupsimage.2.dylib | |
236 | # | |
237 | ||
238 | libcupsimage.2.dylib: $(IMAGEOBJS) | |
239 | echo Linking $@... | |
e1d6a774 | 240 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \ |
fa73b229 | 241 | -install_name $(libdir)/$@ \ |
ef416fc2 | 242 | -current_version 2.2.0 \ |
243 | -compatibility_version 2.0.0 \ | |
244 | $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm | |
245 | $(RM) libcupsimage.dylib | |
246 | $(LN) $@ libcupsimage.dylib | |
247 | ||
248 | ||
249 | # | |
250 | # libcupsimage_s.a | |
251 | # | |
252 | ||
a74454a7 | 253 | libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp |
ef416fc2 | 254 | echo Linking $@... |
e1d6a774 | 255 | $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \ |
256 | -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS) -lm | |
ef416fc2 | 257 | $(RM) $@ |
258 | $(AR) $(ARFLAGS) $@ libcupsimage_s.o | |
259 | ||
260 | ||
261 | # | |
262 | # libcupsimage.la | |
263 | # | |
264 | ||
265 | libcupsimage.la: $(IMAGEOBJS) | |
266 | echo Linking $@... | |
e1d6a774 | 267 | $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \ |
a74454a7 | 268 | -L../cups $(LINKCUPS) \ |
ef416fc2 | 269 | -rpath $(LIBDIR) -version-info 2:2 |
270 | ||
271 | ||
272 | # | |
273 | # libcupsimage.a | |
274 | # | |
275 | ||
276 | libcupsimage.a: $(IMAGEOBJS) | |
277 | echo Archiving $@... | |
278 | $(RM) $@ | |
279 | $(AR) $(ARFLAGS) $@ $(IMAGEOBJS) | |
280 | $(RANLIB) $@ | |
281 | ||
282 | ||
283 | # | |
284 | # testimage | |
285 | # | |
286 | ||
287 | testimage: testimage.o libcupsimage.a ../Makedefs | |
288 | echo Linking $@... | |
289 | $(CC) $(LDFLAGS) -o $@ testimage.o libcupsimage.a \ | |
290 | $(IMGLIBS) $(DSOLIBS) $(LIBS) | |
291 | ||
292 | ||
293 | # | |
294 | # imagetops | |
295 | # | |
296 | ||
297 | imagetops: imagetops.o common.o $(LIBCUPSIMAGE) \ | |
298 | ../cups/$(LIBCUPS) | |
299 | echo Linking $@... | |
300 | $(CC) $(LDFLAGS) -o $@ imagetops.o common.o $(LINKCUPSIMAGE) \ | |
301 | $(IMGLIBS) $(LIBS) | |
302 | ||
303 | ||
304 | # | |
305 | # imagetoraster | |
306 | # | |
307 | ||
308 | imagetoraster: imagetoraster.o common.o $(LIBCUPSIMAGE) \ | |
309 | ../cups/$(LIBCUPS) | |
310 | echo Linking $@... | |
311 | $(CC) $(LDFLAGS) -o $@ imagetoraster.o common.o $(LINKCUPSIMAGE) \ | |
312 | $(IMGLIBS) $(LIBS) | |
313 | ||
314 | ||
315 | # | |
316 | # pstops | |
317 | # | |
318 | ||
319 | pstops: pstops.o common.o ../cups/$(LIBCUPS) | |
320 | echo Linking $@... | |
bd7854cb | 321 | $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) -lm |
ef416fc2 | 322 | |
323 | ||
324 | # | |
325 | # rastertolabel | |
326 | # | |
327 | ||
328 | rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
329 | echo Linking $@... | |
330 | $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) | |
331 | ||
332 | ||
333 | # | |
334 | # rastertoepson | |
335 | # | |
336 | ||
337 | rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
338 | echo Linking $@... | |
339 | $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) | |
340 | ||
341 | ||
342 | # | |
343 | # rastertohp | |
344 | # | |
345 | ||
346 | rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE) | |
347 | echo Linking $@... | |
348 | $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS) | |
349 | ||
350 | ||
351 | # | |
352 | # testraster | |
353 | # | |
354 | ||
355 | testraster: testraster.o raster.o | |
356 | echo Linking $@... | |
357 | $(CC) $(LDFLAGS) -o $@ testraster.o raster.o | |
358 | ||
359 | ||
360 | # | |
361 | # texttops | |
362 | # | |
363 | ||
364 | texttops: texttops.o textcommon.o common.o \ | |
365 | ../cups/$(LIBCUPS) | |
366 | echo Linking $@... | |
367 | $(CC) $(LDFLAGS) -o $@ texttops.o textcommon.o common.o $(LIBS) | |
368 | ||
369 | ||
370 | # | |
371 | # Dependencies... | |
372 | # | |
373 | ||
374 | include Dependencies | |
375 | ||
376 | ||
377 | # | |
a74454a7 | 378 | # End of "$Id: Makefile 5491 2006-05-04 20:53:35Z mike $". |
ef416fc2 | 379 | # |