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