4 # Filter makefile for CUPS.
6 # Copyright 2007-2012 by Apple Inc.
7 # Copyright 1997-2006 by Easy Software Products.
9 # These coded instructions, statements, and computer programs are the
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/".
15 # This file is subject to the Apple OS-Developed Software exception.
39 IMAGEOBJS
= error.o interpret.o raster.o
41 commandtops.o gziptoany.o common.o pstops.o \
42 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
43 rastertopwg.o testraster.o
54 # Make library targets...
64 unittests
: $(UNITTARGETS
)
68 # Clean all object files...
72 $(RM
) $(OBJS
) $(TARGETS
) $(UNITTARGETS
)
73 $(RM
) libcupsimage.so libcupsimage.sl libcupsimage.dylib
77 # Update dependencies (without system header dependencies...)
81 $(CC
) -MM
$(ALL_CFLAGS
) $(OBJS
:.o
=.c
) >Dependencies
85 # Install all targets...
88 install: all install-data install-headers install-libs install-exec
92 # Install data files...
103 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/filter
104 for file in
$(FILTERS
); do \
105 $(INSTALL_BIN
) $$file $(SERVERBIN
)/filter; \
107 $(RM
) $(SERVERBIN
)/filter/rastertodymo
108 $(LN
) rastertolabel
$(SERVERBIN
)/filter/rastertodymo
109 if
test "x$(SYMROOT)" != "x"; then \
110 $(INSTALL_DIR
) $(SYMROOT
); \
111 for file in
$(FILTERS
); do \
112 cp
$$file $(SYMROOT
); \
113 dsymutil
$(SYMROOT
)/$$file; \
126 # Install libraries...
129 install-libs
: $(INSTALLSTATIC
)
130 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
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`; \
136 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.2.dylib"; then \
137 $(RM
) $(LIBDIR
)/libcupsimage.dylib
; \
138 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/libcupsimage.dylib
; \
140 if
test "x$(SYMROOT)" != "x"; then \
141 $(INSTALL_DIR
) $(SYMROOT
); \
142 cp
$(LIBCUPSIMAGE
) $(SYMROOT
); \
143 dsymutil
$(SYMROOT
)/$(LIBCUPSIMAGE
); \
147 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
148 $(INSTALL_LIB
) -m
755 libcupsimage.a
$(LIBDIR
)
149 $(RANLIB
) $(LIBDIR
)/libcupsimage.a
150 $(CHMOD
) 555 $(LIBDIR
)/libcupsimage.a
154 # Uninstall all targets...
158 for file in
$(FILTERS
); do \
159 $(RM
) $(SERVERBIN
)/filter/$$file; \
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
176 # Automatic API help files...
180 echo Generating CUPS API help files...
181 mxmldoc
--section
"Programming" --title
"Raster API" \
182 --css ..
/doc
/cups-printable.css \
183 --header api-raster.header
--intro api-raster.shtml \
185 ..
/cups
/raster.h interpret.c raster.c \
186 >..
/doc
/help
/api-raster.html
187 mxmldoc
--tokens help
/api-raster.html api-raster.xml
>..
/doc
/help
/api-raster.tokens
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
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
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 \
220 ..
/cups
/raster.h interpret.c raster.c
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
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 \
251 commandtops
: commandtops.o ..
/cups
/$(LIBCUPS
)
253 $(CC
) $(LDFLAGS
) -o
$@ commandtops.o
$(LIBS
)
260 gziptoany
: gziptoany.o ..
/Makedefs ..
/cups
/$(LIBCUPS
)
262 $(CC
) $(LDFLAGS
) -o
$@ gziptoany.o
$(LIBZ
) $(LIBS
)
266 # libcupsimage.so.2, libcupsimage.sl.2
269 libcupsimage.so
.2 libcupsimage.sl
.2: $(IMAGEOBJS
)
271 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
) $(DSOLIBS
) \
272 -L..
/cups
$(LINKCUPS
)
273 $(RM
) `basename $@ .2`
274 $(LN
) $@
`basename $@ .2`
278 # libcupsimage.2.dylib
281 libcupsimage
.2.dylib
: $(IMAGEOBJS
) $(LIBCUPSIMAGEORDER
)
283 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
284 -install_name
$(libdir)/$@ \
285 -current_version
2.3.0 \
286 -compatibility_version
2.0.0 \
287 $(IMAGEOBJS
) $(DSOLIBS
) -L..
/cups
$(LINKCUPS
)
288 $(RM
) libcupsimage.dylib
289 $(LN
) $@ libcupsimage.dylib
296 libcupsimage_s.a
: $(IMAGEOBJS
) libcupsimage_s.exp
298 $(DSO
) $(DSOFLAGS
) -Wl
,-berok
,-bexport
:libcupsimage_s.exp \
299 -o libcupsimage_s.o
$(IMAGEOBJS
) $(DSOLIBS
)
301 $(AR
) $(ARFLAGS
) $@ libcupsimage_s.o
308 libcupsimage.la
: $(IMAGEOBJS
)
310 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
:.o
=.lo
) $(DSOLIBS
) \
311 -L..
/cups
$(LINKCUPS
) \
312 -rpath
$(LIBDIR
) -version-info
2:3
319 libcupsimage.a
: $(IMAGEOBJS
)
322 $(AR
) $(ARFLAGS
) $@
$(IMAGEOBJS
)
330 pstops
: pstops.o common.o ..
/cups
/$(LIBCUPS
)
332 $(CC
) $(LDFLAGS
) -o
$@ pstops.o common.o
$(LIBS
)
339 rastertoepson
: rastertoepson.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
341 $(CC
) $(LDFLAGS
) -o
$@ rastertoepson.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
348 rastertohp
: rastertohp.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
350 $(CC
) $(LDFLAGS
) -o
$@ rastertohp.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
357 rastertolabel
: rastertolabel.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
359 $(CC
) $(LDFLAGS
) -o
$@ rastertolabel.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
366 rastertopwg
: rastertopwg.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
368 $(CC
) $(LDFLAGS
) -o
$@ rastertopwg.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
375 testraster
: testraster.o ..
/cups
/$(LIBCUPSSTATIC
) libcupsimage.a
377 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o
$@ testraster.o libcupsimage.a \
378 ..
/cups
/$(LIBCUPSSTATIC
) $(IMGLIBS
) $(DSOLIBS
) $(COMMONLIBS
) \
379 $(SSLLIBS
) $(DNSSDLIBS
) $(LIBGSSAPI
)
380 echo Running raster API tests...
388 rasterbench
: rasterbench.o libcupsimage.a
390 $(CC
) $(LDFLAGS
) -o
$@ rasterbench.o libcupsimage.a
$(LIBS
)