]> git.ipfire.org Git - thirdparty/cups.git/blame - filter/Makefile
Load cups into easysw/current.
[thirdparty/cups.git] / filter / Makefile
CommitLineData
ef416fc2 1#
b86bc4cf 2# "$Id: Makefile 6158 2006-12-17 01:44:21Z 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
27include ../Makedefs
28
b86bc4cf 29
e1d6a774 30FILTERS = gziptoany hpgltops texttops pstops $(IMGFILTERS) \
ef416fc2 31 rastertolabel rastertoepson rastertohp
e1d6a774 32TARGETS = $(FILTERS) \
33 $(LIBCUPSIMAGE) \
34 libcupsimage.a \
35 $(LIB32CUPSIMAGE) \
36 $(LIB64CUPSIMAGE) \
ed486911 37 rasterbench \
e1d6a774 38 testimage \
39 testraster
ef416fc2 40
41HPGLOBJS = 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
43IMAGEOBJS = 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 interpret.o raster.o
e1d6a774 47IMAGE32OBJS = $(IMAGEOBJS:.o=.32.o)
48IMAGE64OBJS = $(IMAGEOBJS:.o=.64.o)
ef416fc2 49FORMOBJS = form-attr.o form-main.o form-ps.o form-text.o form-tree.o
50OBJS = $(HPGLOBJS) $(IMAGEOBJS) $(FORMOBJS) \
e1d6a774 51 gziptoany.o imagetops.o imagetoraster.o common.o pstops.o \
ed486911 52 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
e1d6a774 53 testimage.o testraster.o textcommon.o texttops.o
ef416fc2 54
55
56#
57# Make all targets...
58#
59
e1d6a774 60all: $(TARGETS)
ef416fc2 61
62
63#
64# Clean all object files...
65#
66
67clean:
e1d6a774 68 $(RM) $(OBJS) $(TARGETS)
69 $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib
f301802f 70 $(RM) -r 32bit 64bit
ef416fc2 71
72
73#
74# Update dependencies (without system header dependencies...)
75#
76
77depend:
e1d6a774 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
ef416fc2 85
86
87#
88# Install all targets...
89#
90
e1d6a774 91install: all installhdrs $(INSTALLSTATIC) $(INSTALL32) $(INSTALL64)
bd7854cb 92 $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
ef416fc2 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
923edb68 98 $(INSTALL_DIR) -m 755 $(LIBDIR)
ef416fc2 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
923edb68 109
110installstatic:
111 $(INSTALL_DIR) -m 755 $(LIBDIR)
d6ae789d 112 $(INSTALL_LIB) libcupsimage.a $(LIBDIR);
113 $(RANLIB) $(LIBDIR)/libcupsimage.a;
ef416fc2 114
115installhdrs:
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 120install32bit:
121 $(INSTALL_DIR) -m 755 $(LIB32DIR)
f301802f 122 $(INSTALL_LIB) 32bit/libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so.2
ed486911 123 $(LN) libcupsimage.so.2 $(LIB32DIR)/libcupsimage.so
e1d6a774 124
125install64bit:
126 $(INSTALL_DIR) -m 755 $(LIB64DIR)
f301802f 127 $(INSTALL_LIB) 64bit/libcupsimage.so.2 $(LIB64DIR)/libcupsimage.so.2
ed486911 128 $(LN) libcupsimage.so.2 $(LIB64DIR)/libcupsimage.so
e1d6a774 129
ef416fc2 130
757d2cad 131#
132# Uninstall all targets...
133#
134
e1d6a774 135uninstall: $(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 155uninstall32bit:
156 $(RM) $(LIB32DIR)/libcupsimage.so
157 $(RM) $(LIB32DIR)/libcupsimage.so.2
158 -$(RMDIR) $(LIB32DIR)
159
160uninstall64bit:
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
170apihelp:
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
181formtops: $(FORMOBJS) common.o ../cups/$(LIBCUPS)
182 echo Linking $@...
183 $(CC) $(LDFLAGS) -o $@ $(FORMOBJS) common.o $(LIBS) -lm
184
185
186#
187# gziptoany
188#
189
190gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
191 echo Linking $@...
192 $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
193
194
195#
196# hpgltops
197#
198
199hpgltops: $(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
208libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS)
209 echo Linking $@...
a74454a7 210 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \
211 -L../cups $(LINKCUPS) -lm
ef416fc2 212 $(RM) `basename $@ .2`
213 $(LN) $@ `basename $@ .2`
214
215
e1d6a774 216#
f301802f 217# 32bit/libcupsimage.so.2
e1d6a774 218#
219
f301802f 22032bit/libcupsimage.so.2: $(IMAGE32OBJS)
e1d6a774 221 echo Linking 32-bit $@...
f301802f 222 -mkdir 32bit
223 $(DSO) $(ARCH32FLAGS) $(DSO32FLAGS) -o $@ $(IMAGE32OBJS) $(DSOLIBS) \
224 -L../cups/32bit $(LINKCUPS) -lm
e1d6a774 225
226
227#
f301802f 228# 64bit/libcupsimage.so.2
e1d6a774 229#
230
f301802f 23164bit/libcupsimage.so.2: $(IMAGE64OBJS)
e1d6a774 232 echo Linking 64-bit $@...
f301802f 233 -mkdir 64bit
234 $(DSO) $(ARCH64FLAGS) $(DSO64FLAGS) -o $@ $(IMAGE64OBJS) $(DSOLIBS) \
235 -L../cups/64bit $(LINKCUPS) -lm
e1d6a774 236
237
ef416fc2 238#
239# libcupsimage.2.dylib
240#
241
242libcupsimage.2.dylib: $(IMAGEOBJS)
243 echo Linking $@...
e1d6a774 244 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
fa73b229 245 -install_name $(libdir)/$@ \
ef416fc2 246 -current_version 2.2.0 \
247 -compatibility_version 2.0.0 \
248 $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS) -lm
249 $(RM) libcupsimage.dylib
250 $(LN) $@ libcupsimage.dylib
251
252
253#
254# libcupsimage_s.a
255#
256
a74454a7 257libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp
ef416fc2 258 echo Linking $@...
e1d6a774 259 $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \
260 -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS) -lm
ef416fc2 261 $(RM) $@
262 $(AR) $(ARFLAGS) $@ libcupsimage_s.o
263
264
265#
266# libcupsimage.la
267#
268
269libcupsimage.la: $(IMAGEOBJS)
270 echo Linking $@...
e1d6a774 271 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
a74454a7 272 -L../cups $(LINKCUPS) \
ef416fc2 273 -rpath $(LIBDIR) -version-info 2:2
274
275
276#
277# libcupsimage.a
278#
279
280libcupsimage.a: $(IMAGEOBJS)
281 echo Archiving $@...
282 $(RM) $@
283 $(AR) $(ARFLAGS) $@ $(IMAGEOBJS)
284 $(RANLIB) $@
285
286
287#
288# testimage
289#
290
291testimage: testimage.o libcupsimage.a ../Makedefs
292 echo Linking $@...
293 $(CC) $(LDFLAGS) -o $@ testimage.o libcupsimage.a \
294 $(IMGLIBS) $(DSOLIBS) $(LIBS)
295
296
297#
298# imagetops
299#
300
301imagetops: imagetops.o common.o $(LIBCUPSIMAGE) \
302 ../cups/$(LIBCUPS)
303 echo Linking $@...
304 $(CC) $(LDFLAGS) -o $@ imagetops.o common.o $(LINKCUPSIMAGE) \
305 $(IMGLIBS) $(LIBS)
306
307
308#
309# imagetoraster
310#
311
312imagetoraster: imagetoraster.o common.o $(LIBCUPSIMAGE) \
313 ../cups/$(LIBCUPS)
314 echo Linking $@...
315 $(CC) $(LDFLAGS) -o $@ imagetoraster.o common.o $(LINKCUPSIMAGE) \
316 $(IMGLIBS) $(LIBS)
317
318
319#
320# pstops
321#
322
323pstops: pstops.o common.o ../cups/$(LIBCUPS)
324 echo Linking $@...
bd7854cb 325 $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS) -lm
ef416fc2 326
327
328#
329# rastertolabel
330#
331
332rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
333 echo Linking $@...
334 $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
335
336
337#
338# rastertoepson
339#
340
341rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
342 echo Linking $@...
343 $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
344
345
346#
347# rastertohp
348#
349
350rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
351 echo Linking $@...
352 $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
353
354
355#
356# testraster
357#
358
b86bc4cf 359testraster: testraster.o ../cups/libcups.a libcupsimage.a
ef416fc2 360 echo Linking $@...
b86bc4cf 361 $(CC) $(LDFLAGS) -o $@ testraster.o libcupsimage.a ../cups/libcups.a \
362 $(IMGLIBS) $(DSOLIBS) $(LIBS)
ef416fc2 363
364
ed486911 365#
366# rasterbench
367#
368
369rasterbench: rasterbench.o raster.o
370 echo Linking $@...
371 $(CC) $(LDFLAGS) -o $@ rasterbench.o raster.o
372
373
ef416fc2 374#
375# texttops
376#
377
378texttops: texttops.o textcommon.o common.o \
379 ../cups/$(LIBCUPS)
380 echo Linking $@...
381 $(CC) $(LDFLAGS) -o $@ texttops.o textcommon.o common.o $(LIBS)
382
383
384#
385# Dependencies...
386#
387
388include Dependencies
389
390
391#
b86bc4cf 392# End of "$Id: Makefile 6158 2006-12-17 01:44:21Z mike $".
ef416fc2 393#