2 # "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $"
4 # Filter makefile for the Common UNIX Printing System (CUPS).
6 # Copyright 2007-2008 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.
21 FILTERS
= gziptoany hpgltops texttops pstops
$(IMGFILTERS
) \
22 $(PDFTOPS
) rastertolabel rastertoepson rastertohp
23 TARGETS
= $(FILTERS
) \
32 HPGLOBJS
= hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
33 hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
34 IMAGEOBJS
= image-bmp.o image-colorspace.o image-gif.o image-jpeg.o \
35 image-photocd.o image-pix.o image-png.o image-pnm.o \
36 image-sgi.o image-sgilib.o image-sun.o image-tiff.o \
37 image-zoom.o image.o error.o interpret.o raster.o
38 IMAGE32OBJS
= $(IMAGEOBJS
:.o
=.32.o
)
39 IMAGE64OBJS
= $(IMAGEOBJS
:.o
=.64.o
)
40 FORMOBJS
= form-attr.o form-main.o form-ps.o form-text.o form-tree.o
41 OBJS
= $(HPGLOBJS
) $(IMAGEOBJS
) $(FORMOBJS
) \
42 gziptoany.o imagetops.o imagetoraster.o common.o \
44 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
45 testimage.o testraster.o textcommon.o texttops.o
56 # Clean all object files...
60 $(RM
) $(OBJS
) $(TARGETS
)
61 $(RM
) libcupsimage.so libcupsimage.sl libcupsimage.dylib
66 # Update dependencies (without system header dependencies...)
70 touch Dependencies.tmp
71 makedepend
-Y
-I..
-fDependencies.tmp
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
73 cp Dependencies.tmp Dependencies
74 sed
-E
-e
'1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp
>>Dependencies
75 sed
-E
-e
'1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp
>>Dependencies
76 $(RM
) Dependencies.tmp
80 # Install all targets...
83 install: all install-data install-headers install-libs install-exec
87 # Install data files...
98 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/filter
99 for file in
$(FILTERS
); do \
100 $(INSTALL_BIN
) $$file $(SERVERBIN
)/filter; \
102 $(RM
) $(SERVERBIN
)/filter/rastertodymo
103 $(LN
) rastertolabel
$(SERVERBIN
)/filter/rastertodymo
104 if
test "x$(SYMROOT)" != "x"; then \
105 $(INSTALL_DIR
) $(SYMROOT
); \
106 for file in
$(TARGETS
); do \
107 cp
$$file $(SYMROOT
); \
117 $(INSTALL_DIR
) -m
755 $(INCLUDEDIR
)/cups
118 $(INSTALL_DATA
) image.h
$(INCLUDEDIR
)/cups
122 # Install libraries...
125 install-libs
: $(INSTALLSTATIC
) $(INSTALL32
) $(INSTALL64
)
126 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
127 $(INSTALL_LIB
) $(LIBCUPSIMAGE
) $(LIBDIR
)
128 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.so.2" -o
$(LIBCUPSIMAGE
) = "libcupsimage.sl.2"; then \
129 $(RM
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
130 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
132 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.2.dylib"; then \
133 $(STRIP
) -x
$(LIBDIR
)/$(LIBCUPSIMAGE
); \
134 $(RM
) $(LIBDIR
)/libcupsimage.dylib
; \
135 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/libcupsimage.dylib
; \
139 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
140 $(INSTALL_LIB
) libcupsimage.a
$(LIBDIR
);
141 $(RANLIB
) $(LIBDIR
)/libcupsimage.a
;
144 $(INSTALL_DIR
) -m
755 $(LIB32DIR
)
145 $(INSTALL_LIB
) 32bit
/libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
.2
146 $(LN
) libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
149 $(INSTALL_DIR
) -m
755 $(LIB64DIR
)
150 $(INSTALL_LIB
) 64bit
/libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
.2
151 $(LN
) libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
155 # Uninstall all targets...
158 uninstall: $(UNINSTALL32
) $(UNINSTALL64
)
159 for file in
$(FILTERS
); do \
160 $(RM
) $(SERVERBIN
)/filter/$$file; \
162 $(RM
) $(SERVERBIN
)/filter/rastertodymo
163 -$(RMDIR
) $(SERVERBIN
)/filter
164 -$(RMDIR
) $(SERVERBIN
)
165 $(RM
) $(LIBDIR
)/libcupsimage
.2.dylib
166 $(RM
) $(LIBDIR
)/libcupsimage.a
167 $(RM
) $(LIBDIR
)/libcupsimage.dylib
168 $(RM
) $(LIBDIR
)/libcupsimage_s.a
169 $(RM
) $(LIBDIR
)/libcupsimage.sl
170 $(RM
) $(LIBDIR
)/libcupsimage.sl
.2
171 $(RM
) $(LIBDIR
)/libcupsimage.so
172 $(RM
) $(LIBDIR
)/libcupsimage.so
.2
174 $(RM
) $(INCLUDEDIR
)/cups
/image.h
175 -$(RMDIR
) $(INCLUDEDIR
)/cups
178 $(RM
) $(LIB32DIR
)/libcupsimage.so
179 $(RM
) $(LIB32DIR
)/libcupsimage.so
.2
180 -$(RMDIR
) $(LIB32DIR
)
183 $(RM
) $(LIB64DIR
)/libcupsimage.so
184 $(RM
) $(LIB64DIR
)/libcupsimage.so
.2
185 -$(RMDIR
) $(LIB64DIR
)
189 # Automatic API help files...
193 echo Generating CUPS API help files...
194 mxmldoc
--section
"Programming" --title
"Raster API" \
195 --css ..
/doc
/cups-printable.css \
196 --header api-raster.header
--intro api-raster.shtml \
197 ..
/cups
/raster.h interpret.c raster.c \
198 >..
/doc
/help
/api-raster.html
201 echo Generating CUPS API help files...
202 mxmldoc
--section
"Programming" --title
"Raster API" \
203 --framed ..
/cups
/api-raster \
204 --css ..
/doc
/cups-printable.css \
205 --header api-raster.header
--intro api-raster.shtml \
206 ..
/cups
/raster.h interpret.c raster.c
213 formtops
: $(FORMOBJS
) common.o ..
/cups
/$(LIBCUPS
)
215 $(CC
) $(LDFLAGS
) -o
$@
$(FORMOBJS
) common.o
$(LIBS
) -lm
222 gziptoany
: gziptoany.o ..
/Makedefs ..
/cups
/$(LIBCUPS
)
224 $(CC
) $(LDFLAGS
) -o
$@ gziptoany.o
$(LIBZ
) $(LIBS
)
231 hpgltops
: $(HPGLOBJS
) common.o ..
/cups
/$(LIBCUPS
)
233 $(CC
) $(LDFLAGS
) -o
$@
$(HPGLOBJS
) common.o
$(LIBS
) -lm
237 # libcupsimage.so.2, libcupsimage.sl.2
240 libcupsimage.so
.2 libcupsimage.sl
.2: $(IMAGEOBJS
)
242 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
) $(DSOLIBS
) \
243 -L..
/cups
$(LINKCUPS
) -lm
244 $(RM
) `basename $@ .2`
245 $(LN
) $@
`basename $@ .2`
249 # 32bit/libcupsimage.so.2
252 32bit
/libcupsimage.so
.2: $(IMAGE32OBJS
)
253 echo Linking
32-bit
$@...
255 $(DSO
) $(ARCH32FLAGS
) $(DSO32FLAGS
) -o
$@
$(IMAGE32OBJS
) $(DSOLIBS
) \
256 -L..
/cups
/32bit
$(LINKCUPS
) -lm
260 # 64bit/libcupsimage.so.2
263 64bit
/libcupsimage.so
.2: $(IMAGE64OBJS
)
264 echo Linking
64-bit
$@...
266 $(DSO
) $(ARCH64FLAGS
) $(DSO64FLAGS
) -o
$@
$(IMAGE64OBJS
) $(DSOLIBS
) \
267 -L..
/cups
/64bit
$(LINKCUPS
) -lm
271 # libcupsimage.2.dylib
274 libcupsimage
.2.dylib
: $(IMAGEOBJS
) $(LIBCUPSIMAGEORDER
)
276 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
277 -install_name
$(libdir)/$@ \
278 -current_version
2.3.0 \
279 -compatibility_version
2.0.0 \
280 -sectorder __TEXT __text
$(LIBCUPSIMAGEORDER
) \
281 $(IMAGEOBJS
) $(DSOLIBS
) -L..
/cups
$(LINKCUPS
) -lm
282 $(RM
) libcupsimage.dylib
283 $(LN
) $@ libcupsimage.dylib
290 libcupsimage_s.a
: $(IMAGEOBJS
) libcupsimage_s.exp
292 $(DSO
) $(DSOFLAGS
) -Wl
,-berok
,-bexport
:libcupsimage_s.exp \
293 -o libcupsimage_s.o
$(IMAGEOBJS
) $(DSOLIBS
) -lm
295 $(AR
) $(ARFLAGS
) $@ libcupsimage_s.o
302 libcupsimage.la
: $(IMAGEOBJS
)
304 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
:.o
=.lo
) $(DSOLIBS
) \
305 -L..
/cups
$(LINKCUPS
) \
306 -rpath
$(LIBDIR
) -version-info
2:3
313 libcupsimage.a
: $(IMAGEOBJS
)
316 $(AR
) $(ARFLAGS
) $@
$(IMAGEOBJS
)
324 testimage
: testimage.o libcupsimage.a ..
/Makedefs
326 $(CC
) $(LDFLAGS
) -o
$@ testimage.o libcupsimage.a \
327 $(IMGLIBS
) $(DSOLIBS
) $(LIBS
)
334 imagetops
: imagetops.o common.o
$(LIBCUPSIMAGE
) \
337 $(CC
) $(LDFLAGS
) -o
$@ imagetops.o common.o
$(LINKCUPSIMAGE
) \
345 imagetoraster
: imagetoraster.o common.o
$(LIBCUPSIMAGE
) \
348 $(CC
) $(LDFLAGS
) -o
$@ imagetoraster.o common.o
$(LINKCUPSIMAGE
) \
356 pstops
: pstops.o common.o ..
/cups
/$(LIBCUPS
)
358 $(CC
) $(LDFLAGS
) -o
$@ pstops.o common.o
$(LIBS
) -lm
365 pdftops
: pdftops.o common.o ..
/cups
/$(LIBCUPS
)
367 $(CC
) $(LDFLAGS
) -o
$@ pdftops.o common.o
$(LIBS
)
374 rastertolabel
: rastertolabel.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
376 $(CC
) $(LDFLAGS
) -o
$@ rastertolabel.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
383 rastertoepson
: rastertoepson.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
385 $(CC
) $(LDFLAGS
) -o
$@ rastertoepson.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
392 rastertohp
: rastertohp.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
394 $(CC
) $(LDFLAGS
) -o
$@ rastertohp.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
401 testraster
: testraster.o ..
/cups
/libcups.a libcupsimage.a
403 $(CC
) $(LDFLAGS
) -o
$@ testraster.o libcupsimage.a ..
/cups
/libcups.a \
404 $(IMGLIBS
) $(DSOLIBS
) $(COMMONLIBS
) $(SSLLIBS
) $(LIBGSSAPI
)
411 rasterbench
: rasterbench.o libcupsimage.a
413 $(CC
) $(LDFLAGS
) -o
$@ rasterbench.o libcupsimage.a
$(LIBS
)
420 texttops
: texttops.o textcommon.o common.o \
423 $(CC
) $(LDFLAGS
) -o
$@ texttops.o textcommon.o common.o
$(LIBS
)
434 # End of "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $".