]> git.ipfire.org Git - thirdparty/cups.git/blob - filter/Makefile
Load cups into easysw/current.
[thirdparty/cups.git] / filter / Makefile
1 #
2 # "$Id: Makefile 5229 2006-03-05 16:48:12Z mike $"
3 #
4 # Filter makefile for the Common UNIX Printing System (CUPS).
5 #
6 # Copyright 1997-2006 by Easy Software Products.
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
29 FILTERS = gziptoany hpgltops texttops pstops imagetops imagetoraster \
30 rastertolabel rastertoepson rastertohp
31 TARGETS = $(FILTERS) testraster
32
33 HPGLOBJS = hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
34 hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
35 IMAGEOBJS = image-bmp.o image-colorspace.o image-gif.o image-jpeg.o \
36 image-photocd.o image-pix.o image-png.o image-pnm.o \
37 image-sgi.o image-sgilib.o image-sun.o image-tiff.o \
38 image-zoom.o image.o interpret.o raster.o
39 FORMOBJS = form-attr.o form-main.o form-ps.o form-text.o form-tree.o
40 OBJS = $(HPGLOBJS) $(IMAGEOBJS) $(FORMOBJS) \
41 imagetops.o imagetoraster.o common.o pstops.o raster.o \
42 rastertolabel.o rastertoepson.o rastertohp.o \
43 texttops.o textcommon.o testraster.o gziptoany.o
44
45
46 #
47 # Make all targets...
48 #
49
50 all: $(TARGETS) $(LIBCUPSIMAGE) libcupsimage.a
51
52
53 #
54 # Clean all object files...
55 #
56
57 clean:
58 $(RM) $(OBJS) $(TARGETS) $(LIBCUPSIMAGE) libcupsimage.a
59 $(RM) `basename $(LIBCUPSIMAGE) .2` libcupsimage.dylib
60
61
62 #
63 # Update dependencies (without system header dependencies...)
64 #
65
66 depend:
67 makedepend -Y -I.. -fDependencies $(OBJS:.o=.c) >/dev/null 2>&1
68
69
70 #
71 # Install all targets...
72 #
73
74 install: all installhdrs $(INSTALLSTATIC)
75 $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
76 for file in $(FILTERS); do \
77 $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
78 done
79 $(RM) $(SERVERBIN)/filter/rastertodymo
80 $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo
81 $(INSTALL_DIR) -m 755 $(LIBDIR)
82 $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR)
83 -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \
84 $(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
85 $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
86 fi
87 -if test $(LIBCUPSIMAGE) = "libcupsimage.2.dylib"; then \
88 $(STRIP) -x $(LIBDIR)/$(LIBCUPSIMAGE); \
89 $(RM) $(LIBDIR)/libcupsimage.dylib; \
90 $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \
91 fi
92
93 installstatic:
94 $(INSTALL_DIR) -m 755 $(LIBDIR)
95 -if test $(LIBCUPSIMAGE) != "libcupsimage.a"; then \
96 $(INSTALL_LIB) libcupsimage.a $(LIBDIR); \
97 $(RANLIB) $(LIBDIR)/libcupsimage.a; \
98 fi
99
100 installhdrs:
101 $(INSTALL_DIR) -m 755 $(INCLUDEDIR)/cups
102 $(INSTALL_DATA) image.h $(INCLUDEDIR)/cups
103 $(INSTALL_DATA) raster.h $(INCLUDEDIR)/cups
104
105
106 #
107 # Uninstall all targets...
108 #
109
110 uninstall:
111 for file in $(FILTERS); do \
112 $(RM) $(SERVERBIN)/filter/$$file; \
113 done
114 $(RM) $(SERVERBIN)/filter/rastertodymo
115 -$(RMDIR) $(SERVERBIN)/filter
116 -$(RMDIR) $(SERVERBIN)
117 $(RM) $(LIBDIR)/libcupsimage.2.dylib
118 $(RM) $(LIBDIR)/libcupsimage.a
119 $(RM) $(LIBDIR)/libcupsimage.dylib
120 $(RM) $(LIBDIR)/libcupsimage_s.a
121 $(RM) $(LIBDIR)/libcupsimage.sl
122 $(RM) $(LIBDIR)/libcupsimage.sl.2
123 $(RM) $(LIBDIR)/libcupsimage.so
124 $(RM) $(LIBDIR)/libcupsimage.so.2
125 -$(RMDIR) $(LIBDIR)
126 $(RM) $(INCLUDEDIR)/cups/image.h
127 $(RM) $(INCLUDEDIR)/cups/raster.h
128 -$(RMDIR) $(INCLUDEDIR)/cups
129
130
131 #
132 # Automatic API help files...
133 #
134
135 apihelp:
136 echo Generating CUPS API help files...
137 mxmldoc --section "Programming" --title "Raster API" \
138 --intro api-raster.shtml \
139 raster.h interpret.c raster.c >../doc/help/api-raster.html
140
141
142 #
143 # formtops
144 #
145
146 formtops: $(FORMOBJS) common.o ../cups/$(LIBCUPS)
147 echo Linking $@...
148 $(CC) $(LDFLAGS) -o $@ $(FORMOBJS) common.o $(LIBS) -lm
149
150
151 #
152 # gziptoany
153 #
154
155 gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
156 echo Linking $@...
157 $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
158
159
160 #
161 # hpgltops
162 #
163
164 hpgltops: $(HPGLOBJS) common.o ../cups/$(LIBCUPS)
165 echo Linking $@...
166 $(CC) $(LDFLAGS) -o $@ $(HPGLOBJS) common.o $(LIBS) -lm
167
168
169 #
170 # libcupsimage.so.2, libcupsimage.sl.2
171 #
172
173 libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS)
174 echo Linking $@...
175 $(DSO) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) -lm
176 $(RM) `basename $@ .2`
177 $(LN) $@ `basename $@ .2`
178
179
180 #
181 # libcupsimage.2.dylib
182 #
183
184 libcupsimage.2.dylib: $(IMAGEOBJS)
185 echo Linking $@...
186 $(DSO) $(DSOFLAGS) -o $@ \
187 -install_name $(libdir)/$@ \
188 -current_version 2.2.0 \
189 -compatibility_version 2.0.0 \
190 $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm
191 $(RM) libcupsimage.dylib
192 $(LN) $@ libcupsimage.dylib
193
194
195 #
196 # libcupsimage_s.a
197 #
198
199 libcupsimage_s.a: $(IMAGEOBJS)
200 echo Linking $@...
201 $(DSO) $(DSOFLAGS) -Wl,-berok -o libcupsimage_s.o $(IMAGEOBJS) \
202 $(DSOLIBS) -lm
203 $(RM) $@
204 $(AR) $(ARFLAGS) $@ libcupsimage_s.o
205
206
207 #
208 # libcupsimage.la
209 #
210
211 libcupsimage.la: $(IMAGEOBJS)
212 echo Linking $@...
213 $(DSO) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
214 -rpath $(LIBDIR) -version-info 2:2
215
216
217 #
218 # libcupsimage.a
219 #
220
221 libcupsimage.a: $(IMAGEOBJS)
222 echo Archiving $@...
223 $(RM) $@
224 $(AR) $(ARFLAGS) $@ $(IMAGEOBJS)
225 $(RANLIB) $@
226
227
228 #
229 # testimage
230 #
231
232 testimage: testimage.o libcupsimage.a ../Makedefs
233 echo Linking $@...
234 $(CC) $(LDFLAGS) -o $@ testimage.o libcupsimage.a \
235 $(IMGLIBS) $(DSOLIBS) $(LIBS)
236
237
238 #
239 # imagetops
240 #
241
242 imagetops: imagetops.o common.o $(LIBCUPSIMAGE) \
243 ../cups/$(LIBCUPS)
244 echo Linking $@...
245 $(CC) $(LDFLAGS) -o $@ imagetops.o common.o $(LINKCUPSIMAGE) \
246 $(IMGLIBS) $(LIBS)
247
248
249 #
250 # imagetoraster
251 #
252
253 imagetoraster: imagetoraster.o common.o $(LIBCUPSIMAGE) \
254 ../cups/$(LIBCUPS)
255 echo Linking $@...
256 $(CC) $(LDFLAGS) -o $@ imagetoraster.o common.o $(LINKCUPSIMAGE) \
257 $(IMGLIBS) $(LIBS)
258
259
260 #
261 # pstops
262 #
263
264 pstops: pstops.o common.o ../cups/$(LIBCUPS)
265 echo Linking $@...
266 $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) -lm
267
268
269 #
270 # rastertolabel
271 #
272
273 rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
274 echo Linking $@...
275 $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
276
277
278 #
279 # rastertoepson
280 #
281
282 rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
283 echo Linking $@...
284 $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
285
286
287 #
288 # rastertohp
289 #
290
291 rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
292 echo Linking $@...
293 $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
294
295
296 #
297 # testraster
298 #
299
300 testraster: testraster.o raster.o
301 echo Linking $@...
302 $(CC) $(LDFLAGS) -o $@ testraster.o raster.o
303
304
305 #
306 # texttops
307 #
308
309 texttops: texttops.o textcommon.o common.o \
310 ../cups/$(LIBCUPS)
311 echo Linking $@...
312 $(CC) $(LDFLAGS) -o $@ texttops.o textcommon.o common.o $(LIBS)
313
314
315 #
316 # Dependencies...
317 #
318
319 include Dependencies
320
321
322 #
323 # End of "$Id: Makefile 5229 2006-03-05 16:48:12Z mike $".
324 #