2 # "$Id: Makefile 7558 2008-05-12 23:46:44Z 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.
44 HPGLOBJS
= hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
45 hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
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
)
52 FORMOBJS
= form-attr.o form-main.o form-ps.o form-text.o form-tree.o
53 OBJS
= $(HPGLOBJS
) $(IMAGEOBJS
) $(FORMOBJS
) \
54 commandtops.o gziptoany.o imagetops.o imagetoraster.o common.o \
56 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
57 testimage.o testraster.o textcommon.o texttops.o
68 # Make library targets...
75 # Clean all object files...
79 $(RM
) $(OBJS
) $(TARGETS
)
80 $(RM
) libcupsimage.so libcupsimage.sl libcupsimage.dylib
85 # Update dependencies (without system header dependencies...)
89 touch Dependencies.tmp
90 makedepend
-Y
-I..
-fDependencies.tmp
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
92 cp Dependencies.tmp Dependencies
93 sed
-E
-e
'1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp
>>Dependencies
94 sed
-E
-e
'1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp
>>Dependencies
95 $(RM
) Dependencies.tmp
99 # Install all targets...
102 install: all install-data install-headers install-libs install-exec
106 # Install data files...
113 # Install programs...
117 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/filter
118 for file in
$(FILTERS
); do \
119 $(INSTALL_BIN
) $$file $(SERVERBIN
)/filter; \
121 $(RM
) $(SERVERBIN
)/filter/rastertodymo
122 $(LN
) rastertolabel
$(SERVERBIN
)/filter/rastertodymo
123 if
test "x$(SYMROOT)" != "x"; then \
124 $(INSTALL_DIR
) $(SYMROOT
); \
125 for file in
$(TARGETS
); do \
126 cp
$$file $(SYMROOT
); \
136 $(INSTALL_DIR
) -m
755 $(INCLUDEDIR
)/cups
137 $(INSTALL_DATA
) image.h
$(INCLUDEDIR
)/cups
141 # Install libraries...
144 install-libs
: $(INSTALLSTATIC
) $(INSTALL32
) $(INSTALL64
)
145 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
146 $(INSTALL_LIB
) $(LIBCUPSIMAGE
) $(LIBDIR
)
147 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.so.2" -o
$(LIBCUPSIMAGE
) = "libcupsimage.sl.2"; then \
148 $(RM
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
149 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
151 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.2.dylib"; then \
152 $(RM
) $(LIBDIR
)/libcupsimage.dylib
; \
153 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/libcupsimage.dylib
; \
157 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
158 $(INSTALL_LIB
) libcupsimage.a
$(LIBDIR
);
159 $(RANLIB
) $(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
192 $(RM
) $(INCLUDEDIR
)/cups
/image.h
193 -$(RMDIR
) $(INCLUDEDIR
)/cups
196 $(RM
) $(LIB32DIR
)/libcupsimage.so
197 $(RM
) $(LIB32DIR
)/libcupsimage.so
.2
198 -$(RMDIR
) $(LIB32DIR
)
201 $(RM
) $(LIB64DIR
)/libcupsimage.so
202 $(RM
) $(LIB64DIR
)/libcupsimage.so
.2
203 -$(RMDIR
) $(LIB64DIR
)
207 # Automatic API help files...
211 echo Generating CUPS API help files...
212 mxmldoc
--section
"Programming" --title
"Raster API" \
213 --css ..
/doc
/cups-printable.css \
214 --header api-raster.header
--intro api-raster.shtml \
215 ..
/cups
/raster.h interpret.c raster.c \
216 >..
/doc
/help
/api-raster.html
219 echo Generating CUPS API help files...
220 mxmldoc
--section
"Programming" --title
"Raster API" \
221 --framed ..
/cups
/api-raster \
222 --css ..
/doc
/cups-printable.css \
223 --header api-raster.header
--intro api-raster.shtml \
224 ..
/cups
/raster.h interpret.c raster.c
231 commandtops
: commandtops.o ..
/cups
/$(LIBCUPS
)
233 $(CC
) $(LDFLAGS
) -o
$@ commandtops.o
$(LIBS
)
240 formtops
: $(FORMOBJS
) common.o ..
/cups
/$(LIBCUPS
)
242 $(CC
) $(LDFLAGS
) -o
$@
$(FORMOBJS
) common.o
$(LIBS
) -lm
249 gziptoany
: gziptoany.o ..
/Makedefs ..
/cups
/$(LIBCUPS
)
251 $(CC
) $(LDFLAGS
) -o
$@ gziptoany.o
$(LIBZ
) $(LIBS
)
258 hpgltops
: $(HPGLOBJS
) common.o ..
/cups
/$(LIBCUPS
)
260 $(CC
) $(LDFLAGS
) -o
$@
$(HPGLOBJS
) common.o
$(LIBS
) -lm
264 # libcupsimage.so.2, libcupsimage.sl.2
267 libcupsimage.so
.2 libcupsimage.sl
.2: $(IMAGEOBJS
)
269 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
) $(DSOLIBS
) \
270 -L..
/cups
$(LINKCUPS
) -lm
271 $(RM
) `basename $@ .2`
272 $(LN
) $@
`basename $@ .2`
276 # 32bit/libcupsimage.so.2
279 32bit
/libcupsimage.so
.2: $(IMAGE32OBJS
)
280 echo Linking
32-bit
$@...
282 $(DSO
) $(ARCH32FLAGS
) $(DSO32FLAGS
) -o
$@
$(IMAGE32OBJS
) $(DSOLIBS
) \
283 -L..
/cups
/32bit
$(LINKCUPS
) -lm
287 # 64bit/libcupsimage.so.2
290 64bit
/libcupsimage.so
.2: $(IMAGE64OBJS
)
291 echo Linking
64-bit
$@...
293 $(DSO
) $(ARCH64FLAGS
) $(DSO64FLAGS
) -o
$@
$(IMAGE64OBJS
) $(DSOLIBS
) \
294 -L..
/cups
/64bit
$(LINKCUPS
) -lm
298 # libcupsimage.2.dylib
301 libcupsimage
.2.dylib
: $(IMAGEOBJS
) $(LIBCUPSIMAGEORDER
)
303 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
304 -install_name
$(libdir)/$@ \
305 -current_version
2.3.0 \
306 -compatibility_version
2.0.0 \
307 -sectorder __TEXT __text
$(LIBCUPSIMAGEORDER
) \
308 $(IMAGEOBJS
) $(DSOLIBS
) -L..
/cups
$(LINKCUPS
) -lm
309 $(RM
) libcupsimage.dylib
310 $(LN
) $@ libcupsimage.dylib
317 libcupsimage_s.a
: $(IMAGEOBJS
) libcupsimage_s.exp
319 $(DSO
) $(DSOFLAGS
) -Wl
,-berok
,-bexport
:libcupsimage_s.exp \
320 -o libcupsimage_s.o
$(IMAGEOBJS
) $(DSOLIBS
) -lm
322 $(AR
) $(ARFLAGS
) $@ libcupsimage_s.o
329 libcupsimage.la
: $(IMAGEOBJS
)
331 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
:.o
=.lo
) $(DSOLIBS
) \
332 -L..
/cups
$(LINKCUPS
) \
333 -rpath
$(LIBDIR
) -version-info
2:3
340 libcupsimage.a
: $(IMAGEOBJS
)
343 $(AR
) $(ARFLAGS
) $@
$(IMAGEOBJS
)
351 testimage
: testimage.o libcupsimage.a ..
/Makedefs
353 $(CC
) $(LDFLAGS
) -o
$@ testimage.o libcupsimage.a \
354 $(IMGLIBS
) $(DSOLIBS
) $(LIBS
)
361 imagetops
: imagetops.o common.o
$(LIBCUPSIMAGE
) \
364 $(CC
) $(LDFLAGS
) -o
$@ imagetops.o common.o
$(LINKCUPSIMAGE
) \
372 imagetoraster
: imagetoraster.o common.o
$(LIBCUPSIMAGE
) \
375 $(CC
) $(LDFLAGS
) -o
$@ imagetoraster.o common.o
$(LINKCUPSIMAGE
) \
383 pstops
: pstops.o common.o ..
/cups
/$(LIBCUPS
)
385 $(CC
) $(LDFLAGS
) -o
$@ pstops.o common.o
$(LIBS
) -lm
392 pdftops
: pdftops.o common.o ..
/cups
/$(LIBCUPS
)
394 $(CC
) $(LDFLAGS
) -o
$@ pdftops.o common.o
$(LIBS
)
401 rastertolabel
: rastertolabel.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
403 $(CC
) $(LDFLAGS
) -o
$@ rastertolabel.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
410 rastertoepson
: rastertoepson.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
412 $(CC
) $(LDFLAGS
) -o
$@ rastertoepson.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
419 rastertohp
: rastertohp.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
421 $(CC
) $(LDFLAGS
) -o
$@ rastertohp.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
428 testraster
: testraster.o ..
/cups
/libcups.a libcupsimage.a
430 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o
$@ testraster.o libcupsimage.a \
431 ..
/cups
/libcups.a
$(IMGLIBS
) $(DSOLIBS
) $(COMMONLIBS
) \
432 $(SSLLIBS
) $(LIBGSSAPI
)
433 echo Running raster API tests...
441 rasterbench
: rasterbench.o libcupsimage.a
443 $(CC
) $(LDFLAGS
) -o
$@ rasterbench.o libcupsimage.a
$(LIBS
)
450 texttops
: texttops.o textcommon.o common.o \
453 $(CC
) $(LDFLAGS
) -o
$@ texttops.o textcommon.o common.o
$(LIBS
)
464 # End of "$Id: Makefile 7558 2008-05-12 23:46:44Z mike $".