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
-r
-e
'1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp
>>Dependencies
75 sed
-r
-e
'1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp
>>Dependencies
76 $(RM
) Dependencies.tmp
80 # Install all targets...
83 install: all installhdrs
$(INSTALLSTATIC
) $(INSTALL32
) $(INSTALL64
)
84 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/filter
85 for file in
$(FILTERS
); do \
86 $(INSTALL_BIN
) $$file $(SERVERBIN
)/filter; \
88 $(RM
) $(SERVERBIN
)/filter/rastertodymo
89 $(LN
) rastertolabel
$(SERVERBIN
)/filter/rastertodymo
90 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
91 $(INSTALL_LIB
) $(LIBCUPSIMAGE
) $(LIBDIR
)
92 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.so.2" -o
$(LIBCUPSIMAGE
) = "libcupsimage.sl.2"; then \
93 $(RM
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
94 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
96 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.2.dylib"; then \
97 $(STRIP
) -x
$(LIBDIR
)/$(LIBCUPSIMAGE
); \
98 $(RM
) $(LIBDIR
)/libcupsimage.dylib
; \
99 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/libcupsimage.dylib
; \
101 if
test "x$(SYMROOT)" != "x"; then \
102 $(INSTALL_DIR
) $(SYMROOT
); \
103 for file in
$(TARGETS
); do \
104 cp
$$file $(SYMROOT
); \
109 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
110 $(INSTALL_LIB
) libcupsimage.a
$(LIBDIR
);
111 $(RANLIB
) $(LIBDIR
)/libcupsimage.a
;
114 $(INSTALL_DIR
) -m
755 $(INCLUDEDIR
)/cups
115 $(INSTALL_DATA
) image.h
$(INCLUDEDIR
)/cups
116 $(INSTALL_DATA
) raster.h
$(INCLUDEDIR
)/cups
119 $(INSTALL_DIR
) -m
755 $(LIB32DIR
)
120 $(INSTALL_LIB
) 32bit
/libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
.2
121 $(LN
) libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
124 $(INSTALL_DIR
) -m
755 $(LIB64DIR
)
125 $(INSTALL_LIB
) 64bit
/libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
.2
126 $(LN
) libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
130 # Uninstall all targets...
133 uninstall: $(UNINSTALL32
) $(UNINSTALL64
)
134 for file in
$(FILTERS
); do \
135 $(RM
) $(SERVERBIN
)/filter/$$file; \
137 $(RM
) $(SERVERBIN
)/filter/rastertodymo
138 -$(RMDIR
) $(SERVERBIN
)/filter
139 -$(RMDIR
) $(SERVERBIN
)
140 $(RM
) $(LIBDIR
)/libcupsimage
.2.dylib
141 $(RM
) $(LIBDIR
)/libcupsimage.a
142 $(RM
) $(LIBDIR
)/libcupsimage.dylib
143 $(RM
) $(LIBDIR
)/libcupsimage_s.a
144 $(RM
) $(LIBDIR
)/libcupsimage.sl
145 $(RM
) $(LIBDIR
)/libcupsimage.sl
.2
146 $(RM
) $(LIBDIR
)/libcupsimage.so
147 $(RM
) $(LIBDIR
)/libcupsimage.so
.2
149 $(RM
) $(INCLUDEDIR
)/cups
/image.h
150 $(RM
) $(INCLUDEDIR
)/cups
/raster.h
151 -$(RMDIR
) $(INCLUDEDIR
)/cups
154 $(RM
) $(LIB32DIR
)/libcupsimage.so
155 $(RM
) $(LIB32DIR
)/libcupsimage.so
.2
156 -$(RMDIR
) $(LIB32DIR
)
159 $(RM
) $(LIB64DIR
)/libcupsimage.so
160 $(RM
) $(LIB64DIR
)/libcupsimage.so
.2
161 -$(RMDIR
) $(LIB64DIR
)
165 # Automatic API help files...
169 echo Generating CUPS API help files...
170 mxmldoc
--section
"Programming" --title
"Raster API" \
171 --intro api-raster.shtml \
172 raster.h interpret.c raster.c
>..
/doc
/help
/api-raster.html
179 formtops
: $(FORMOBJS
) common.o ..
/cups
/$(LIBCUPS
)
181 $(CC
) $(LDFLAGS
) -o
$@
$(FORMOBJS
) common.o
$(LIBS
) -lm
188 gziptoany
: gziptoany.o ..
/Makedefs ..
/cups
/$(LIBCUPS
)
190 $(CC
) $(LDFLAGS
) -o
$@ gziptoany.o
$(LIBZ
) $(LIBS
)
197 hpgltops
: $(HPGLOBJS
) common.o ..
/cups
/$(LIBCUPS
)
199 $(CC
) $(LDFLAGS
) -o
$@
$(HPGLOBJS
) common.o
$(LIBS
) -lm
203 # libcupsimage.so.2, libcupsimage.sl.2
206 libcupsimage.so
.2 libcupsimage.sl
.2: $(IMAGEOBJS
)
208 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
) $(DSOLIBS
) \
209 -L..
/cups
$(LINKCUPS
) -lm
210 $(RM
) `basename $@ .2`
211 $(LN
) $@
`basename $@ .2`
215 # 32bit/libcupsimage.so.2
218 32bit
/libcupsimage.so
.2: $(IMAGE32OBJS
)
219 echo Linking
32-bit
$@...
221 $(DSO
) $(ARCH32FLAGS
) $(DSO32FLAGS
) -o
$@
$(IMAGE32OBJS
) $(DSOLIBS
) \
222 -L..
/cups
/32bit
$(LINKCUPS
) -lm
226 # 64bit/libcupsimage.so.2
229 64bit
/libcupsimage.so
.2: $(IMAGE64OBJS
)
230 echo Linking
64-bit
$@...
232 $(DSO
) $(ARCH64FLAGS
) $(DSO64FLAGS
) -o
$@
$(IMAGE64OBJS
) $(DSOLIBS
) \
233 -L..
/cups
/64bit
$(LINKCUPS
) -lm
237 # libcupsimage.2.dylib
240 libcupsimage
.2.dylib
: $(IMAGEOBJS
) $(LIBCUPSIMAGEORDER
)
242 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
243 -install_name
$(libdir)/$@ \
244 -current_version
2.3.0 \
245 -compatibility_version
2.0.0 \
246 -sectorder __TEXT __text
$(LIBCUPSIMAGEORDER
) \
247 $(IMAGEOBJS
) $(DSOLIBS
) -L..
/cups
$(LINKCUPS
) -lm
248 $(RM
) libcupsimage.dylib
249 $(LN
) $@ libcupsimage.dylib
256 libcupsimage_s.a
: $(IMAGEOBJS
) libcupsimage_s.exp
258 $(DSO
) $(DSOFLAGS
) -Wl
,-berok
,-bexport
:libcupsimage_s.exp \
259 -o libcupsimage_s.o
$(IMAGEOBJS
) $(DSOLIBS
) -lm
261 $(AR
) $(ARFLAGS
) $@ libcupsimage_s.o
268 libcupsimage.la
: $(IMAGEOBJS
)
270 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
:.o
=.lo
) $(DSOLIBS
) \
271 -L..
/cups
$(LINKCUPS
) \
272 -rpath
$(LIBDIR
) -version-info
2:3
279 libcupsimage.a
: $(IMAGEOBJS
)
282 $(AR
) $(ARFLAGS
) $@
$(IMAGEOBJS
)
290 testimage
: testimage.o libcupsimage.a ..
/Makedefs
292 $(CC
) $(LDFLAGS
) -o
$@ testimage.o libcupsimage.a \
293 $(IMGLIBS
) $(DSOLIBS
) $(LIBS
)
300 imagetops
: imagetops.o common.o
$(LIBCUPSIMAGE
) \
303 $(CC
) $(LDFLAGS
) -o
$@ imagetops.o common.o
$(LINKCUPSIMAGE
) \
311 imagetoraster
: imagetoraster.o common.o
$(LIBCUPSIMAGE
) \
314 $(CC
) $(LDFLAGS
) -o
$@ imagetoraster.o common.o
$(LINKCUPSIMAGE
) \
322 pstops
: pstops.o common.o ..
/cups
/$(LIBCUPS
)
324 $(CC
) $(LDFLAGS
) -o
$@ pstops.o common.o
$(LIBS
) -lm
331 pdftops
: pdftops.o common.o ..
/cups
/$(LIBCUPS
)
333 $(CC
) $(LDFLAGS
) -o
$@ pdftops.o common.o
$(LIBS
)
340 rastertolabel
: rastertolabel.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
342 $(CC
) $(LDFLAGS
) -o
$@ rastertolabel.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
349 rastertoepson
: rastertoepson.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
351 $(CC
) $(LDFLAGS
) -o
$@ rastertoepson.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
358 rastertohp
: rastertohp.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
360 $(CC
) $(LDFLAGS
) -o
$@ rastertohp.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
367 testraster
: testraster.o ..
/cups
/libcups.a libcupsimage.a
369 $(CC
) $(LDFLAGS
) -o
$@ testraster.o libcupsimage.a ..
/cups
/libcups.a \
370 $(IMGLIBS
) $(DSOLIBS
) $(COMMONLIBS
) $(SSLLIBS
) $(LIBGSSAPI
)
377 rasterbench
: rasterbench.o libcupsimage.a
379 $(CC
) $(LDFLAGS
) -o
$@ rasterbench.o libcupsimage.a
$(LIBS
)
386 texttops
: texttops.o textcommon.o common.o \
389 $(CC
) $(LDFLAGS
) -o
$@ texttops.o textcommon.o common.o
$(LIBS
)
400 # End of "$Id: Makefile 6696 2007-07-19 23:27:49Z mike $".