2 # "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $"
4 # Filter makefile for the Common UNIX Printing System (CUPS).
6 # Copyright 2007 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 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 pstops.o \
43 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
44 testimage.o testraster.o textcommon.o texttops.o
55 # Clean all object files...
59 $(RM
) $(OBJS
) $(TARGETS
)
60 $(RM
) libcupsimage.so libcupsimage.sl libcupsimage.dylib
65 # Update dependencies (without system header dependencies...)
69 touch Dependencies.tmp
70 makedepend
-Y
-I..
-fDependencies.tmp
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
72 cp Dependencies.tmp Dependencies
73 sed
-r
-e
'1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp
>>Dependencies
74 sed
-r
-e
'1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp
>>Dependencies
75 $(RM
) Dependencies.tmp
79 # Install all targets...
82 install: all installhdrs
$(INSTALLSTATIC
) $(INSTALL32
) $(INSTALL64
)
83 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/filter
84 for file in
$(FILTERS
); do \
85 $(INSTALL_BIN
) $$file $(SERVERBIN
)/filter; \
87 $(RM
) $(SERVERBIN
)/filter/rastertodymo
88 $(LN
) rastertolabel
$(SERVERBIN
)/filter/rastertodymo
89 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
90 $(INSTALL_LIB
) $(LIBCUPSIMAGE
) $(LIBDIR
)
91 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.so.2" -o
$(LIBCUPSIMAGE
) = "libcupsimage.sl.2"; then \
92 $(RM
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
93 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
95 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.2.dylib"; then \
96 $(STRIP
) -x
$(LIBDIR
)/$(LIBCUPSIMAGE
); \
97 $(RM
) $(LIBDIR
)/libcupsimage.dylib
; \
98 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/libcupsimage.dylib
; \
100 if
test "x$(SYMROOT)" != "x"; then \
101 $(INSTALL_DIR
) $(SYMROOT
); \
102 for file in
$(TARGETS
); do \
103 cp
$$file $(SYMROOT
); \
108 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
109 $(INSTALL_LIB
) libcupsimage.a
$(LIBDIR
);
110 $(RANLIB
) $(LIBDIR
)/libcupsimage.a
;
113 $(INSTALL_DIR
) -m
755 $(INCLUDEDIR
)/cups
114 $(INSTALL_DATA
) image.h
$(INCLUDEDIR
)/cups
115 $(INSTALL_DATA
) raster.h
$(INCLUDEDIR
)/cups
118 $(INSTALL_DIR
) -m
755 $(LIB32DIR
)
119 $(INSTALL_LIB
) 32bit
/libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
.2
120 $(LN
) libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
123 $(INSTALL_DIR
) -m
755 $(LIB64DIR
)
124 $(INSTALL_LIB
) 64bit
/libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
.2
125 $(LN
) libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
129 # Uninstall all targets...
132 uninstall: $(UNINSTALL32
) $(UNINSTALL64
)
133 for file in
$(FILTERS
); do \
134 $(RM
) $(SERVERBIN
)/filter/$$file; \
136 $(RM
) $(SERVERBIN
)/filter/rastertodymo
137 -$(RMDIR
) $(SERVERBIN
)/filter
138 -$(RMDIR
) $(SERVERBIN
)
139 $(RM
) $(LIBDIR
)/libcupsimage
.2.dylib
140 $(RM
) $(LIBDIR
)/libcupsimage.a
141 $(RM
) $(LIBDIR
)/libcupsimage.dylib
142 $(RM
) $(LIBDIR
)/libcupsimage_s.a
143 $(RM
) $(LIBDIR
)/libcupsimage.sl
144 $(RM
) $(LIBDIR
)/libcupsimage.sl
.2
145 $(RM
) $(LIBDIR
)/libcupsimage.so
146 $(RM
) $(LIBDIR
)/libcupsimage.so
.2
148 $(RM
) $(INCLUDEDIR
)/cups
/image.h
149 $(RM
) $(INCLUDEDIR
)/cups
/raster.h
150 -$(RMDIR
) $(INCLUDEDIR
)/cups
153 $(RM
) $(LIB32DIR
)/libcupsimage.so
154 $(RM
) $(LIB32DIR
)/libcupsimage.so
.2
155 -$(RMDIR
) $(LIB32DIR
)
158 $(RM
) $(LIB64DIR
)/libcupsimage.so
159 $(RM
) $(LIB64DIR
)/libcupsimage.so
.2
160 -$(RMDIR
) $(LIB64DIR
)
164 # Automatic API help files...
168 echo Generating CUPS API help files...
169 mxmldoc
--section
"Programming" --title
"Raster API" \
170 --intro api-raster.shtml \
171 raster.h interpret.c raster.c
>..
/doc
/help
/api-raster.html
178 formtops
: $(FORMOBJS
) common.o ..
/cups
/$(LIBCUPS
)
180 $(CC
) $(LDFLAGS
) -o
$@
$(FORMOBJS
) common.o
$(LIBS
) -lm
187 gziptoany
: gziptoany.o ..
/Makedefs ..
/cups
/$(LIBCUPS
)
189 $(CC
) $(LDFLAGS
) -o
$@ gziptoany.o
$(LIBZ
) $(LIBS
)
196 hpgltops
: $(HPGLOBJS
) common.o ..
/cups
/$(LIBCUPS
)
198 $(CC
) $(LDFLAGS
) -o
$@
$(HPGLOBJS
) common.o
$(LIBS
) -lm
202 # libcupsimage.so.2, libcupsimage.sl.2
205 libcupsimage.so
.2 libcupsimage.sl
.2: $(IMAGEOBJS
)
207 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
) $(DSOLIBS
) \
208 -L..
/cups
$(LINKCUPS
) -lm
209 $(RM
) `basename $@ .2`
210 $(LN
) $@
`basename $@ .2`
214 # 32bit/libcupsimage.so.2
217 32bit
/libcupsimage.so
.2: $(IMAGE32OBJS
)
218 echo Linking
32-bit
$@...
220 $(DSO
) $(ARCH32FLAGS
) $(DSO32FLAGS
) -o
$@
$(IMAGE32OBJS
) $(DSOLIBS
) \
221 -L..
/cups
/32bit
$(LINKCUPS
) -lm
225 # 64bit/libcupsimage.so.2
228 64bit
/libcupsimage.so
.2: $(IMAGE64OBJS
)
229 echo Linking
64-bit
$@...
231 $(DSO
) $(ARCH64FLAGS
) $(DSO64FLAGS
) -o
$@
$(IMAGE64OBJS
) $(DSOLIBS
) \
232 -L..
/cups
/64bit
$(LINKCUPS
) -lm
236 # libcupsimage.2.dylib
239 libcupsimage
.2.dylib
: $(IMAGEOBJS
) $(LIBCUPSIMAGEORDER
)
241 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
242 -install_name
$(libdir)/$@ \
243 -current_version
2.3.0 \
244 -compatibility_version
2.0.0 \
245 -sectorder __TEXT __text
$(LIBCUPSIMAGEORDER
) \
246 $(IMAGEOBJS
) $(DSOLIBS
) -L..
/cups
$(LINKCUPS
) -lm
247 $(RM
) libcupsimage.dylib
248 $(LN
) $@ libcupsimage.dylib
255 libcupsimage_s.a
: $(IMAGEOBJS
) libcupsimage_s.exp
257 $(DSO
) $(DSOFLAGS
) -Wl
,-berok
,-bexport
:libcupsimage_s.exp \
258 -o libcupsimage_s.o
$(IMAGEOBJS
) $(DSOLIBS
) -lm
260 $(AR
) $(ARFLAGS
) $@ libcupsimage_s.o
267 libcupsimage.la
: $(IMAGEOBJS
)
269 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
:.o
=.lo
) $(DSOLIBS
) \
270 -L..
/cups
$(LINKCUPS
) \
271 -rpath
$(LIBDIR
) -version-info
2:3
278 libcupsimage.a
: $(IMAGEOBJS
)
281 $(AR
) $(ARFLAGS
) $@
$(IMAGEOBJS
)
289 testimage
: testimage.o libcupsimage.a ..
/Makedefs
291 $(CC
) $(LDFLAGS
) -o
$@ testimage.o libcupsimage.a \
292 $(IMGLIBS
) $(DSOLIBS
) $(LIBS
)
299 imagetops
: imagetops.o common.o
$(LIBCUPSIMAGE
) \
302 $(CC
) $(LDFLAGS
) -o
$@ imagetops.o common.o
$(LINKCUPSIMAGE
) \
310 imagetoraster
: imagetoraster.o common.o
$(LIBCUPSIMAGE
) \
313 $(CC
) $(LDFLAGS
) -o
$@ imagetoraster.o common.o
$(LINKCUPSIMAGE
) \
321 pstops
: pstops.o common.o ..
/cups
/$(LIBCUPS
)
323 $(CC
) $(LDFLAGS
) -o
$@ pstops.o common.o
$(LIBS
) -lm
330 rastertolabel
: rastertolabel.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
332 $(CC
) $(LDFLAGS
) -o
$@ rastertolabel.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
339 rastertoepson
: rastertoepson.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
341 $(CC
) $(LDFLAGS
) -o
$@ rastertoepson.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
348 rastertohp
: rastertohp.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
350 $(CC
) $(LDFLAGS
) -o
$@ rastertohp.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
357 testraster
: testraster.o ..
/cups
/libcups.a libcupsimage.a
359 $(CC
) $(LDFLAGS
) -o
$@ testraster.o libcupsimage.a ..
/cups
/libcups.a \
360 $(IMGLIBS
) $(DSOLIBS
) $(COMMONLIBS
) $(SSLLIBS
) $(LIBGSSAPI
)
367 rasterbench
: rasterbench.o libcupsimage.a
369 $(CC
) $(LDFLAGS
) -o
$@ rasterbench.o libcupsimage.a
$(LIBS
)
376 texttops
: texttops.o textcommon.o common.o \
379 $(CC
) $(LDFLAGS
) -o
$@ texttops.o textcommon.o common.o
$(LIBS
)
390 # End of "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $".