]> git.ipfire.org Git - thirdparty/cups.git/blame - filter/Makefile
Add support for SDKROOT on OS X.
[thirdparty/cups.git] / filter / Makefile
CommitLineData
ef416fc2 1#
f2d18633 2# "$Id$"
ef416fc2 3#
07ed0e9a 4# Filter makefile for CUPS.
ef416fc2 5#
12f89d24 6# Copyright 2007-2012 by Apple Inc.
bd7854cb 7# Copyright 1997-2006 by Easy Software Products.
ef416fc2 8#
9# These coded instructions, statements, and computer programs are the
bc44d920 10# property of Apple Inc. and are protected by Federal copyright
11# law. Distribution and use rights are outlined in the file "LICENSE.txt"
12# which should have been included with this file. If this file is
13# file is missing or damaged, see the license at "http://www.cups.org/".
ef416fc2 14#
15# This file is subject to the Apple OS-Developed Software exception.
16#
17
18include ../Makedefs
19
b86bc4cf 20
c9fc04c6
MS
21FILTERS = \
22 commandtops \
23 gziptoany \
c9fc04c6 24 pstops \
c9fc04c6 25 rastertoepson \
07ed0e9a
MS
26 rastertohp \
27 rastertolabel \
28 rastertopwg
c9fc04c6 29LIBTARGETS = \
e1d6a774 30 $(LIBCUPSIMAGE) \
12f89d24 31 libcupsimage.a
5f64df29
MS
32UNITTARGETS = \
33 rasterbench \
e1d6a774 34 testraster
c9fc04c6
MS
35TARGETS = \
36 $(LIBTARGETS) \
5f64df29 37 $(FILTERS)
ef416fc2 38
a4845881 39IMAGEOBJS = error.o interpret.o raster.o
f8b3a85b 40OBJS = $(IMAGEOBJS) \
a4845881 41 commandtops.o gziptoany.o common.o pstops.o \
ed486911 42 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
a4845881 43 rastertopwg.o testraster.o
ef416fc2 44
45
46#
47# Make all targets...
48#
49
e1d6a774 50all: $(TARGETS)
ef416fc2 51
52
c9fc04c6
MS
53#
54# Make library targets...
55#
56
57libs: $(LIBTARGETS)
58
59
5f64df29
MS
60#
61# Make unit tests...
62#
63
64unittests: $(UNITTARGETS)
65
66
ef416fc2 67#
68# Clean all object files...
69#
70
71clean:
5f64df29 72 $(RM) $(OBJS) $(TARGETS) $(UNITTARGETS)
e1d6a774 73 $(RM) libcupsimage.so libcupsimage.sl libcupsimage.dylib
ef416fc2 74
75
76#
77# Update dependencies (without system header dependencies...)
78#
79
80depend:
12f89d24 81 $(CC) -MM $(ALL_CFLAGS) $(OBJS:.o=.c) >Dependencies
ef416fc2 82
83
84#
85# Install all targets...
86#
87
50fe7201
MS
88install: all install-data install-headers install-libs install-exec
89
90
91#
92# Install data files...
93#
94
95install-data:
96
97
98#
99# Install programs...
100#
101
102install-exec:
bd7854cb 103 $(INSTALL_DIR) -m 755 $(SERVERBIN)/filter
ef416fc2 104 for file in $(FILTERS); do \
105 $(INSTALL_BIN) $$file $(SERVERBIN)/filter; \
106 done
107 $(RM) $(SERVERBIN)/filter/rastertodymo
108 $(LN) rastertolabel $(SERVERBIN)/filter/rastertodymo
50fe7201
MS
109 if test "x$(SYMROOT)" != "x"; then \
110 $(INSTALL_DIR) $(SYMROOT); \
f8b3a85b 111 for file in $(FILTERS); do \
50fe7201 112 cp $$file $(SYMROOT); \
cb7f98ee 113 dsymutil $(SYMROOT)/$$file; \
50fe7201
MS
114 done \
115 fi
116
117
118#
119# Install headers...
120#
121
122install-headers:
50fe7201
MS
123
124
125#
126# Install libraries...
127#
128
12f89d24 129install-libs: $(INSTALLSTATIC)
923edb68 130 $(INSTALL_DIR) -m 755 $(LIBDIR)
ef416fc2 131 $(INSTALL_LIB) $(LIBCUPSIMAGE) $(LIBDIR)
132 -if test $(LIBCUPSIMAGE) = "libcupsimage.so.2" -o $(LIBCUPSIMAGE) = "libcupsimage.sl.2"; then \
133 $(RM) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
134 $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/`basename $(LIBCUPSIMAGE) .2`; \
135 fi
136 -if test $(LIBCUPSIMAGE) = "libcupsimage.2.dylib"; then \
ef416fc2 137 $(RM) $(LIBDIR)/libcupsimage.dylib; \
138 $(LN) $(LIBCUPSIMAGE) $(LIBDIR)/libcupsimage.dylib; \
543507be
MS
139 fi
140 if test "x$(SDKROOT)" != "x"; then \
141 $(INSTALL_DIR) $(SDKLIBDIR); \
142 $(INSTALL_LIB) $(LIBCUPSIMAGE) $(SDKLIBDIR); \
143 $(RM) $(SDKLIBDIR)/libcupsimage.dylib; \
144 $(LN) $(LIBCUPSIMAGE) $(SDKLIBDIR)/libcupsimage.dylib; \
ef416fc2 145 fi
f8b3a85b
MS
146 if test "x$(SYMROOT)" != "x"; then \
147 $(INSTALL_DIR) $(SYMROOT); \
148 cp $(LIBCUPSIMAGE) $(SYMROOT); \
0fa6c7fa 149 dsymutil $(SYMROOT)/$(LIBCUPSIMAGE); \
f8b3a85b 150 fi
923edb68 151
152installstatic:
153 $(INSTALL_DIR) -m 755 $(LIBDIR)
97c9a8d7
MS
154 $(INSTALL_LIB) -m 755 libcupsimage.a $(LIBDIR)
155 $(RANLIB) $(LIBDIR)/libcupsimage.a
156 $(CHMOD) 555 $(LIBDIR)/libcupsimage.a
ef416fc2 157
ef416fc2 158
757d2cad 159#
160# Uninstall all targets...
161#
162
12f89d24 163uninstall:
757d2cad 164 for file in $(FILTERS); do \
165 $(RM) $(SERVERBIN)/filter/$$file; \
166 done
167 $(RM) $(SERVERBIN)/filter/rastertodymo
168 -$(RMDIR) $(SERVERBIN)/filter
169 -$(RMDIR) $(SERVERBIN)
170 $(RM) $(LIBDIR)/libcupsimage.2.dylib
171 $(RM) $(LIBDIR)/libcupsimage.a
172 $(RM) $(LIBDIR)/libcupsimage.dylib
173 $(RM) $(LIBDIR)/libcupsimage_s.a
174 $(RM) $(LIBDIR)/libcupsimage.sl
175 $(RM) $(LIBDIR)/libcupsimage.sl.2
176 $(RM) $(LIBDIR)/libcupsimage.so
177 $(RM) $(LIBDIR)/libcupsimage.so.2
178 -$(RMDIR) $(LIBDIR)
757d2cad 179
180
b423cd4c 181#
182# Automatic API help files...
183#
184
185apihelp:
186 echo Generating CUPS API help files...
187 mxmldoc --section "Programming" --title "Raster API" \
5a738aea
MS
188 --css ../doc/cups-printable.css \
189 --header api-raster.header --intro api-raster.shtml \
f11a948a 190 api-raster.xml \
ac884b6a
MS
191 ../cups/raster.h interpret.c raster.c \
192 >../doc/help/api-raster.html
f11a948a
MS
193 mxmldoc --tokens help/api-raster.html api-raster.xml >../doc/help/api-raster.tokens
194 $(RM) api-raster.xml
8b450588
MS
195 mxmldoc --section "Programming" \
196 --title "Developing PostScript Printer Drivers" \
197 --css ../doc/cups-printable.css \
198 --header postscript-driver.header \
199 --intro postscript-driver.shtml \
200 >../doc/help/postscript-driver.html
201 mxmldoc --section "Programming" \
202 --title "Introduction to the PPD Compiler" \
203 --css ../doc/cups-printable.css \
204 --header ppd-compiler.header \
205 --intro ppd-compiler.shtml \
206 >../doc/help/ppd-compiler.html
207 mxmldoc --section "Programming" \
208 --title "Developing Raster Printer Drivers" \
209 --css ../doc/cups-printable.css \
210 --header raster-driver.header \
211 --intro raster-driver.shtml \
212 >../doc/help/raster-driver.html
10d09e33
MS
213 mxmldoc --section "Specifications" \
214 --title "CUPS PPD Extensions" \
215 --css ../doc/cups-printable.css \
216 --header spec-ppd.header \
217 --intro spec-ppd.shtml \
218 >../doc/help/spec-ppd.html
b423cd4c 219
5a738aea
MS
220framedhelp:
221 echo Generating CUPS API help files...
222 mxmldoc --section "Programming" --title "Raster API" \
223 --framed ../cups/api-raster \
224 --css ../doc/cups-printable.css \
225 --header api-raster.header --intro api-raster.shtml \
ac884b6a 226 ../cups/raster.h interpret.c raster.c
8b450588
MS
227 mxmldoc --section "Programming" \
228 --title "Developing PostScript Printer Drivers" \
229 --framed ../cups/postscript-driver \
230 --css ../doc/cups-printable.css \
231 --header postscript-driver.header \
232 --intro postscript-driver.shtml
233 mxmldoc --section "Programming" \
234 --title "Introduction to the PPD Compiler" \
235 --framed ../cups/ppd-compiler \
236 --css ../doc/cups-printable.css \
237 --header ppd-compiler.header \
238 --intro ppd-compiler.shtml
239 mxmldoc --section "Programming" \
240 --title "Developing Raster Printer Drivers" \
241 --framed ../cups/raster-driver \
242 --css ../doc/cups-printable.css \
243 --header raster-driver.header \
244 --intro raster-driver.shtml
10d09e33
MS
245 mxmldoc --section "Specifications" \
246 --title "CUPS PPD Extensions" \
247 --framed ../cups/spec-ppd \
248 --css ../doc/cups-printable.css \
249 --header spec-ppd.header \
250 --intro spec-ppd.shtml \
8b450588 251
b423cd4c 252
7a14d768
MS
253#
254# commandtops
255#
256
257commandtops: commandtops.o ../cups/$(LIBCUPS)
258 echo Linking $@...
259 $(CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS)
260
261
ef416fc2 262#
263# gziptoany
264#
265
266gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
267 echo Linking $@...
268 $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
269
270
ef416fc2 271#
272# libcupsimage.so.2, libcupsimage.sl.2
273#
274
275libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS)
276 echo Linking $@...
a74454a7 277 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \
83e08001 278 -L../cups $(LINKCUPS)
ef416fc2 279 $(RM) `basename $@ .2`
280 $(LN) $@ `basename $@ .2`
281
282
283#
284# libcupsimage.2.dylib
285#
286
355e94dc 287libcupsimage.2.dylib: $(IMAGEOBJS) $(LIBCUPSIMAGEORDER)
ef416fc2 288 echo Linking $@...
e1d6a774 289 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
fa73b229 290 -install_name $(libdir)/$@ \
f7deaa1a 291 -current_version 2.3.0 \
ef416fc2 292 -compatibility_version 2.0.0 \
83e08001 293 $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS)
ef416fc2 294 $(RM) libcupsimage.dylib
295 $(LN) $@ libcupsimage.dylib
296
297
298#
299# libcupsimage_s.a
300#
301
a74454a7 302libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp
ef416fc2 303 echo Linking $@...
e1d6a774 304 $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \
83e08001 305 -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS)
ef416fc2 306 $(RM) $@
307 $(AR) $(ARFLAGS) $@ libcupsimage_s.o
308
309
310#
311# libcupsimage.la
312#
313
314libcupsimage.la: $(IMAGEOBJS)
315 echo Linking $@...
e1d6a774 316 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
a74454a7 317 -L../cups $(LINKCUPS) \
f7deaa1a 318 -rpath $(LIBDIR) -version-info 2:3
ef416fc2 319
320
321#
322# libcupsimage.a
323#
324
325libcupsimage.a: $(IMAGEOBJS)
326 echo Archiving $@...
327 $(RM) $@
328 $(AR) $(ARFLAGS) $@ $(IMAGEOBJS)
329 $(RANLIB) $@
330
331
ef416fc2 332#
333# pstops
334#
335
336pstops: pstops.o common.o ../cups/$(LIBCUPS)
337 echo Linking $@...
83e08001 338 $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS)
ef416fc2 339
340
ef416fc2 341#
342# rastertoepson
343#
344
345rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
346 echo Linking $@...
347 $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
348
349
350#
351# rastertohp
352#
353
354rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
355 echo Linking $@...
356 $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
357
358
07ed0e9a
MS
359#
360# rastertolabel
361#
362
363rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
364 echo Linking $@...
365 $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
366
367
368#
369# rastertopwg
370#
371
372rastertopwg: rastertopwg.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
373 echo Linking $@...
374 $(CC) $(LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
375
376
ef416fc2 377#
378# testraster
379#
380
6d2f911b 381testraster: testraster.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
ef416fc2 382 echo Linking $@...
c9fc04c6 383 $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \
6d2f911b 384 ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
c168a833 385 $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
c9fc04c6
MS
386 echo Running raster API tests...
387 ./testraster
ef416fc2 388
389
ed486911 390#
391# rasterbench
392#
393
f7deaa1a 394rasterbench: rasterbench.o libcupsimage.a
ed486911 395 echo Linking $@...
f7deaa1a 396 $(CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS)
ed486911 397
398
ef416fc2 399#
400# Dependencies...
401#
07ed0e9a 402
ef416fc2 403include Dependencies
404
405
406#
f2d18633 407# End of "$Id$".
ef416fc2 408#