2 # "$Id: Makefile 5354 2006-03-29 20:55:15Z mike $"
4 # Filter makefile for the Common UNIX Printing System (CUPS).
6 # Copyright 1997-2006 by Easy Software Products.
8 # These coded instructions, statements, and computer programs are the
9 # property of Easy Software Products and are protected by Federal
10 # copyright law. Distribution and use rights are outlined in the file
11 # "LICENSE.txt" which should have been included with this file. If this
12 # file is missing or damaged please contact Easy Software Products
15 # Attn: CUPS Licensing Information
16 # Easy Software Products
17 # 44141 Airport View Drive, Suite 204
18 # Hollywood, Maryland 20636 USA
20 # Voice: (301) 373-9600
21 # EMail: cups-info@cups.org
22 # WWW: http://www.cups.org
24 # This file is subject to the Apple OS-Developed Software exception.
29 FILTERS
= gziptoany hpgltops texttops pstops
$(IMGFILTERS
) \
30 rastertolabel rastertoepson rastertohp
31 TARGETS
= $(FILTERS
) \
39 HPGLOBJS
= hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
40 hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
41 IMAGEOBJS
= image-bmp.o image-colorspace.o image-gif.o image-jpeg.o \
42 image-photocd.o image-pix.o image-png.o image-pnm.o \
43 image-sgi.o image-sgilib.o image-sun.o image-tiff.o \
44 image-zoom.o image.o interpret.o raster.o
45 IMAGE32OBJS
= $(IMAGEOBJS
:.o
=.32.o
)
46 IMAGE64OBJS
= $(IMAGEOBJS
:.o
=.64.o
)
47 FORMOBJS
= form-attr.o form-main.o form-ps.o form-text.o form-tree.o
48 OBJS
= $(HPGLOBJS
) $(IMAGEOBJS
) $(FORMOBJS
) \
49 gziptoany.o imagetops.o imagetoraster.o common.o pstops.o \
50 raster.o rastertoepson.o rastertohp.o rastertolabel.o \
51 testimage.o testraster.o textcommon.o texttops.o
62 # Clean all object files...
66 $(RM
) $(OBJS
) $(TARGETS
)
67 $(RM
) libcupsimage.so libcupsimage.sl libcupsimage.dylib
68 $(RM
) libcupsimage
.32.so libcupsimage
.64.so
72 # Update dependencies (without system header dependencies...)
76 touch Dependencies.tmp
77 makedepend
-Y
-I..
-fDependencies.tmp
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
79 cp Dependencies.tmp Dependencies
80 sed
-r
-e
'1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp
>>Dependencies
81 sed
-r
-e
'1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp
>>Dependencies
82 $(RM
) Dependencies.tmp
86 # Install all targets...
89 install: all installhdrs
$(INSTALLSTATIC
) $(INSTALL32
) $(INSTALL64
)
90 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/filter
91 for file in
$(FILTERS
); do \
92 $(INSTALL_BIN
) $$file $(SERVERBIN
)/filter; \
94 $(RM
) $(SERVERBIN
)/filter/rastertodymo
95 $(LN
) rastertolabel
$(SERVERBIN
)/filter/rastertodymo
96 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
97 $(INSTALL_LIB
) $(LIBCUPSIMAGE
) $(LIBDIR
)
98 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.so.2" -o
$(LIBCUPSIMAGE
) = "libcupsimage.sl.2"; then \
99 $(RM
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
100 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
102 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.2.dylib"; then \
103 $(STRIP
) -x
$(LIBDIR
)/$(LIBCUPSIMAGE
); \
104 $(RM
) $(LIBDIR
)/libcupsimage.dylib
; \
105 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/libcupsimage.dylib
; \
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
) libcupsimage
.32.so
.2 $(LIB32DIR
)/libcupsimage.so
.2
121 $(LN
) libcupsimage.so
$(LIB32DIR
)/libcupsimage.so
.2
124 $(INSTALL_DIR
) -m
755 $(LIB64DIR
)
125 $(INSTALL_LIB
) libcupsimage
.64.so
.2 $(LIB64DIR
)/libcupsimage.so
.2
126 $(LN
) libcupsimage.so
$(LIB64DIR
)/libcupsimage.so
.2
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
) -lm
209 $(RM
) `basename $@ .2`
210 $(LN
) $@
`basename $@ .2`
214 # libcupsimage.32.so.2
217 libcupsimage
.32.so
.2: $(IMAGE32OBJS
)
218 echo Linking
32-bit
$@...
219 $(DSO
) $(ARCH32FLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGE32OBJS
) $(DSOLIBS
) -lm
223 # libcupsimage.64.so.2
226 libcupsimage
.64.so
.2: $(IMAGE64OBJS
)
227 echo Linking
64-bit
$@...
228 $(DSO
) $(ARCH64FLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGE64OBJS
) $(DSOLIBS
) -lm
232 # libcupsimage.2.dylib
235 libcupsimage
.2.dylib
: $(IMAGEOBJS
)
237 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
238 -install_name
$(libdir)/$@ \
239 -current_version
2.2.0 \
240 -compatibility_version
2.0.0 \
241 $(IMAGEOBJS
) $(DSOLIBS
) -L..
/cups
$(LINKCUPS
) -lm
242 $(RM
) libcupsimage.dylib
243 $(LN
) $@ libcupsimage.dylib
250 libcupsimage_s.a
: $(IMAGEOBJS
)
252 $(DSO
) $(DSOFLAGS
) -Wl
,-berok
,-bexport
:libcupsimage_s.exp \
253 -o libcupsimage_s.o
$(IMAGEOBJS
) $(DSOLIBS
) -lm
255 $(AR
) $(ARFLAGS
) $@ libcupsimage_s.o
262 libcupsimage.la
: $(IMAGEOBJS
)
264 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
:.o
=.lo
) $(DSOLIBS
) \
265 -rpath
$(LIBDIR
) -version-info
2:2
272 libcupsimage.a
: $(IMAGEOBJS
)
275 $(AR
) $(ARFLAGS
) $@
$(IMAGEOBJS
)
283 testimage
: testimage.o libcupsimage.a ..
/Makedefs
285 $(CC
) $(LDFLAGS
) -o
$@ testimage.o libcupsimage.a \
286 $(IMGLIBS
) $(DSOLIBS
) $(LIBS
)
293 imagetops
: imagetops.o common.o
$(LIBCUPSIMAGE
) \
296 $(CC
) $(LDFLAGS
) -o
$@ imagetops.o common.o
$(LINKCUPSIMAGE
) \
304 imagetoraster
: imagetoraster.o common.o
$(LIBCUPSIMAGE
) \
307 $(CC
) $(LDFLAGS
) -o
$@ imagetoraster.o common.o
$(LINKCUPSIMAGE
) \
315 pstops
: pstops.o common.o ..
/cups
/$(LIBCUPS
)
317 $(CC
) $(LDFLAGS
) -o
$@ pstops.o common.o
$(LIBS
) -lm
324 rastertolabel
: rastertolabel.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
326 $(CC
) $(LDFLAGS
) -o
$@ rastertolabel.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
333 rastertoepson
: rastertoepson.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
335 $(CC
) $(LDFLAGS
) -o
$@ rastertoepson.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
342 rastertohp
: rastertohp.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
344 $(CC
) $(LDFLAGS
) -o
$@ rastertohp.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
351 testraster
: testraster.o raster.o
353 $(CC
) $(LDFLAGS
) -o
$@ testraster.o raster.o
360 texttops
: texttops.o textcommon.o common.o \
363 $(CC
) $(LDFLAGS
) -o
$@ texttops.o textcommon.o common.o
$(LIBS
)
374 # End of "$Id: Makefile 5354 2006-03-29 20:55:15Z mike $".