4 # Filter makefile for CUPS.
6 # Copyright 2007-2011 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 touch Dependencies.tmp
82 makedepend
-Y
-I..
-fDependencies.tmp
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
84 cp Dependencies.tmp Dependencies
85 $(RM
) Dependencies.tmp
89 # Install all targets...
92 install: all install-data install-headers install-libs install-exec
96 # Install data files...
103 # Install programs...
107 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/filter
108 for file in
$(FILTERS
); do \
109 $(INSTALL_BIN
) $$file $(SERVERBIN
)/filter; \
111 $(RM
) $(SERVERBIN
)/filter/rastertodymo
112 $(LN
) rastertolabel
$(SERVERBIN
)/filter/rastertodymo
113 if
test "x$(SYMROOT)" != "x"; then \
114 $(INSTALL_DIR
) $(SYMROOT
); \
115 for file in
$(FILTERS
); do \
116 cp
$$file $(SYMROOT
); \
129 # Install libraries...
132 install-libs
: $(INSTALLSTATIC
)
133 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
134 $(INSTALL_LIB
) $(LIBCUPSIMAGE
) $(LIBDIR
)
135 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.so.2" -o
$(LIBCUPSIMAGE
) = "libcupsimage.sl.2"; then \
136 $(RM
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
137 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
139 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.2.dylib"; then \
140 $(RM
) $(LIBDIR
)/libcupsimage.dylib
; \
141 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/libcupsimage.dylib
; \
143 if
test "x$(SYMROOT)" != "x"; then \
144 $(INSTALL_DIR
) $(SYMROOT
); \
145 cp
$(LIBCUPSIMAGE
) $(SYMROOT
); \
149 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
150 $(INSTALL_LIB
) -m
755 libcupsimage.a
$(LIBDIR
)
151 $(RANLIB
) $(LIBDIR
)/libcupsimage.a
152 $(CHMOD
) 555 $(LIBDIR
)/libcupsimage.a
156 # Uninstall all targets...
160 for file in
$(FILTERS
); do \
161 $(RM
) $(SERVERBIN
)/filter/$$file; \
163 $(RM
) $(SERVERBIN
)/filter/rastertodymo
164 -$(RMDIR
) $(SERVERBIN
)/filter
165 -$(RMDIR
) $(SERVERBIN
)
166 $(RM
) $(LIBDIR
)/libcupsimage
.2.dylib
167 $(RM
) $(LIBDIR
)/libcupsimage.a
168 $(RM
) $(LIBDIR
)/libcupsimage.dylib
169 $(RM
) $(LIBDIR
)/libcupsimage_s.a
170 $(RM
) $(LIBDIR
)/libcupsimage.sl
171 $(RM
) $(LIBDIR
)/libcupsimage.sl
.2
172 $(RM
) $(LIBDIR
)/libcupsimage.so
173 $(RM
) $(LIBDIR
)/libcupsimage.so
.2
178 # Automatic API help files...
182 echo Generating CUPS API help files...
183 mxmldoc
--section
"Programming" --title
"Raster API" \
184 --css ..
/doc
/cups-printable.css \
185 --header api-raster.header
--intro api-raster.shtml \
187 ..
/cups
/raster.h interpret.c raster.c \
188 >..
/doc
/help
/api-raster.html
189 mxmldoc
--tokens help
/api-raster.html api-raster.xml
>..
/doc
/help
/api-raster.tokens
191 mxmldoc
--section
"Programming" \
192 --title
"Developing PostScript Printer Drivers" \
193 --css ..
/doc
/cups-printable.css \
194 --header postscript-driver.header \
195 --intro postscript-driver.shtml \
196 >..
/doc
/help
/postscript-driver.html
197 mxmldoc
--section
"Programming" \
198 --title
"Introduction to the PPD Compiler" \
199 --css ..
/doc
/cups-printable.css \
200 --header ppd-compiler.header \
201 --intro ppd-compiler.shtml \
202 >..
/doc
/help
/ppd-compiler.html
203 mxmldoc
--section
"Programming" \
204 --title
"Developing Raster Printer Drivers" \
205 --css ..
/doc
/cups-printable.css \
206 --header raster-driver.header \
207 --intro raster-driver.shtml \
208 >..
/doc
/help
/raster-driver.html
209 mxmldoc
--section
"Specifications" \
210 --title
"CUPS PPD Extensions" \
211 --css ..
/doc
/cups-printable.css \
212 --header spec-ppd.header \
213 --intro spec-ppd.shtml \
214 >..
/doc
/help
/spec-ppd.html
217 echo Generating CUPS API help files...
218 mxmldoc
--section
"Programming" --title
"Raster API" \
219 --framed ..
/cups
/api-raster \
220 --css ..
/doc
/cups-printable.css \
221 --header api-raster.header
--intro api-raster.shtml \
222 ..
/cups
/raster.h interpret.c raster.c
223 mxmldoc
--section
"Programming" \
224 --title
"Developing PostScript Printer Drivers" \
225 --framed ..
/cups
/postscript-driver \
226 --css ..
/doc
/cups-printable.css \
227 --header postscript-driver.header \
228 --intro postscript-driver.shtml
229 mxmldoc
--section
"Programming" \
230 --title
"Introduction to the PPD Compiler" \
231 --framed ..
/cups
/ppd-compiler \
232 --css ..
/doc
/cups-printable.css \
233 --header ppd-compiler.header \
234 --intro ppd-compiler.shtml
235 mxmldoc
--section
"Programming" \
236 --title
"Developing Raster Printer Drivers" \
237 --framed ..
/cups
/raster-driver \
238 --css ..
/doc
/cups-printable.css \
239 --header raster-driver.header \
240 --intro raster-driver.shtml
241 mxmldoc
--section
"Specifications" \
242 --title
"CUPS PPD Extensions" \
243 --framed ..
/cups
/spec-ppd \
244 --css ..
/doc
/cups-printable.css \
245 --header spec-ppd.header \
246 --intro spec-ppd.shtml \
253 commandtops
: commandtops.o ..
/cups
/$(LIBCUPS
)
255 $(CC
) $(LDFLAGS
) -o
$@ commandtops.o
$(LIBS
)
262 gziptoany
: gziptoany.o ..
/Makedefs ..
/cups
/$(LIBCUPS
)
264 $(CC
) $(LDFLAGS
) -o
$@ gziptoany.o
$(LIBZ
) $(LIBS
)
268 # libcupsimage.so.2, libcupsimage.sl.2
271 libcupsimage.so
.2 libcupsimage.sl
.2: $(IMAGEOBJS
)
273 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
) $(DSOLIBS
) \
274 -L..
/cups
$(LINKCUPS
)
275 $(RM
) `basename $@ .2`
276 $(LN
) $@
`basename $@ .2`
280 # libcupsimage.2.dylib
283 libcupsimage
.2.dylib
: $(IMAGEOBJS
) $(LIBCUPSIMAGEORDER
)
285 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
286 -install_name
$(libdir)/$@ \
287 -current_version
2.3.0 \
288 -compatibility_version
2.0.0 \
289 $(IMAGEOBJS
) $(DSOLIBS
) -L..
/cups
$(LINKCUPS
)
290 $(RM
) libcupsimage.dylib
291 $(LN
) $@ libcupsimage.dylib
298 libcupsimage_s.a
: $(IMAGEOBJS
) libcupsimage_s.exp
300 $(DSO
) $(DSOFLAGS
) -Wl
,-berok
,-bexport
:libcupsimage_s.exp \
301 -o libcupsimage_s.o
$(IMAGEOBJS
) $(DSOLIBS
)
303 $(AR
) $(ARFLAGS
) $@ libcupsimage_s.o
310 libcupsimage.la
: $(IMAGEOBJS
)
312 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
:.o
=.lo
) $(DSOLIBS
) \
313 -L..
/cups
$(LINKCUPS
) \
314 -rpath
$(LIBDIR
) -version-info
2:3
321 libcupsimage.a
: $(IMAGEOBJS
)
324 $(AR
) $(ARFLAGS
) $@
$(IMAGEOBJS
)
332 pstops
: pstops.o common.o ..
/cups
/$(LIBCUPS
)
334 $(CC
) $(LDFLAGS
) -o
$@ pstops.o common.o
$(LIBS
)
341 rastertoepson
: rastertoepson.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
343 $(CC
) $(LDFLAGS
) -o
$@ rastertoepson.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
350 rastertohp
: rastertohp.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
352 $(CC
) $(LDFLAGS
) -o
$@ rastertohp.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
359 rastertolabel
: rastertolabel.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
361 $(CC
) $(LDFLAGS
) -o
$@ rastertolabel.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
368 rastertopwg
: rastertopwg.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
370 $(CC
) $(LDFLAGS
) -o
$@ rastertopwg.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
377 testraster
: testraster.o ..
/cups
/$(LIBCUPSSTATIC
) libcupsimage.a
379 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o
$@ testraster.o libcupsimage.a \
380 ..
/cups
/$(LIBCUPSSTATIC
) $(IMGLIBS
) $(DSOLIBS
) $(COMMONLIBS
) \
381 $(SSLLIBS
) $(DNSSDLIBS
) $(LIBGSSAPI
)
382 echo Running raster API tests...
390 rasterbench
: rasterbench.o libcupsimage.a
392 $(CC
) $(LDFLAGS
) -o
$@ rasterbench.o libcupsimage.a
$(LIBS
)