2 # "$Id: Makefile 5649 2006-06-14 21:03:17Z 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
) \
40 HPGLOBJS
= hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
41 hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
42 IMAGEOBJS
= image-bmp.o image-colorspace.o image-gif.o image-jpeg.o \
43 image-photocd.o image-pix.o image-png.o image-pnm.o \
44 image-sgi.o image-sgilib.o image-sun.o image-tiff.o \
45 image-zoom.o image.o interpret.o raster.o
46 IMAGE32OBJS
= $(IMAGEOBJS
:.o
=.32.o
)
47 IMAGE64OBJS
= $(IMAGEOBJS
:.o
=.64.o
)
48 FORMOBJS
= form-attr.o form-main.o form-ps.o form-text.o form-tree.o
49 OBJS
= $(HPGLOBJS
) $(IMAGEOBJS
) $(FORMOBJS
) \
50 gziptoany.o imagetops.o imagetoraster.o common.o pstops.o \
51 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
52 testimage.o testraster.o textcommon.o texttops.o
63 # Clean all object files...
67 $(RM
) $(OBJS
) $(TARGETS
)
68 $(RM
) libcupsimage.so libcupsimage.sl libcupsimage.dylib
73 # Update dependencies (without system header dependencies...)
77 touch Dependencies.tmp
78 makedepend
-Y
-I..
-fDependencies.tmp
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
80 cp Dependencies.tmp Dependencies
81 sed
-r
-e
'1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp
>>Dependencies
82 sed
-r
-e
'1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp
>>Dependencies
83 $(RM
) Dependencies.tmp
87 # Install all targets...
90 install: all installhdrs
$(INSTALLSTATIC
) $(INSTALL32
) $(INSTALL64
)
91 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/filter
92 for file in
$(FILTERS
); do \
93 $(INSTALL_BIN
) $$file $(SERVERBIN
)/filter; \
95 $(RM
) $(SERVERBIN
)/filter/rastertodymo
96 $(LN
) rastertolabel
$(SERVERBIN
)/filter/rastertodymo
97 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
98 $(INSTALL_LIB
) $(LIBCUPSIMAGE
) $(LIBDIR
)
99 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.so.2" -o
$(LIBCUPSIMAGE
) = "libcupsimage.sl.2"; then \
100 $(RM
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
101 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
103 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.2.dylib"; then \
104 $(STRIP
) -x
$(LIBDIR
)/$(LIBCUPSIMAGE
); \
105 $(RM
) $(LIBDIR
)/libcupsimage.dylib
; \
106 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/libcupsimage.dylib
; \
110 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
111 $(INSTALL_LIB
) libcupsimage.a
$(LIBDIR
);
112 $(RANLIB
) $(LIBDIR
)/libcupsimage.a
;
115 $(INSTALL_DIR
) -m
755 $(INCLUDEDIR
)/cups
116 $(INSTALL_DATA
) image.h
$(INCLUDEDIR
)/cups
117 $(INSTALL_DATA
) raster.h
$(INCLUDEDIR
)/cups
120 $(INSTALL_DIR
) -m
755 $(LIB32DIR
)
121 $(INSTALL_LIB
) 32bit
/libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
.2
122 $(LN
) libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
125 $(INSTALL_DIR
) -m
755 $(LIB64DIR
)
126 $(INSTALL_LIB
) 64bit
/libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
.2
127 $(LN
) libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
131 # Uninstall all targets...
134 uninstall: $(UNINSTALL32
) $(UNINSTALL64
)
135 for file in
$(FILTERS
); do \
136 $(RM
) $(SERVERBIN
)/filter/$$file; \
138 $(RM
) $(SERVERBIN
)/filter/rastertodymo
139 -$(RMDIR
) $(SERVERBIN
)/filter
140 -$(RMDIR
) $(SERVERBIN
)
141 $(RM
) $(LIBDIR
)/libcupsimage
.2.dylib
142 $(RM
) $(LIBDIR
)/libcupsimage.a
143 $(RM
) $(LIBDIR
)/libcupsimage.dylib
144 $(RM
) $(LIBDIR
)/libcupsimage_s.a
145 $(RM
) $(LIBDIR
)/libcupsimage.sl
146 $(RM
) $(LIBDIR
)/libcupsimage.sl
.2
147 $(RM
) $(LIBDIR
)/libcupsimage.so
148 $(RM
) $(LIBDIR
)/libcupsimage.so
.2
150 $(RM
) $(INCLUDEDIR
)/cups
/image.h
151 $(RM
) $(INCLUDEDIR
)/cups
/raster.h
152 -$(RMDIR
) $(INCLUDEDIR
)/cups
155 $(RM
) $(LIB32DIR
)/libcupsimage.so
156 $(RM
) $(LIB32DIR
)/libcupsimage.so
.2
157 -$(RMDIR
) $(LIB32DIR
)
160 $(RM
) $(LIB64DIR
)/libcupsimage.so
161 $(RM
) $(LIB64DIR
)/libcupsimage.so
.2
162 -$(RMDIR
) $(LIB64DIR
)
166 # Automatic API help files...
170 echo Generating CUPS API help files...
171 mxmldoc
--section
"Programming" --title
"Raster API" \
172 --intro api-raster.shtml \
173 raster.h interpret.c raster.c
>..
/doc
/help
/api-raster.html
180 formtops
: $(FORMOBJS
) common.o ..
/cups
/$(LIBCUPS
)
182 $(CC
) $(LDFLAGS
) -o
$@
$(FORMOBJS
) common.o
$(LIBS
) -lm
189 gziptoany
: gziptoany.o ..
/Makedefs ..
/cups
/$(LIBCUPS
)
191 $(CC
) $(LDFLAGS
) -o
$@ gziptoany.o
$(LIBZ
) $(LIBS
)
198 hpgltops
: $(HPGLOBJS
) common.o ..
/cups
/$(LIBCUPS
)
200 $(CC
) $(LDFLAGS
) -o
$@
$(HPGLOBJS
) common.o
$(LIBS
) -lm
204 # libcupsimage.so.2, libcupsimage.sl.2
207 libcupsimage.so
.2 libcupsimage.sl
.2: $(IMAGEOBJS
)
209 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
) $(DSOLIBS
) \
210 -L..
/cups
$(LINKCUPS
) -lm
211 $(RM
) `basename $@ .2`
212 $(LN
) $@
`basename $@ .2`
216 # 32bit/libcupsimage.so.2
219 32bit
/libcupsimage.so
.2: $(IMAGE32OBJS
)
220 echo Linking
32-bit
$@...
222 $(DSO
) $(ARCH32FLAGS
) $(DSO32FLAGS
) -o
$@
$(IMAGE32OBJS
) $(DSOLIBS
) \
223 -L..
/cups
/32bit
$(LINKCUPS
) -lm
227 # 64bit/libcupsimage.so.2
230 64bit
/libcupsimage.so
.2: $(IMAGE64OBJS
)
231 echo Linking
64-bit
$@...
233 $(DSO
) $(ARCH64FLAGS
) $(DSO64FLAGS
) -o
$@
$(IMAGE64OBJS
) $(DSOLIBS
) \
234 -L..
/cups
/64bit
$(LINKCUPS
) -lm
238 # libcupsimage.2.dylib
241 libcupsimage
.2.dylib
: $(IMAGEOBJS
)
243 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
244 -install_name
$(libdir)/$@ \
245 -current_version
2.2.0 \
246 -compatibility_version
2.0.0 \
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:2
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 rastertolabel
: rastertolabel.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
333 $(CC
) $(LDFLAGS
) -o
$@ rastertolabel.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
340 rastertoepson
: rastertoepson.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
342 $(CC
) $(LDFLAGS
) -o
$@ rastertoepson.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
349 rastertohp
: rastertohp.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
351 $(CC
) $(LDFLAGS
) -o
$@ rastertohp.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
358 testraster
: testraster.o raster.o
360 $(CC
) $(LDFLAGS
) -o
$@ testraster.o raster.o
367 rasterbench
: rasterbench.o raster.o
369 $(CC
) $(LDFLAGS
) -o
$@ rasterbench.o raster.o
376 texttops
: texttops.o textcommon.o common.o \
379 $(CC
) $(LDFLAGS
) -o
$@ texttops.o textcommon.o common.o
$(LIBS
)
390 # End of "$Id: Makefile 5649 2006-06-14 21:03:17Z mike $".