]> git.ipfire.org Git - thirdparty/cups.git/blame - filter/Makefile
Import CUPS v1.7.1
[thirdparty/cups.git] / filter / Makefile
CommitLineData
ef416fc2 1#
61515785 2# "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $"
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; \
139 fi
f8b3a85b
MS
140 if test "x$(SYMROOT)" != "x"; then \
141 $(INSTALL_DIR) $(SYMROOT); \
142 cp $(LIBCUPSIMAGE) $(SYMROOT); \
0fa6c7fa 143 dsymutil $(SYMROOT)/$(LIBCUPSIMAGE); \
f8b3a85b 144 fi
923edb68 145
146installstatic:
147 $(INSTALL_DIR) -m 755 $(LIBDIR)
97c9a8d7
MS
148 $(INSTALL_LIB) -m 755 libcupsimage.a $(LIBDIR)
149 $(RANLIB) $(LIBDIR)/libcupsimage.a
150 $(CHMOD) 555 $(LIBDIR)/libcupsimage.a
ef416fc2 151
ef416fc2 152
757d2cad 153#
154# Uninstall all targets...
155#
156
12f89d24 157uninstall:
757d2cad 158 for file in $(FILTERS); do \
159 $(RM) $(SERVERBIN)/filter/$$file; \
160 done
161 $(RM) $(SERVERBIN)/filter/rastertodymo
162 -$(RMDIR) $(SERVERBIN)/filter
163 -$(RMDIR) $(SERVERBIN)
164 $(RM) $(LIBDIR)/libcupsimage.2.dylib
165 $(RM) $(LIBDIR)/libcupsimage.a
166 $(RM) $(LIBDIR)/libcupsimage.dylib
167 $(RM) $(LIBDIR)/libcupsimage_s.a
168 $(RM) $(LIBDIR)/libcupsimage.sl
169 $(RM) $(LIBDIR)/libcupsimage.sl.2
170 $(RM) $(LIBDIR)/libcupsimage.so
171 $(RM) $(LIBDIR)/libcupsimage.so.2
172 -$(RMDIR) $(LIBDIR)
757d2cad 173
174
b423cd4c 175#
176# Automatic API help files...
177#
178
179apihelp:
180 echo Generating CUPS API help files...
181 mxmldoc --section "Programming" --title "Raster API" \
5a738aea
MS
182 --css ../doc/cups-printable.css \
183 --header api-raster.header --intro api-raster.shtml \
f11a948a 184 api-raster.xml \
ac884b6a
MS
185 ../cups/raster.h interpret.c raster.c \
186 >../doc/help/api-raster.html
f11a948a
MS
187 mxmldoc --tokens help/api-raster.html api-raster.xml >../doc/help/api-raster.tokens
188 $(RM) api-raster.xml
8b450588
MS
189 mxmldoc --section "Programming" \
190 --title "Developing PostScript Printer Drivers" \
191 --css ../doc/cups-printable.css \
192 --header postscript-driver.header \
193 --intro postscript-driver.shtml \
194 >../doc/help/postscript-driver.html
195 mxmldoc --section "Programming" \
196 --title "Introduction to the PPD Compiler" \
197 --css ../doc/cups-printable.css \
198 --header ppd-compiler.header \
199 --intro ppd-compiler.shtml \
200 >../doc/help/ppd-compiler.html
201 mxmldoc --section "Programming" \
202 --title "Developing Raster Printer Drivers" \
203 --css ../doc/cups-printable.css \
204 --header raster-driver.header \
205 --intro raster-driver.shtml \
206 >../doc/help/raster-driver.html
10d09e33
MS
207 mxmldoc --section "Specifications" \
208 --title "CUPS PPD Extensions" \
209 --css ../doc/cups-printable.css \
210 --header spec-ppd.header \
211 --intro spec-ppd.shtml \
212 >../doc/help/spec-ppd.html
b423cd4c 213
5a738aea
MS
214framedhelp:
215 echo Generating CUPS API help files...
216 mxmldoc --section "Programming" --title "Raster API" \
217 --framed ../cups/api-raster \
218 --css ../doc/cups-printable.css \
219 --header api-raster.header --intro api-raster.shtml \
ac884b6a 220 ../cups/raster.h interpret.c raster.c
8b450588
MS
221 mxmldoc --section "Programming" \
222 --title "Developing PostScript Printer Drivers" \
223 --framed ../cups/postscript-driver \
224 --css ../doc/cups-printable.css \
225 --header postscript-driver.header \
226 --intro postscript-driver.shtml
227 mxmldoc --section "Programming" \
228 --title "Introduction to the PPD Compiler" \
229 --framed ../cups/ppd-compiler \
230 --css ../doc/cups-printable.css \
231 --header ppd-compiler.header \
232 --intro ppd-compiler.shtml
233 mxmldoc --section "Programming" \
234 --title "Developing Raster Printer Drivers" \
235 --framed ../cups/raster-driver \
236 --css ../doc/cups-printable.css \
237 --header raster-driver.header \
238 --intro raster-driver.shtml
10d09e33
MS
239 mxmldoc --section "Specifications" \
240 --title "CUPS PPD Extensions" \
241 --framed ../cups/spec-ppd \
242 --css ../doc/cups-printable.css \
243 --header spec-ppd.header \
244 --intro spec-ppd.shtml \
8b450588 245
b423cd4c 246
7a14d768
MS
247#
248# commandtops
249#
250
251commandtops: commandtops.o ../cups/$(LIBCUPS)
252 echo Linking $@...
253 $(CC) $(LDFLAGS) -o $@ commandtops.o $(LIBS)
254
255
ef416fc2 256#
257# gziptoany
258#
259
260gziptoany: gziptoany.o ../Makedefs ../cups/$(LIBCUPS)
261 echo Linking $@...
262 $(CC) $(LDFLAGS) -o $@ gziptoany.o $(LIBZ) $(LIBS)
263
264
ef416fc2 265#
266# libcupsimage.so.2, libcupsimage.sl.2
267#
268
269libcupsimage.so.2 libcupsimage.sl.2: $(IMAGEOBJS)
270 echo Linking $@...
a74454a7 271 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS) $(DSOLIBS) \
83e08001 272 -L../cups $(LINKCUPS)
ef416fc2 273 $(RM) `basename $@ .2`
274 $(LN) $@ `basename $@ .2`
275
276
277#
278# libcupsimage.2.dylib
279#
280
355e94dc 281libcupsimage.2.dylib: $(IMAGEOBJS) $(LIBCUPSIMAGEORDER)
ef416fc2 282 echo Linking $@...
e1d6a774 283 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ \
fa73b229 284 -install_name $(libdir)/$@ \
f7deaa1a 285 -current_version 2.3.0 \
ef416fc2 286 -compatibility_version 2.0.0 \
83e08001 287 $(IMAGEOBJS) $(DSOLIBS) -L../cups $(LINKCUPS)
ef416fc2 288 $(RM) libcupsimage.dylib
289 $(LN) $@ libcupsimage.dylib
290
291
292#
293# libcupsimage_s.a
294#
295
a74454a7 296libcupsimage_s.a: $(IMAGEOBJS) libcupsimage_s.exp
ef416fc2 297 echo Linking $@...
e1d6a774 298 $(DSO) $(DSOFLAGS) -Wl,-berok,-bexport:libcupsimage_s.exp \
83e08001 299 -o libcupsimage_s.o $(IMAGEOBJS) $(DSOLIBS)
ef416fc2 300 $(RM) $@
301 $(AR) $(ARFLAGS) $@ libcupsimage_s.o
302
303
304#
305# libcupsimage.la
306#
307
308libcupsimage.la: $(IMAGEOBJS)
309 echo Linking $@...
e1d6a774 310 $(DSO) $(ARCHFLAGS) $(DSOFLAGS) -o $@ $(IMAGEOBJS:.o=.lo) $(DSOLIBS) \
a74454a7 311 -L../cups $(LINKCUPS) \
f7deaa1a 312 -rpath $(LIBDIR) -version-info 2:3
ef416fc2 313
314
315#
316# libcupsimage.a
317#
318
319libcupsimage.a: $(IMAGEOBJS)
320 echo Archiving $@...
321 $(RM) $@
322 $(AR) $(ARFLAGS) $@ $(IMAGEOBJS)
323 $(RANLIB) $@
324
325
ef416fc2 326#
327# pstops
328#
329
330pstops: pstops.o common.o ../cups/$(LIBCUPS)
331 echo Linking $@...
83e08001 332 $(CC) $(LDFLAGS) -o $@ pstops.o common.o $(LIBS)
ef416fc2 333
334
ef416fc2 335#
336# rastertoepson
337#
338
339rastertoepson: rastertoepson.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
340 echo Linking $@...
341 $(CC) $(LDFLAGS) -o $@ rastertoepson.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
342
343
344#
345# rastertohp
346#
347
348rastertohp: rastertohp.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
349 echo Linking $@...
350 $(CC) $(LDFLAGS) -o $@ rastertohp.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
351
352
07ed0e9a
MS
353#
354# rastertolabel
355#
356
357rastertolabel: rastertolabel.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
358 echo Linking $@...
359 $(CC) $(LDFLAGS) -o $@ rastertolabel.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
360
361
362#
363# rastertopwg
364#
365
366rastertopwg: rastertopwg.o ../cups/$(LIBCUPS) $(LIBCUPSIMAGE)
367 echo Linking $@...
368 $(CC) $(LDFLAGS) -o $@ rastertopwg.o $(LINKCUPSIMAGE) $(IMGLIBS) $(LIBS)
369
370
ef416fc2 371#
372# testraster
373#
374
6d2f911b 375testraster: testraster.o ../cups/$(LIBCUPSSTATIC) libcupsimage.a
ef416fc2 376 echo Linking $@...
c9fc04c6 377 $(CC) $(ARCHFLAGS) $(LDFLAGS) -o $@ testraster.o libcupsimage.a \
6d2f911b 378 ../cups/$(LIBCUPSSTATIC) $(IMGLIBS) $(DSOLIBS) $(COMMONLIBS) \
c168a833 379 $(SSLLIBS) $(DNSSDLIBS) $(LIBGSSAPI)
c9fc04c6
MS
380 echo Running raster API tests...
381 ./testraster
ef416fc2 382
383
ed486911 384#
385# rasterbench
386#
387
f7deaa1a 388rasterbench: rasterbench.o libcupsimage.a
ed486911 389 echo Linking $@...
f7deaa1a 390 $(CC) $(LDFLAGS) -o $@ rasterbench.o libcupsimage.a $(LIBS)
ed486911 391
392
ef416fc2 393#
394# Dependencies...
395#
07ed0e9a 396
ef416fc2 397include Dependencies
398
399
400#
61515785 401# End of "$Id: Makefile 10996 2013-05-29 11:51:34Z msweet $".
ef416fc2 402#