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.
45 HPGLOBJS
= hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
46 hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
47 IMAGEOBJS
= image-bmp.o image-colorspace.o image-gif.o image-jpeg.o \
48 image-photocd.o image-pix.o image-png.o image-pnm.o \
49 image-sgi.o image-sgilib.o image-sun.o image-tiff.o \
50 image-zoom.o image.o error.o interpret.o raster.o
51 IMAGE32OBJS
= $(IMAGEOBJS
:.o
=.32.o
)
52 IMAGE64OBJS
= $(IMAGEOBJS
:.o
=.64.o
)
53 FORMOBJS
= form-attr.o form-main.o form-ps.o form-text.o form-tree.o
54 OBJS
= $(HPGLOBJS
) $(IMAGEOBJS
) $(FORMOBJS
) \
55 commandtops.o gziptoany.o imagetops.o imagetoraster.o common.o \
57 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
58 testimage.o testraster.o textcommon.o texttops.o
69 # Make library targets...
79 unittests
: $(UNITTARGETS
)
83 # Clean all object files...
87 $(RM
) $(OBJS
) $(TARGETS
) $(UNITTARGETS
)
88 $(RM
) libcupsimage.so libcupsimage.sl libcupsimage.dylib
93 # Update dependencies (without system header dependencies...)
97 touch Dependencies.tmp
98 makedepend
-Y
-I..
-fDependencies.tmp
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
100 cp Dependencies.tmp Dependencies
101 sed
-E
-e
'1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp
>>Dependencies
102 sed
-E
-e
'1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp
>>Dependencies
103 $(RM
) Dependencies.tmp
107 # Install all targets...
110 install: all install-data install-headers install-libs install-exec
114 # Install data files...
121 # Install programs...
125 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/filter
126 for file in
$(FILTERS
); do \
127 $(INSTALL_BIN
) $$file $(SERVERBIN
)/filter; \
129 $(RM
) $(SERVERBIN
)/filter/rastertodymo
130 $(LN
) rastertolabel
$(SERVERBIN
)/filter/rastertodymo
131 if
test "x$(SYMROOT)" != "x"; then \
132 $(INSTALL_DIR
) $(SYMROOT
); \
133 for file in
$(TARGETS
); do \
134 cp
$$file $(SYMROOT
); \
144 $(INSTALL_DIR
) -m
755 $(INCLUDEDIR
)/cups
145 $(INSTALL_DATA
) image.h
$(INCLUDEDIR
)/cups
149 # Install libraries...
152 install-libs
: $(INSTALLSTATIC
) $(INSTALL32
) $(INSTALL64
)
153 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
154 $(INSTALL_LIB
) $(LIBCUPSIMAGE
) $(LIBDIR
)
155 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.so.2" -o
$(LIBCUPSIMAGE
) = "libcupsimage.sl.2"; then \
156 $(RM
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
157 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
159 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.2.dylib"; then \
160 $(RM
) $(LIBDIR
)/libcupsimage.dylib
; \
161 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/libcupsimage.dylib
; \
165 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
166 $(INSTALL_LIB
) libcupsimage.a
$(LIBDIR
);
167 $(RANLIB
) $(LIBDIR
)/libcupsimage.a
;
170 $(INSTALL_DIR
) -m
755 $(LIB32DIR
)
171 $(INSTALL_LIB
) 32bit
/libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
.2
172 $(LN
) libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
175 $(INSTALL_DIR
) -m
755 $(LIB64DIR
)
176 $(INSTALL_LIB
) 64bit
/libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
.2
177 $(LN
) libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
181 # Uninstall all targets...
184 uninstall: $(UNINSTALL32
) $(UNINSTALL64
)
185 for file in
$(FILTERS
); do \
186 $(RM
) $(SERVERBIN
)/filter/$$file; \
188 $(RM
) $(SERVERBIN
)/filter/rastertodymo
189 -$(RMDIR
) $(SERVERBIN
)/filter
190 -$(RMDIR
) $(SERVERBIN
)
191 $(RM
) $(LIBDIR
)/libcupsimage
.2.dylib
192 $(RM
) $(LIBDIR
)/libcupsimage.a
193 $(RM
) $(LIBDIR
)/libcupsimage.dylib
194 $(RM
) $(LIBDIR
)/libcupsimage_s.a
195 $(RM
) $(LIBDIR
)/libcupsimage.sl
196 $(RM
) $(LIBDIR
)/libcupsimage.sl
.2
197 $(RM
) $(LIBDIR
)/libcupsimage.so
198 $(RM
) $(LIBDIR
)/libcupsimage.so
.2
200 $(RM
) $(INCLUDEDIR
)/cups
/image.h
201 -$(RMDIR
) $(INCLUDEDIR
)/cups
204 $(RM
) $(LIB32DIR
)/libcupsimage.so
205 $(RM
) $(LIB32DIR
)/libcupsimage.so
.2
206 -$(RMDIR
) $(LIB32DIR
)
209 $(RM
) $(LIB64DIR
)/libcupsimage.so
210 $(RM
) $(LIB64DIR
)/libcupsimage.so
.2
211 -$(RMDIR
) $(LIB64DIR
)
215 # Automatic API help files...
219 echo Generating CUPS API help files...
220 mxmldoc
--section
"Programming" --title
"Raster API" \
221 --css ..
/doc
/cups-printable.css \
222 --header api-raster.header
--intro api-raster.shtml \
223 ..
/cups
/raster.h interpret.c raster.c \
224 >..
/doc
/help
/api-raster.html
227 echo Generating CUPS API help files...
228 mxmldoc
--section
"Programming" --title
"Raster API" \
229 --framed ..
/cups
/api-raster \
230 --css ..
/doc
/cups-printable.css \
231 --header api-raster.header
--intro api-raster.shtml \
232 ..
/cups
/raster.h interpret.c raster.c
239 commandtops
: commandtops.o ..
/cups
/$(LIBCUPS
)
241 $(CC
) $(LDFLAGS
) -o
$@ commandtops.o
$(LIBS
)
248 formtops
: $(FORMOBJS
) common.o ..
/cups
/$(LIBCUPS
)
250 $(CC
) $(LDFLAGS
) -o
$@
$(FORMOBJS
) common.o
$(LIBS
) -lm
257 gziptoany
: gziptoany.o ..
/Makedefs ..
/cups
/$(LIBCUPS
)
259 $(CC
) $(LDFLAGS
) -o
$@ gziptoany.o
$(LIBZ
) $(LIBS
)
266 hpgltops
: $(HPGLOBJS
) common.o ..
/cups
/$(LIBCUPS
)
268 $(CC
) $(LDFLAGS
) -o
$@
$(HPGLOBJS
) common.o
$(LIBS
) -lm
272 # libcupsimage.so.2, libcupsimage.sl.2
275 libcupsimage.so
.2 libcupsimage.sl
.2: $(IMAGEOBJS
)
277 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
) $(DSOLIBS
) \
278 -L..
/cups
$(LINKCUPS
) -lm
279 $(RM
) `basename $@ .2`
280 $(LN
) $@
`basename $@ .2`
284 # 32bit/libcupsimage.so.2
287 32bit
/libcupsimage.so
.2: $(IMAGE32OBJS
)
288 echo Linking
32-bit
$@...
290 $(DSO
) $(ARCH32FLAGS
) $(DSO32FLAGS
) -o
$@
$(IMAGE32OBJS
) $(DSOLIBS
) \
291 -L..
/cups
/32bit
$(LINKCUPS
) -lm
295 # 64bit/libcupsimage.so.2
298 64bit
/libcupsimage.so
.2: $(IMAGE64OBJS
)
299 echo Linking
64-bit
$@...
301 $(DSO
) $(ARCH64FLAGS
) $(DSO64FLAGS
) -o
$@
$(IMAGE64OBJS
) $(DSOLIBS
) \
302 -L..
/cups
/64bit
$(LINKCUPS
) -lm
306 # libcupsimage.2.dylib
309 libcupsimage
.2.dylib
: $(IMAGEOBJS
) $(LIBCUPSIMAGEORDER
)
311 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
312 -install_name
$(libdir)/$@ \
313 -current_version
2.3.0 \
314 -compatibility_version
2.0.0 \
315 -sectorder __TEXT __text
$(LIBCUPSIMAGEORDER
) \
316 $(IMAGEOBJS
) $(DSOLIBS
) -L..
/cups
$(LINKCUPS
) -lm
317 $(RM
) libcupsimage.dylib
318 $(LN
) $@ libcupsimage.dylib
325 libcupsimage_s.a
: $(IMAGEOBJS
) libcupsimage_s.exp
327 $(DSO
) $(DSOFLAGS
) -Wl
,-berok
,-bexport
:libcupsimage_s.exp \
328 -o libcupsimage_s.o
$(IMAGEOBJS
) $(DSOLIBS
) -lm
330 $(AR
) $(ARFLAGS
) $@ libcupsimage_s.o
337 libcupsimage.la
: $(IMAGEOBJS
)
339 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
:.o
=.lo
) $(DSOLIBS
) \
340 -L..
/cups
$(LINKCUPS
) \
341 -rpath
$(LIBDIR
) -version-info
2:3
348 libcupsimage.a
: $(IMAGEOBJS
)
351 $(AR
) $(ARFLAGS
) $@
$(IMAGEOBJS
)
359 testimage
: testimage.o libcupsimage.a ..
/Makedefs
361 $(CC
) $(LDFLAGS
) -o
$@ testimage.o libcupsimage.a \
362 $(IMGLIBS
) $(DSOLIBS
) $(LIBS
)
369 imagetops
: imagetops.o common.o
$(LIBCUPSIMAGE
) \
372 $(CC
) $(LDFLAGS
) -o
$@ imagetops.o common.o
$(LINKCUPSIMAGE
) \
380 imagetoraster
: imagetoraster.o common.o
$(LIBCUPSIMAGE
) \
383 $(CC
) $(LDFLAGS
) -o
$@ imagetoraster.o common.o
$(LINKCUPSIMAGE
) \
391 pstops
: pstops.o common.o ..
/cups
/$(LIBCUPS
)
393 $(CC
) $(LDFLAGS
) -o
$@ pstops.o common.o
$(LIBS
) -lm
400 pdftops
: pdftops.o common.o ..
/cups
/$(LIBCUPS
)
402 $(CC
) $(LDFLAGS
) -o
$@ pdftops.o common.o
$(LIBS
)
409 rastertolabel
: rastertolabel.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
411 $(CC
) $(LDFLAGS
) -o
$@ rastertolabel.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
418 rastertoepson
: rastertoepson.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
420 $(CC
) $(LDFLAGS
) -o
$@ rastertoepson.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
427 rastertohp
: rastertohp.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
429 $(CC
) $(LDFLAGS
) -o
$@ rastertohp.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
436 testraster
: testraster.o ..
/cups
/libcups.a libcupsimage.a
438 $(CC
) $(ARCHFLAGS
) $(LDFLAGS
) -o
$@ testraster.o libcupsimage.a \
439 ..
/cups
/libcups.a
$(IMGLIBS
) $(DSOLIBS
) $(COMMONLIBS
) \
440 $(SSLLIBS
) $(LIBGSSAPI
)
441 echo Running raster API tests...
449 rasterbench
: rasterbench.o libcupsimage.a
451 $(CC
) $(LDFLAGS
) -o
$@ rasterbench.o libcupsimage.a
$(LIBS
)
458 texttops
: texttops.o textcommon.o common.o \
461 $(CC
) $(LDFLAGS
) -o
$@ texttops.o textcommon.o common.o
$(LIBS
)
472 # End of "$Id: Makefile 7558 2008-05-12 23:46:44Z mike $".