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 $(RM
) $(LIBDIR
)/libcupsimage.dylib
; \
134 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/libcupsimage.dylib
; \
138 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
139 $(INSTALL_LIB
) libcupsimage.a
$(LIBDIR
);
140 $(RANLIB
) $(LIBDIR
)/libcupsimage.a
;
143 $(INSTALL_DIR
) -m
755 $(LIB32DIR
)
144 $(INSTALL_LIB
) 32bit
/libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
.2
145 $(LN
) libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
148 $(INSTALL_DIR
) -m
755 $(LIB64DIR
)
149 $(INSTALL_LIB
) 64bit
/libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
.2
150 $(LN
) libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
154 # Uninstall all targets...
157 uninstall: $(UNINSTALL32
) $(UNINSTALL64
)
158 for file in
$(FILTERS
); do \
159 $(RM
) $(SERVERBIN
)/filter/$$file; \
161 $(RM
) $(SERVERBIN
)/filter/rastertodymo
162 -$(RMDIR
) $(SERVERBIN
)/filter
163 -$(RMDIR
) $(SERVERBIN
)
164 $(RM
) $(LIBDIR
)/libcupsimage
.2.dylib
165 $(RM
) $(LIBDIR
)/libcupsimage.a
166 $(RM
) $(LIBDIR
)/libcupsimage.dylib
167 $(RM
) $(LIBDIR
)/libcupsimage_s.a
168 $(RM
) $(LIBDIR
)/libcupsimage.sl
169 $(RM
) $(LIBDIR
)/libcupsimage.sl
.2
170 $(RM
) $(LIBDIR
)/libcupsimage.so
171 $(RM
) $(LIBDIR
)/libcupsimage.so
.2
173 $(RM
) $(INCLUDEDIR
)/cups
/image.h
174 -$(RMDIR
) $(INCLUDEDIR
)/cups
177 $(RM
) $(LIB32DIR
)/libcupsimage.so
178 $(RM
) $(LIB32DIR
)/libcupsimage.so
.2
179 -$(RMDIR
) $(LIB32DIR
)
182 $(RM
) $(LIB64DIR
)/libcupsimage.so
183 $(RM
) $(LIB64DIR
)/libcupsimage.so
.2
184 -$(RMDIR
) $(LIB64DIR
)
188 # Automatic API help files...
192 echo Generating CUPS API help files...
193 mxmldoc
--section
"Programming" --title
"Raster API" \
194 --css ..
/doc
/cups-printable.css \
195 --header api-raster.header
--intro api-raster.shtml \
196 ..
/cups
/raster.h interpret.c raster.c \
197 >..
/doc
/help
/api-raster.html
200 echo Generating CUPS API help files...
201 mxmldoc
--section
"Programming" --title
"Raster API" \
202 --framed ..
/cups
/api-raster \
203 --css ..
/doc
/cups-printable.css \
204 --header api-raster.header
--intro api-raster.shtml \
205 ..
/cups
/raster.h interpret.c raster.c
212 formtops
: $(FORMOBJS
) common.o ..
/cups
/$(LIBCUPS
)
214 $(CC
) $(LDFLAGS
) -o
$@
$(FORMOBJS
) common.o
$(LIBS
) -lm
221 gziptoany
: gziptoany.o ..
/Makedefs ..
/cups
/$(LIBCUPS
)
223 $(CC
) $(LDFLAGS
) -o
$@ gziptoany.o
$(LIBZ
) $(LIBS
)
230 hpgltops
: $(HPGLOBJS
) common.o ..
/cups
/$(LIBCUPS
)
232 $(CC
) $(LDFLAGS
) -o
$@
$(HPGLOBJS
) common.o
$(LIBS
) -lm
236 # libcupsimage.so.2, libcupsimage.sl.2
239 libcupsimage.so
.2 libcupsimage.sl
.2: $(IMAGEOBJS
)
241 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
) $(DSOLIBS
) \
242 -L..
/cups
$(LINKCUPS
) -lm
243 $(RM
) `basename $@ .2`
244 $(LN
) $@
`basename $@ .2`
248 # 32bit/libcupsimage.so.2
251 32bit
/libcupsimage.so
.2: $(IMAGE32OBJS
)
252 echo Linking
32-bit
$@...
254 $(DSO
) $(ARCH32FLAGS
) $(DSO32FLAGS
) -o
$@
$(IMAGE32OBJS
) $(DSOLIBS
) \
255 -L..
/cups
/32bit
$(LINKCUPS
) -lm
259 # 64bit/libcupsimage.so.2
262 64bit
/libcupsimage.so
.2: $(IMAGE64OBJS
)
263 echo Linking
64-bit
$@...
265 $(DSO
) $(ARCH64FLAGS
) $(DSO64FLAGS
) -o
$@
$(IMAGE64OBJS
) $(DSOLIBS
) \
266 -L..
/cups
/64bit
$(LINKCUPS
) -lm
270 # libcupsimage.2.dylib
273 libcupsimage
.2.dylib
: $(IMAGEOBJS
) $(LIBCUPSIMAGEORDER
)
275 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
276 -install_name
$(libdir)/$@ \
277 -current_version
2.3.0 \
278 -compatibility_version
2.0.0 \
279 -sectorder __TEXT __text
$(LIBCUPSIMAGEORDER
) \
280 $(IMAGEOBJS
) $(DSOLIBS
) -L..
/cups
$(LINKCUPS
) -lm
281 $(RM
) libcupsimage.dylib
282 $(LN
) $@ libcupsimage.dylib
289 libcupsimage_s.a
: $(IMAGEOBJS
) libcupsimage_s.exp
291 $(DSO
) $(DSOFLAGS
) -Wl
,-berok
,-bexport
:libcupsimage_s.exp \
292 -o libcupsimage_s.o
$(IMAGEOBJS
) $(DSOLIBS
) -lm
294 $(AR
) $(ARFLAGS
) $@ libcupsimage_s.o
301 libcupsimage.la
: $(IMAGEOBJS
)
303 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
:.o
=.lo
) $(DSOLIBS
) \
304 -L..
/cups
$(LINKCUPS
) \
305 -rpath
$(LIBDIR
) -version-info
2:3
312 libcupsimage.a
: $(IMAGEOBJS
)
315 $(AR
) $(ARFLAGS
) $@
$(IMAGEOBJS
)
323 testimage
: testimage.o libcupsimage.a ..
/Makedefs
325 $(CC
) $(LDFLAGS
) -o
$@ testimage.o libcupsimage.a \
326 $(IMGLIBS
) $(DSOLIBS
) $(LIBS
)
333 imagetops
: imagetops.o common.o
$(LIBCUPSIMAGE
) \
336 $(CC
) $(LDFLAGS
) -o
$@ imagetops.o common.o
$(LINKCUPSIMAGE
) \
344 imagetoraster
: imagetoraster.o common.o
$(LIBCUPSIMAGE
) \
347 $(CC
) $(LDFLAGS
) -o
$@ imagetoraster.o common.o
$(LINKCUPSIMAGE
) \
355 pstops
: pstops.o common.o ..
/cups
/$(LIBCUPS
)
357 $(CC
) $(LDFLAGS
) -o
$@ pstops.o common.o
$(LIBS
) -lm
364 pdftops
: pdftops.o common.o ..
/cups
/$(LIBCUPS
)
366 $(CC
) $(LDFLAGS
) -o
$@ pdftops.o common.o
$(LIBS
)
373 rastertolabel
: rastertolabel.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
375 $(CC
) $(LDFLAGS
) -o
$@ rastertolabel.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
382 rastertoepson
: rastertoepson.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
384 $(CC
) $(LDFLAGS
) -o
$@ rastertoepson.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
391 rastertohp
: rastertohp.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
393 $(CC
) $(LDFLAGS
) -o
$@ rastertohp.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
400 testraster
: testraster.o ..
/cups
/libcups.a libcupsimage.a
402 $(CC
) $(LDFLAGS
) -o
$@ testraster.o libcupsimage.a ..
/cups
/libcups.a \
403 $(IMGLIBS
) $(DSOLIBS
) $(COMMONLIBS
) $(SSLLIBS
) $(LIBGSSAPI
)
410 rasterbench
: rasterbench.o libcupsimage.a
412 $(CC
) $(LDFLAGS
) -o
$@ rasterbench.o libcupsimage.a
$(LIBS
)
419 texttops
: texttops.o textcommon.o common.o \
422 $(CC
) $(LDFLAGS
) -o
$@ texttops.o textcommon.o common.o
$(LIBS
)
433 # End of "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $".