2 # "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $"
4 # Filter makefile for the Common UNIX Printing System (CUPS).
6 # Copyright 2007-2009 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 HPGLOBJS
= hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
47 hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
48 IMAGEOBJS
= image-bmp.o image-colorspace.o image-gif.o image-jpeg.o \
49 image-photocd.o image-pix.o image-png.o image-pnm.o \
50 image-sgi.o image-sgilib.o image-sun.o image-tiff.o \
51 image-zoom.o image.o error.o interpret.o raster.o
52 IMAGE32OBJS
= $(IMAGEOBJS
:.o
=.32.o
)
53 IMAGE64OBJS
= $(IMAGEOBJS
:.o
=.64.o
)
54 FORMOBJS
= form-attr.o form-main.o form-ps.o form-text.o form-tree.o
55 OBJS
= $(HPGLOBJS
) $(IMAGEOBJS
) $(FORMOBJS
) \
56 bannertops.o commandtops.o gziptoany.o imagetops.o \
57 imagetoraster.o common.o pdftops.o pstext.o pstops.o \
58 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
59 testimage.o testraster.o textcommon.o texttops.o
70 # Make library targets...
80 unittests
: $(UNITTARGETS
)
84 # Clean all object files...
88 $(RM
) $(OBJS
) $(TARGETS
) $(UNITTARGETS
)
89 $(RM
) libcupsimage.so libcupsimage.sl libcupsimage.dylib
94 # Update dependencies (without system header dependencies...)
98 touch Dependencies.tmp
99 makedepend
-Y
-I..
-fDependencies.tmp
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
101 cp Dependencies.tmp Dependencies
102 sed
-E
-e
'1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp
>>Dependencies
103 sed
-E
-e
'1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp
>>Dependencies
104 $(RM
) Dependencies.tmp
108 # Install all targets...
111 install: all install-data install-headers install-libs install-exec
115 # Install data files...
122 # Install programs...
126 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/filter
127 for file in
$(FILTERS
); do \
128 $(INSTALL_BIN
) $$file $(SERVERBIN
)/filter; \
130 $(RM
) $(SERVERBIN
)/filter/rastertodymo
131 $(LN
) rastertolabel
$(SERVERBIN
)/filter/rastertodymo
132 if
test "x$(SYMROOT)" != "x"; then \
133 $(INSTALL_DIR
) $(SYMROOT
); \
134 for file in
$(TARGETS
); do \
135 cp
$$file $(SYMROOT
); \
145 $(INSTALL_DIR
) -m
755 $(INCLUDEDIR
)/cups
146 $(INSTALL_DATA
) image.h
$(INCLUDEDIR
)/cups
150 # Install libraries...
153 install-libs
: $(INSTALLSTATIC
) $(INSTALL32
) $(INSTALL64
)
154 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
155 $(INSTALL_LIB
) $(LIBCUPSIMAGE
) $(LIBDIR
)
156 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.so.2" -o
$(LIBCUPSIMAGE
) = "libcupsimage.sl.2"; then \
157 $(RM
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
158 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
160 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.2.dylib"; then \
161 $(RM
) $(LIBDIR
)/libcupsimage.dylib
; \
162 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/libcupsimage.dylib
; \
166 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
167 $(INSTALL_LIB
) libcupsimage.a
$(LIBDIR
);
168 $(RANLIB
) $(LIBDIR
)/libcupsimage.a
;
171 $(INSTALL_DIR
) -m
755 $(LIB32DIR
)
172 $(INSTALL_LIB
) 32bit
/libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
.2
173 $(LN
) libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
176 $(INSTALL_DIR
) -m
755 $(LIB64DIR
)
177 $(INSTALL_LIB
) 64bit
/libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
.2
178 $(LN
) libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
182 # Uninstall all targets...
185 uninstall: $(UNINSTALL32
) $(UNINSTALL64
)
186 for file in
$(FILTERS
); do \
187 $(RM
) $(SERVERBIN
)/filter/$$file; \
189 $(RM
) $(SERVERBIN
)/filter/rastertodymo
190 -$(RMDIR
) $(SERVERBIN
)/filter
191 -$(RMDIR
) $(SERVERBIN
)
192 $(RM
) $(LIBDIR
)/libcupsimage
.2.dylib
193 $(RM
) $(LIBDIR
)/libcupsimage.a
194 $(RM
) $(LIBDIR
)/libcupsimage.dylib
195 $(RM
) $(LIBDIR
)/libcupsimage_s.a
196 $(RM
) $(LIBDIR
)/libcupsimage.sl
197 $(RM
) $(LIBDIR
)/libcupsimage.sl
.2
198 $(RM
) $(LIBDIR
)/libcupsimage.so
199 $(RM
) $(LIBDIR
)/libcupsimage.so
.2
201 $(RM
) $(INCLUDEDIR
)/cups
/image.h
202 -$(RMDIR
) $(INCLUDEDIR
)/cups
205 $(RM
) $(LIB32DIR
)/libcupsimage.so
206 $(RM
) $(LIB32DIR
)/libcupsimage.so
.2
207 -$(RMDIR
) $(LIB32DIR
)
210 $(RM
) $(LIB64DIR
)/libcupsimage.so
211 $(RM
) $(LIB64DIR
)/libcupsimage.so
.2
212 -$(RMDIR
) $(LIB64DIR
)
216 # Automatic API help files...
220 echo Generating CUPS API help files...
221 mxmldoc
--section
"Programming" --title
"Raster API" \
222 --css ..
/doc
/cups-printable.css \
223 --header api-raster.header
--intro api-raster.shtml \
224 ..
/cups
/raster.h interpret.c raster.c \
225 >..
/doc
/help
/api-raster.html
226 mxmldoc
--section
"Programming" \
227 --title
"Developing PostScript Printer Drivers" \
228 --css ..
/doc
/cups-printable.css \
229 --header postscript-driver.header \
230 --intro postscript-driver.shtml \
231 >..
/doc
/help
/postscript-driver.html
232 mxmldoc
--section
"Programming" \
233 --title
"Introduction to the PPD Compiler" \
234 --css ..
/doc
/cups-printable.css \
235 --header ppd-compiler.header \
236 --intro ppd-compiler.shtml \
237 >..
/doc
/help
/ppd-compiler.html
238 mxmldoc
--section
"Programming" \
239 --title
"Developing Raster Printer Drivers" \
240 --css ..
/doc
/cups-printable.css \
241 --header raster-driver.header \
242 --intro raster-driver.shtml \
243 >..
/doc
/help
/raster-driver.html
246 echo Generating CUPS API help files...
247 mxmldoc
--section
"Programming" --title
"Raster API" \
248 --framed ..
/cups
/api-raster \
249 --css ..
/doc
/cups-printable.css \
250 --header api-raster.header
--intro api-raster.shtml \
251 ..
/cups
/raster.h interpret.c raster.c
252 mxmldoc
--section
"Programming" \
253 --title
"Developing PostScript Printer Drivers" \
254 --framed ..
/cups
/postscript-driver \
255 --css ..
/doc
/cups-printable.css \
256 --header postscript-driver.header \
257 --intro postscript-driver.shtml
258 mxmldoc
--section
"Programming" \
259 --title
"Introduction to the PPD Compiler" \
260 --framed ..
/cups
/ppd-compiler \
261 --css ..
/doc
/cups-printable.css \
262 --header ppd-compiler.header \
263 --intro ppd-compiler.shtml
264 mxmldoc
--section
"Programming" \
265 --title
"Developing Raster Printer Drivers" \
266 --framed ..
/cups
/raster-driver \
267 --css ..
/doc
/cups-printable.css \
268 --header raster-driver.header \
269 --intro raster-driver.shtml
272 echo Generating CUPS API documentation sets...
273 ..
/tools
/makedocset
--docset org.cups.raster.docset \
274 --title
"Raster API" \
275 --header api-raster.header
--intro api-raster.shtml \
276 ..
/cups
/raster.h interpret.c raster.c
277 ..
/tools
/makedocset
--docset org.cups.postscript-driver.docset \
278 --title
"Developing PostScript Printer Drivers" \
279 --header postscript-driver.header \
280 --intro postscript-driver.shtml
281 ..
/tools
/makedocset
--docset org.cups.ppd-compiler.docset \
282 --title
"Introduction to the PPD Compiler" \
283 --header ppd-compiler.header \
284 --intro ppd-compiler.shtml
285 ..
/tools
/makedocset
--docset org.cups.raster-driver.docset \
286 --title
"Developing Raster Printer Drivers" \
287 --header raster-driver.header \
288 --intro raster-driver.shtml
295 bannertops
: bannertops.o pstext.o common.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
297 $(CC
) $(LDFLAGS
) -o
$@ bannertops.o pstext.o common.o
$(LINKCUPSIMAGE
) \
305 commandtops
: commandtops.o ..
/cups
/$(LIBCUPS
)
307 $(CC
) $(LDFLAGS
) -o
$@ commandtops.o
$(LIBS
)
314 formtops
: $(FORMOBJS
) common.o ..
/cups
/$(LIBCUPS
)
316 $(CC
) $(LDFLAGS
) -o
$@
$(FORMOBJS
) common.o
$(LIBS
) -lm
323 gziptoany
: gziptoany.o ..
/Makedefs ..
/cups
/$(LIBCUPS
)
325 $(CC
) $(LDFLAGS
) -o
$@ gziptoany.o
$(LIBZ
) $(LIBS
)
332 hpgltops
: $(HPGLOBJS
) common.o ..
/cups
/$(LIBCUPS
)
334 $(CC
) $(LDFLAGS
) -o
$@
$(HPGLOBJS
) common.o
$(LIBS
) -lm
338 # libcupsimage.so.2, libcupsimage.sl.2
341 libcupsimage.so
.2 libcupsimage.sl
.2: $(IMAGEOBJS
)
343 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
) $(DSOLIBS
) \
344 -L..
/cups
$(LINKCUPS
) -lm
345 $(RM
) `basename $@ .2`
346 $(LN
) $@
`basename $@ .2`
350 # 32bit/libcupsimage.so.2
353 32bit
/libcupsimage.so
.2: $(IMAGE32OBJS
)
354 echo Linking
32-bit
$@...
356 $(DSO
) $(ARCH32FLAGS
) $(DSO32FLAGS
) -o
$@
$(IMAGE32OBJS
) $(DSOLIBS
) \
357 -L..
/cups
/32bit
$(LINKCUPS
) -lm
361 # 64bit/libcupsimage.so.2
364 64bit
/libcupsimage.so
.2: $(IMAGE64OBJS
)
365 echo Linking
64-bit
$@...
367 $(DSO
) $(ARCH64FLAGS
) $(DSO64FLAGS
) -o
$@
$(IMAGE64OBJS
) $(DSOLIBS
) \
368 -L..
/cups
/64bit
$(LINKCUPS
) -lm
372 # libcupsimage.2.dylib
375 libcupsimage
.2.dylib
: $(IMAGEOBJS
) $(LIBCUPSIMAGEORDER
)
377 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
378 -install_name
$(libdir)/$@ \
379 -current_version
2.3.0 \
380 -compatibility_version
2.0.0 \
381 -sectorder __TEXT __text
$(LIBCUPSIMAGEORDER
) \
382 $(IMAGEOBJS
) $(DSOLIBS
) -L..
/cups
$(LINKCUPS
) -lm
383 $(RM
) libcupsimage.dylib
384 $(LN
) $@ libcupsimage.dylib
391 libcupsimage_s.a
: $(IMAGEOBJS
) libcupsimage_s.exp
393 $(DSO
) $(DSOFLAGS
) -Wl
,-berok
,-bexport
:libcupsimage_s.exp \
394 -o libcupsimage_s.o
$(IMAGEOBJS
) $(DSOLIBS
) -lm
396 $(AR
) $(ARFLAGS
) $@ libcupsimage_s.o
403 libcupsimage.la
: $(IMAGEOBJS
)
405 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
:.o
=.lo
) $(DSOLIBS
) \
406 -L..
/cups
$(LINKCUPS
) \
407 -rpath
$(LIBDIR
) -version-info
2:3
414 libcupsimage.a
: $(IMAGEOBJS
)
417 $(AR
) $(ARFLAGS
) $@
$(IMAGEOBJS
)
425 testimage
: testimage.o libcupsimage.a ..
/Makedefs
427 $(CC
) $(LDFLAGS
) -o
$@ testimage.o libcupsimage.a \
428 $(IMGLIBS
) $(DSOLIBS
) $(LIBS
)
435 imagetops
: imagetops.o common.o
$(LIBCUPSIMAGE
) \
438 $(CC
) $(LDFLAGS
) -o
$@ imagetops.o common.o
$(LINKCUPSIMAGE
) \
446 imagetoraster
: imagetoraster.o common.o
$(LIBCUPSIMAGE
) \
449 $(CC
) $(LDFLAGS
) -o
$@ imagetoraster.o common.o
$(LINKCUPSIMAGE
) \
457 pstops
: pstops.o common.o ..
/cups
/$(LIBCUPS
)
459 $(CC
) $(LDFLAGS
) -o
$@ pstops.o common.o
$(LIBS
) -lm
466 pdftops
: pdftops.o common.o ..
/cups
/$(LIBCUPS
)
468 $(CC
) $(LDFLAGS
) -o
$@ pdftops.o common.o
$(LIBS
)
475 rastertolabel
: rastertolabel.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
477 $(CC
) $(LDFLAGS
) -o
$@ rastertolabel.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
484 rastertoepson
: rastertoepson.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
486 $(CC
) $(LDFLAGS
) -o
$@ rastertoepson.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
493 rastertohp
: rastertohp.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
495 $(CC
) $(LDFLAGS
) -o
$@ rastertohp.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
502 testraster
: testraster.o ..
/cups
/libcups.a libcupsimage.a
504 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o
$@ testraster.o libcupsimage.a \
505 ..
/cups
/libcups.a
$(IMGLIBS
) $(DSOLIBS
) $(COMMONLIBS
) \
506 $(SSLLIBS
) $(DNSSDLIBS
) $(LIBGSSAPI
)
507 echo Running raster API tests...
515 rasterbench
: rasterbench.o libcupsimage.a
517 $(CC
) $(LDFLAGS
) -o
$@ rasterbench.o libcupsimage.a
$(LIBS
)
524 texttops
: texttops.o textcommon.o common.o \
527 $(CC
) $(LDFLAGS
) -o
$@ texttops.o textcommon.o common.o
$(LIBS
)
538 # End of "$Id: Makefile 7871 2008-08-27 21:12:43Z mike $".