2 # "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $"
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.
41 IMAGEOBJS
= error.o interpret.o raster.o
42 IMAGE32OBJS
= $(IMAGEOBJS
:.o
=.32.o
)
43 IMAGE64OBJS
= $(IMAGEOBJS
:.o
=.64.o
)
45 commandtops.o gziptoany.o common.o pstops.o \
46 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
47 rastertopwg.o testraster.o
58 # Make library targets...
68 unittests
: $(UNITTARGETS
)
72 # Clean all object files...
76 $(RM
) $(OBJS
) $(TARGETS
) $(UNITTARGETS
)
77 $(RM
) libcupsimage.so libcupsimage.sl libcupsimage.dylib
82 # Update dependencies (without system header dependencies...)
86 touch Dependencies.tmp
87 makedepend
-Y
-I..
-fDependencies.tmp
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
89 cp Dependencies.tmp Dependencies
90 sed
-E
-e
'1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp
>>Dependencies
91 sed
-E
-e
'1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp
>>Dependencies
92 $(RM
) Dependencies.tmp
96 # Install all targets...
99 install: all install-data install-headers install-libs install-exec
103 # Install data files...
110 # Install programs...
114 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/filter
115 for file in
$(FILTERS
); do \
116 $(INSTALL_BIN
) $$file $(SERVERBIN
)/filter; \
118 $(RM
) $(SERVERBIN
)/filter/rastertodymo
119 $(LN
) rastertolabel
$(SERVERBIN
)/filter/rastertodymo
120 if
test "x$(SYMROOT)" != "x"; then \
121 $(INSTALL_DIR
) $(SYMROOT
); \
122 for file in
$(FILTERS
); do \
123 cp
$$file $(SYMROOT
); \
136 # Install libraries...
139 install-libs
: $(INSTALLSTATIC
) $(INSTALL32
) $(INSTALL64
)
140 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
141 $(INSTALL_LIB
) $(LIBCUPSIMAGE
) $(LIBDIR
)
142 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.so.2" -o
$(LIBCUPSIMAGE
) = "libcupsimage.sl.2"; then \
143 $(RM
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
144 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
146 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.2.dylib"; then \
147 $(RM
) $(LIBDIR
)/libcupsimage.dylib
; \
148 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/libcupsimage.dylib
; \
150 if
test "x$(SYMROOT)" != "x"; then \
151 $(INSTALL_DIR
) $(SYMROOT
); \
152 cp
$(LIBCUPSIMAGE
) $(SYMROOT
); \
156 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
157 $(INSTALL_LIB
) -m
755 libcupsimage.a
$(LIBDIR
)
158 $(RANLIB
) $(LIBDIR
)/libcupsimage.a
159 $(CHMOD
) 555 $(LIBDIR
)/libcupsimage.a
162 $(INSTALL_DIR
) -m
755 $(LIB32DIR
)
163 $(INSTALL_LIB
) 32bit
/libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
.2
164 $(LN
) libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
167 $(INSTALL_DIR
) -m
755 $(LIB64DIR
)
168 $(INSTALL_LIB
) 64bit
/libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
.2
169 $(LN
) libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
173 # Uninstall all targets...
176 uninstall: $(UNINSTALL32
) $(UNINSTALL64
)
177 for file in
$(FILTERS
); do \
178 $(RM
) $(SERVERBIN
)/filter/$$file; \
180 $(RM
) $(SERVERBIN
)/filter/rastertodymo
181 -$(RMDIR
) $(SERVERBIN
)/filter
182 -$(RMDIR
) $(SERVERBIN
)
183 $(RM
) $(LIBDIR
)/libcupsimage
.2.dylib
184 $(RM
) $(LIBDIR
)/libcupsimage.a
185 $(RM
) $(LIBDIR
)/libcupsimage.dylib
186 $(RM
) $(LIBDIR
)/libcupsimage_s.a
187 $(RM
) $(LIBDIR
)/libcupsimage.sl
188 $(RM
) $(LIBDIR
)/libcupsimage.sl
.2
189 $(RM
) $(LIBDIR
)/libcupsimage.so
190 $(RM
) $(LIBDIR
)/libcupsimage.so
.2
194 $(RM
) $(LIB32DIR
)/libcupsimage.so
195 $(RM
) $(LIB32DIR
)/libcupsimage.so
.2
196 -$(RMDIR
) $(LIB32DIR
)
199 $(RM
) $(LIB64DIR
)/libcupsimage.so
200 $(RM
) $(LIB64DIR
)/libcupsimage.so
.2
201 -$(RMDIR
) $(LIB64DIR
)
205 # Automatic API help files...
209 echo Generating CUPS API help files...
210 mxmldoc
--section
"Programming" --title
"Raster API" \
211 --css ..
/doc
/cups-printable.css \
212 --header api-raster.header
--intro api-raster.shtml \
214 ..
/cups
/raster.h interpret.c raster.c \
215 >..
/doc
/help
/api-raster.html
216 mxmldoc
--tokens help
/api-raster.html api-raster.xml
>..
/doc
/help
/api-raster.tokens
218 mxmldoc
--section
"Programming" \
219 --title
"Developing PostScript Printer Drivers" \
220 --css ..
/doc
/cups-printable.css \
221 --header postscript-driver.header \
222 --intro postscript-driver.shtml \
223 >..
/doc
/help
/postscript-driver.html
224 mxmldoc
--section
"Programming" \
225 --title
"Introduction to the PPD Compiler" \
226 --css ..
/doc
/cups-printable.css \
227 --header ppd-compiler.header \
228 --intro ppd-compiler.shtml \
229 >..
/doc
/help
/ppd-compiler.html
230 mxmldoc
--section
"Programming" \
231 --title
"Developing Raster Printer Drivers" \
232 --css ..
/doc
/cups-printable.css \
233 --header raster-driver.header \
234 --intro raster-driver.shtml \
235 >..
/doc
/help
/raster-driver.html
236 mxmldoc
--section
"Specifications" \
237 --title
"CUPS PPD Extensions" \
238 --css ..
/doc
/cups-printable.css \
239 --header spec-ppd.header \
240 --intro spec-ppd.shtml \
241 >..
/doc
/help
/spec-ppd.html
244 echo Generating CUPS API help files...
245 mxmldoc
--section
"Programming" --title
"Raster API" \
246 --framed ..
/cups
/api-raster \
247 --css ..
/doc
/cups-printable.css \
248 --header api-raster.header
--intro api-raster.shtml \
249 ..
/cups
/raster.h interpret.c raster.c
250 mxmldoc
--section
"Programming" \
251 --title
"Developing PostScript Printer Drivers" \
252 --framed ..
/cups
/postscript-driver \
253 --css ..
/doc
/cups-printable.css \
254 --header postscript-driver.header \
255 --intro postscript-driver.shtml
256 mxmldoc
--section
"Programming" \
257 --title
"Introduction to the PPD Compiler" \
258 --framed ..
/cups
/ppd-compiler \
259 --css ..
/doc
/cups-printable.css \
260 --header ppd-compiler.header \
261 --intro ppd-compiler.shtml
262 mxmldoc
--section
"Programming" \
263 --title
"Developing Raster Printer Drivers" \
264 --framed ..
/cups
/raster-driver \
265 --css ..
/doc
/cups-printable.css \
266 --header raster-driver.header \
267 --intro raster-driver.shtml
268 mxmldoc
--section
"Specifications" \
269 --title
"CUPS PPD Extensions" \
270 --framed ..
/cups
/spec-ppd \
271 --css ..
/doc
/cups-printable.css \
272 --header spec-ppd.header \
273 --intro spec-ppd.shtml \
280 commandtops
: commandtops.o ..
/cups
/$(LIBCUPS
)
282 $(CC
) $(LDFLAGS
) -o
$@ commandtops.o
$(LIBS
)
289 gziptoany
: gziptoany.o ..
/Makedefs ..
/cups
/$(LIBCUPS
)
291 $(CC
) $(LDFLAGS
) -o
$@ gziptoany.o
$(LIBZ
) $(LIBS
)
295 # libcupsimage.so.2, libcupsimage.sl.2
298 libcupsimage.so
.2 libcupsimage.sl
.2: $(IMAGEOBJS
)
300 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
) $(DSOLIBS
) \
301 -L..
/cups
$(LINKCUPS
) -lm
302 $(RM
) `basename $@ .2`
303 $(LN
) $@
`basename $@ .2`
307 # 32bit/libcupsimage.so.2
310 32bit
/libcupsimage.so
.2: $(IMAGE32OBJS
)
311 echo Linking
32-bit
$@...
313 $(DSO
) $(ARCH32FLAGS
) $(DSO32FLAGS
) -o
$@
$(IMAGE32OBJS
) $(DSOLIBS
) \
314 -L..
/cups
/32bit
$(LINKCUPS
) -lm
318 # 64bit/libcupsimage.so.2
321 64bit
/libcupsimage.so
.2: $(IMAGE64OBJS
)
322 echo Linking
64-bit
$@...
324 $(DSO
) $(ARCH64FLAGS
) $(DSO64FLAGS
) -o
$@
$(IMAGE64OBJS
) $(DSOLIBS
) \
325 -L..
/cups
/64bit
$(LINKCUPS
) -lm
329 # libcupsimage.2.dylib
332 libcupsimage
.2.dylib
: $(IMAGEOBJS
) $(LIBCUPSIMAGEORDER
)
334 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
335 -install_name
$(libdir)/$@ \
336 -current_version
2.3.0 \
337 -compatibility_version
2.0.0 \
338 $(IMAGEOBJS
) $(DSOLIBS
) -L..
/cups
$(LINKCUPS
) -lm
339 $(RM
) libcupsimage.dylib
340 $(LN
) $@ libcupsimage.dylib
347 libcupsimage_s.a
: $(IMAGEOBJS
) libcupsimage_s.exp
349 $(DSO
) $(DSOFLAGS
) -Wl
,-berok
,-bexport
:libcupsimage_s.exp \
350 -o libcupsimage_s.o
$(IMAGEOBJS
) $(DSOLIBS
) -lm
352 $(AR
) $(ARFLAGS
) $@ libcupsimage_s.o
359 libcupsimage.la
: $(IMAGEOBJS
)
361 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
:.o
=.lo
) $(DSOLIBS
) \
362 -L..
/cups
$(LINKCUPS
) \
363 -rpath
$(LIBDIR
) -version-info
2:3
370 libcupsimage.a
: $(IMAGEOBJS
)
373 $(AR
) $(ARFLAGS
) $@
$(IMAGEOBJS
)
381 pstops
: pstops.o common.o ..
/cups
/$(LIBCUPS
)
383 $(CC
) $(LDFLAGS
) -o
$@ pstops.o common.o
$(LIBS
) -lm
390 rastertoepson
: rastertoepson.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
392 $(CC
) $(LDFLAGS
) -o
$@ rastertoepson.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
399 rastertohp
: rastertohp.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
401 $(CC
) $(LDFLAGS
) -o
$@ rastertohp.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
408 rastertolabel
: rastertolabel.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
410 $(CC
) $(LDFLAGS
) -o
$@ rastertolabel.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
417 rastertopwg
: rastertopwg.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
419 $(CC
) $(LDFLAGS
) -o
$@ rastertopwg.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
426 testraster
: testraster.o ..
/cups
/$(LIBCUPSSTATIC
) libcupsimage.a
428 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o
$@ testraster.o libcupsimage.a \
429 ..
/cups
/$(LIBCUPSSTATIC
) $(IMGLIBS
) $(DSOLIBS
) $(COMMONLIBS
) \
430 $(SSLLIBS
) $(DNSSDLIBS
) $(LIBGSSAPI
)
431 echo Running raster API tests...
439 rasterbench
: rasterbench.o libcupsimage.a
441 $(CC
) $(LDFLAGS
) -o
$@ rasterbench.o libcupsimage.a
$(LIBS
)
452 # End of "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $".