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