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.
46 IMAGEOBJS
= image-bmp.o image-colorspace.o image-gif.o image-jpeg.o \
47 image-photocd.o image-pix.o image-png.o image-pnm.o \
48 image-sgi.o image-sgilib.o image-sun.o image-tiff.o \
49 image-zoom.o image.o error.o interpret.o raster.o
50 IMAGE32OBJS
= $(IMAGEOBJS
:.o
=.32.o
)
51 IMAGE64OBJS
= $(IMAGEOBJS
:.o
=.64.o
)
53 bannertops.o commandtops.o gziptoany.o imagetops.o \
54 imagetoraster.o common.o pdftops.o pstext.o pstops.o \
55 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
56 rastertopwg.o testimage.o testraster.o textcommon.o texttops.o
67 # Make library targets...
77 unittests
: $(UNITTARGETS
)
81 # Clean all object files...
85 $(RM
) $(OBJS
) $(TARGETS
) $(UNITTARGETS
)
86 $(RM
) libcupsimage.so libcupsimage.sl libcupsimage.dylib
91 # Update dependencies (without system header dependencies...)
95 touch Dependencies.tmp
96 makedepend
-Y
-I..
-fDependencies.tmp
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
98 cp Dependencies.tmp Dependencies
99 sed
-E
-e
'1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp
>>Dependencies
100 sed
-E
-e
'1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp
>>Dependencies
101 $(RM
) Dependencies.tmp
105 # Install all targets...
108 install: all install-data install-headers install-libs install-exec
112 # Install data files...
119 # Install programs...
123 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/filter
124 for file in
$(FILTERS
); do \
125 $(INSTALL_BIN
) $$file $(SERVERBIN
)/filter; \
127 $(RM
) $(SERVERBIN
)/filter/rastertodymo
128 $(LN
) rastertolabel
$(SERVERBIN
)/filter/rastertodymo
129 if
test "x$(SYMROOT)" != "x"; then \
130 $(INSTALL_DIR
) $(SYMROOT
); \
131 for file in
$(FILTERS
); do \
132 cp
$$file $(SYMROOT
); \
142 $(INSTALL_DIR
) -m
755 $(INCLUDEDIR
)/cups
143 $(INSTALL_DATA
) image.h
$(INCLUDEDIR
)/cups
147 # Install libraries...
150 install-libs
: $(INSTALLSTATIC
) $(INSTALL32
) $(INSTALL64
)
151 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
152 $(INSTALL_LIB
) $(LIBCUPSIMAGE
) $(LIBDIR
)
153 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.so.2" -o
$(LIBCUPSIMAGE
) = "libcupsimage.sl.2"; then \
154 $(RM
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
155 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
157 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.2.dylib"; then \
158 $(RM
) $(LIBDIR
)/libcupsimage.dylib
; \
159 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/libcupsimage.dylib
; \
161 if
test "x$(SYMROOT)" != "x"; then \
162 $(INSTALL_DIR
) $(SYMROOT
); \
163 cp
$(LIBCUPSIMAGE
) $(SYMROOT
); \
167 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
168 $(INSTALL_LIB
) -m
755 libcupsimage.a
$(LIBDIR
)
169 $(RANLIB
) $(LIBDIR
)/libcupsimage.a
170 $(CHMOD
) 555 $(LIBDIR
)/libcupsimage.a
173 $(INSTALL_DIR
) -m
755 $(LIB32DIR
)
174 $(INSTALL_LIB
) 32bit
/libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
.2
175 $(LN
) libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
178 $(INSTALL_DIR
) -m
755 $(LIB64DIR
)
179 $(INSTALL_LIB
) 64bit
/libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
.2
180 $(LN
) libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
184 # Uninstall all targets...
187 uninstall: $(UNINSTALL32
) $(UNINSTALL64
)
188 for file in
$(FILTERS
); do \
189 $(RM
) $(SERVERBIN
)/filter/$$file; \
191 $(RM
) $(SERVERBIN
)/filter/rastertodymo
192 -$(RMDIR
) $(SERVERBIN
)/filter
193 -$(RMDIR
) $(SERVERBIN
)
194 $(RM
) $(LIBDIR
)/libcupsimage
.2.dylib
195 $(RM
) $(LIBDIR
)/libcupsimage.a
196 $(RM
) $(LIBDIR
)/libcupsimage.dylib
197 $(RM
) $(LIBDIR
)/libcupsimage_s.a
198 $(RM
) $(LIBDIR
)/libcupsimage.sl
199 $(RM
) $(LIBDIR
)/libcupsimage.sl
.2
200 $(RM
) $(LIBDIR
)/libcupsimage.so
201 $(RM
) $(LIBDIR
)/libcupsimage.so
.2
203 $(RM
) $(INCLUDEDIR
)/cups
/image.h
204 -$(RMDIR
) $(INCLUDEDIR
)/cups
207 $(RM
) $(LIB32DIR
)/libcupsimage.so
208 $(RM
) $(LIB32DIR
)/libcupsimage.so
.2
209 -$(RMDIR
) $(LIB32DIR
)
212 $(RM
) $(LIB64DIR
)/libcupsimage.so
213 $(RM
) $(LIB64DIR
)/libcupsimage.so
.2
214 -$(RMDIR
) $(LIB64DIR
)
218 # Automatic API help files...
222 echo Generating CUPS API help files...
223 mxmldoc
--section
"Programming" --title
"Raster API" \
224 --css ..
/doc
/cups-printable.css \
225 --header api-raster.header
--intro api-raster.shtml \
227 ..
/cups
/raster.h interpret.c raster.c \
228 >..
/doc
/help
/api-raster.html
229 mxmldoc
--tokens help
/api-raster.html api-raster.xml
>..
/doc
/help
/api-raster.tokens
231 mxmldoc
--section
"Programming" \
232 --title
"Developing PostScript Printer Drivers" \
233 --css ..
/doc
/cups-printable.css \
234 --header postscript-driver.header \
235 --intro postscript-driver.shtml \
236 >..
/doc
/help
/postscript-driver.html
237 mxmldoc
--section
"Programming" \
238 --title
"Introduction to the PPD Compiler" \
239 --css ..
/doc
/cups-printable.css \
240 --header ppd-compiler.header \
241 --intro ppd-compiler.shtml \
242 >..
/doc
/help
/ppd-compiler.html
243 mxmldoc
--section
"Programming" \
244 --title
"Developing Raster Printer Drivers" \
245 --css ..
/doc
/cups-printable.css \
246 --header raster-driver.header \
247 --intro raster-driver.shtml \
248 >..
/doc
/help
/raster-driver.html
249 mxmldoc
--section
"Specifications" \
250 --title
"CUPS PPD Extensions" \
251 --css ..
/doc
/cups-printable.css \
252 --header spec-ppd.header \
253 --intro spec-ppd.shtml \
254 >..
/doc
/help
/spec-ppd.html
257 echo Generating CUPS API help files...
258 mxmldoc
--section
"Programming" --title
"Raster API" \
259 --framed ..
/cups
/api-raster \
260 --css ..
/doc
/cups-printable.css \
261 --header api-raster.header
--intro api-raster.shtml \
262 ..
/cups
/raster.h interpret.c raster.c
263 mxmldoc
--section
"Programming" \
264 --title
"Developing PostScript Printer Drivers" \
265 --framed ..
/cups
/postscript-driver \
266 --css ..
/doc
/cups-printable.css \
267 --header postscript-driver.header \
268 --intro postscript-driver.shtml
269 mxmldoc
--section
"Programming" \
270 --title
"Introduction to the PPD Compiler" \
271 --framed ..
/cups
/ppd-compiler \
272 --css ..
/doc
/cups-printable.css \
273 --header ppd-compiler.header \
274 --intro ppd-compiler.shtml
275 mxmldoc
--section
"Programming" \
276 --title
"Developing Raster Printer Drivers" \
277 --framed ..
/cups
/raster-driver \
278 --css ..
/doc
/cups-printable.css \
279 --header raster-driver.header \
280 --intro raster-driver.shtml
281 mxmldoc
--section
"Specifications" \
282 --title
"CUPS PPD Extensions" \
283 --framed ..
/cups
/spec-ppd \
284 --css ..
/doc
/cups-printable.css \
285 --header spec-ppd.header \
286 --intro spec-ppd.shtml \
293 bannertops
: bannertops.o pstext.o common.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
295 $(CC
) $(LDFLAGS
) -o
$@ bannertops.o pstext.o common.o
$(LINKCUPSIMAGE
) \
303 commandtops
: commandtops.o ..
/cups
/$(LIBCUPS
)
305 $(CC
) $(LDFLAGS
) -o
$@ commandtops.o
$(LIBS
)
312 gziptoany
: gziptoany.o ..
/Makedefs ..
/cups
/$(LIBCUPS
)
314 $(CC
) $(LDFLAGS
) -o
$@ gziptoany.o
$(LIBZ
) $(LIBS
)
318 # libcupsimage.so.2, libcupsimage.sl.2
321 libcupsimage.so
.2 libcupsimage.sl
.2: $(IMAGEOBJS
)
323 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
) $(DSOLIBS
) \
324 -L..
/cups
$(LINKCUPS
) -lm
325 $(RM
) `basename $@ .2`
326 $(LN
) $@
`basename $@ .2`
330 # 32bit/libcupsimage.so.2
333 32bit
/libcupsimage.so
.2: $(IMAGE32OBJS
)
334 echo Linking
32-bit
$@...
336 $(DSO
) $(ARCH32FLAGS
) $(DSO32FLAGS
) -o
$@
$(IMAGE32OBJS
) $(DSOLIBS
) \
337 -L..
/cups
/32bit
$(LINKCUPS
) -lm
341 # 64bit/libcupsimage.so.2
344 64bit
/libcupsimage.so
.2: $(IMAGE64OBJS
)
345 echo Linking
64-bit
$@...
347 $(DSO
) $(ARCH64FLAGS
) $(DSO64FLAGS
) -o
$@
$(IMAGE64OBJS
) $(DSOLIBS
) \
348 -L..
/cups
/64bit
$(LINKCUPS
) -lm
352 # libcupsimage.2.dylib
355 libcupsimage
.2.dylib
: $(IMAGEOBJS
) $(LIBCUPSIMAGEORDER
)
357 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
358 -install_name
$(libdir)/$@ \
359 -current_version
2.3.0 \
360 -compatibility_version
2.0.0 \
361 $(IMAGEOBJS
) $(DSOLIBS
) -L..
/cups
$(LINKCUPS
) -lm
362 $(RM
) libcupsimage.dylib
363 $(LN
) $@ libcupsimage.dylib
370 libcupsimage_s.a
: $(IMAGEOBJS
) libcupsimage_s.exp
372 $(DSO
) $(DSOFLAGS
) -Wl
,-berok
,-bexport
:libcupsimage_s.exp \
373 -o libcupsimage_s.o
$(IMAGEOBJS
) $(DSOLIBS
) -lm
375 $(AR
) $(ARFLAGS
) $@ libcupsimage_s.o
382 libcupsimage.la
: $(IMAGEOBJS
)
384 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
:.o
=.lo
) $(DSOLIBS
) \
385 -L..
/cups
$(LINKCUPS
) \
386 -rpath
$(LIBDIR
) -version-info
2:3
393 libcupsimage.a
: $(IMAGEOBJS
)
396 $(AR
) $(ARFLAGS
) $@
$(IMAGEOBJS
)
404 testimage
: testimage.o libcupsimage.a ..
/Makedefs
406 $(CC
) $(LDFLAGS
) -o
$@ testimage.o libcupsimage.a \
407 $(IMGLIBS
) $(DSOLIBS
) $(LIBS
)
414 imagetops
: imagetops.o common.o
$(LIBCUPSIMAGE
) \
417 $(CC
) $(LDFLAGS
) -o
$@ imagetops.o common.o
$(LINKCUPSIMAGE
) \
425 imagetoraster
: imagetoraster.o common.o
$(LIBCUPSIMAGE
) \
428 $(CC
) $(LDFLAGS
) -o
$@ imagetoraster.o common.o
$(LINKCUPSIMAGE
) \
436 pstops
: pstops.o common.o ..
/cups
/$(LIBCUPS
)
438 $(CC
) $(LDFLAGS
) -o
$@ pstops.o common.o
$(LIBS
) -lm
445 pdftops
: pdftops.o common.o ..
/cups
/$(LIBCUPS
)
447 $(CC
) $(LDFLAGS
) -o
$@ pdftops.o common.o
$(LIBS
)
454 rastertoepson
: rastertoepson.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
456 $(CC
) $(LDFLAGS
) -o
$@ rastertoepson.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
463 rastertohp
: rastertohp.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
465 $(CC
) $(LDFLAGS
) -o
$@ rastertohp.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
472 rastertolabel
: rastertolabel.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
474 $(CC
) $(LDFLAGS
) -o
$@ rastertolabel.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
481 rastertopwg
: rastertopwg.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
483 $(CC
) $(LDFLAGS
) -o
$@ rastertopwg.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
490 testraster
: testraster.o ..
/cups
/$(LIBCUPSSTATIC
) libcupsimage.a
492 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o
$@ testraster.o libcupsimage.a \
493 ..
/cups
/$(LIBCUPSSTATIC
) $(IMGLIBS
) $(DSOLIBS
) $(COMMONLIBS
) \
494 $(SSLLIBS
) $(DNSSDLIBS
) $(LIBGSSAPI
)
495 echo Running raster API tests...
503 rasterbench
: rasterbench.o libcupsimage.a
505 $(CC
) $(LDFLAGS
) -o
$@ rasterbench.o libcupsimage.a
$(LIBS
)
512 texttops
: texttops.o textcommon.o common.o \
515 $(CC
) $(LDFLAGS
) -o
$@ texttops.o textcommon.o common.o
$(LIBS
)
526 # End of "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $".