2 # "$Id: Makefile 6315 2007-03-03 00:12:26Z 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.
30 FILTERS
= gziptoany hpgltops texttops pstops
$(IMGFILTERS
) \
31 rastertolabel rastertoepson rastertohp
32 TARGETS
= $(FILTERS
) \
41 HPGLOBJS
= hpgl-attr.o hpgl-config.o hpgl-main.o hpgl-prolog.o \
42 hpgl-char.o hpgl-input.o hpgl-polygon.o hpgl-vector.o
43 IMAGEOBJS
= image-bmp.o image-colorspace.o image-gif.o image-jpeg.o \
44 image-photocd.o image-pix.o image-png.o image-pnm.o \
45 image-sgi.o image-sgilib.o image-sun.o image-tiff.o \
46 image-zoom.o image.o error.o interpret.o raster.o
47 IMAGE32OBJS
= $(IMAGEOBJS
:.o
=.32.o
)
48 IMAGE64OBJS
= $(IMAGEOBJS
:.o
=.64.o
)
49 FORMOBJS
= form-attr.o form-main.o form-ps.o form-text.o form-tree.o
50 OBJS
= $(HPGLOBJS
) $(IMAGEOBJS
) $(FORMOBJS
) \
51 gziptoany.o imagetops.o imagetoraster.o common.o pstops.o \
52 rasterbench.o rastertoepson.o rastertohp.o rastertolabel.o \
53 testimage.o testraster.o textcommon.o texttops.o
64 # Clean all object files...
68 $(RM
) $(OBJS
) $(TARGETS
)
69 $(RM
) libcupsimage.so libcupsimage.sl libcupsimage.dylib
74 # Update dependencies (without system header dependencies...)
78 touch Dependencies.tmp
79 makedepend
-Y
-I..
-fDependencies.tmp
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
81 cp Dependencies.tmp Dependencies
82 sed
-r
-e
'1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp
>>Dependencies
83 sed
-r
-e
'1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp
>>Dependencies
84 $(RM
) Dependencies.tmp
88 # Install all targets...
91 install: all installhdrs
$(INSTALLSTATIC
) $(INSTALL32
) $(INSTALL64
)
92 $(INSTALL_DIR
) -m
755 $(SERVERBIN
)/filter
93 for file in
$(FILTERS
); do \
94 $(INSTALL_BIN
) $$file $(SERVERBIN
)/filter; \
96 $(RM
) $(SERVERBIN
)/filter/rastertodymo
97 $(LN
) rastertolabel
$(SERVERBIN
)/filter/rastertodymo
98 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
99 $(INSTALL_LIB
) $(LIBCUPSIMAGE
) $(LIBDIR
)
100 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.so.2" -o
$(LIBCUPSIMAGE
) = "libcupsimage.sl.2"; then \
101 $(RM
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
102 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/`basename $(LIBCUPSIMAGE) .2`; \
104 -if
test $(LIBCUPSIMAGE
) = "libcupsimage.2.dylib"; then \
105 $(STRIP
) -x
$(LIBDIR
)/$(LIBCUPSIMAGE
); \
106 $(RM
) $(LIBDIR
)/libcupsimage.dylib
; \
107 $(LN
) $(LIBCUPSIMAGE
) $(LIBDIR
)/libcupsimage.dylib
; \
111 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
112 $(INSTALL_LIB
) libcupsimage.a
$(LIBDIR
);
113 $(RANLIB
) $(LIBDIR
)/libcupsimage.a
;
116 $(INSTALL_DIR
) -m
755 $(INCLUDEDIR
)/cups
117 $(INSTALL_DATA
) image.h
$(INCLUDEDIR
)/cups
118 $(INSTALL_DATA
) raster.h
$(INCLUDEDIR
)/cups
121 $(INSTALL_DIR
) -m
755 $(LIB32DIR
)
122 $(INSTALL_LIB
) 32bit
/libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
.2
123 $(LN
) libcupsimage.so
.2 $(LIB32DIR
)/libcupsimage.so
126 $(INSTALL_DIR
) -m
755 $(LIB64DIR
)
127 $(INSTALL_LIB
) 64bit
/libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
.2
128 $(LN
) libcupsimage.so
.2 $(LIB64DIR
)/libcupsimage.so
132 # Uninstall all targets...
135 uninstall: $(UNINSTALL32
) $(UNINSTALL64
)
136 for file in
$(FILTERS
); do \
137 $(RM
) $(SERVERBIN
)/filter/$$file; \
139 $(RM
) $(SERVERBIN
)/filter/rastertodymo
140 -$(RMDIR
) $(SERVERBIN
)/filter
141 -$(RMDIR
) $(SERVERBIN
)
142 $(RM
) $(LIBDIR
)/libcupsimage
.2.dylib
143 $(RM
) $(LIBDIR
)/libcupsimage.a
144 $(RM
) $(LIBDIR
)/libcupsimage.dylib
145 $(RM
) $(LIBDIR
)/libcupsimage_s.a
146 $(RM
) $(LIBDIR
)/libcupsimage.sl
147 $(RM
) $(LIBDIR
)/libcupsimage.sl
.2
148 $(RM
) $(LIBDIR
)/libcupsimage.so
149 $(RM
) $(LIBDIR
)/libcupsimage.so
.2
151 $(RM
) $(INCLUDEDIR
)/cups
/image.h
152 $(RM
) $(INCLUDEDIR
)/cups
/raster.h
153 -$(RMDIR
) $(INCLUDEDIR
)/cups
156 $(RM
) $(LIB32DIR
)/libcupsimage.so
157 $(RM
) $(LIB32DIR
)/libcupsimage.so
.2
158 -$(RMDIR
) $(LIB32DIR
)
161 $(RM
) $(LIB64DIR
)/libcupsimage.so
162 $(RM
) $(LIB64DIR
)/libcupsimage.so
.2
163 -$(RMDIR
) $(LIB64DIR
)
167 # Automatic API help files...
171 echo Generating CUPS API help files...
172 mxmldoc
--section
"Programming" --title
"Raster API" \
173 --intro api-raster.shtml \
174 raster.h interpret.c raster.c
>..
/doc
/help
/api-raster.html
181 formtops
: $(FORMOBJS
) common.o ..
/cups
/$(LIBCUPS
)
183 $(CC
) $(LDFLAGS
) -o
$@
$(FORMOBJS
) common.o
$(LIBS
) -lm
190 gziptoany
: gziptoany.o ..
/Makedefs ..
/cups
/$(LIBCUPS
)
192 $(CC
) $(LDFLAGS
) -o
$@ gziptoany.o
$(LIBZ
) $(LIBS
)
199 hpgltops
: $(HPGLOBJS
) common.o ..
/cups
/$(LIBCUPS
)
201 $(CC
) $(LDFLAGS
) -o
$@
$(HPGLOBJS
) common.o
$(LIBS
) -lm
205 # libcupsimage.so.2, libcupsimage.sl.2
208 libcupsimage.so
.2 libcupsimage.sl
.2: $(IMAGEOBJS
)
210 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
) $(DSOLIBS
) \
211 -L..
/cups
$(LINKCUPS
) -lm
212 $(RM
) `basename $@ .2`
213 $(LN
) $@
`basename $@ .2`
217 # 32bit/libcupsimage.so.2
220 32bit
/libcupsimage.so
.2: $(IMAGE32OBJS
)
221 echo Linking
32-bit
$@...
223 $(DSO
) $(ARCH32FLAGS
) $(DSO32FLAGS
) -o
$@
$(IMAGE32OBJS
) $(DSOLIBS
) \
224 -L..
/cups
/32bit
$(LINKCUPS
) -lm
228 # 64bit/libcupsimage.so.2
231 64bit
/libcupsimage.so
.2: $(IMAGE64OBJS
)
232 echo Linking
64-bit
$@...
234 $(DSO
) $(ARCH64FLAGS
) $(DSO64FLAGS
) -o
$@
$(IMAGE64OBJS
) $(DSOLIBS
) \
235 -L..
/cups
/64bit
$(LINKCUPS
) -lm
239 # libcupsimage.2.dylib
242 libcupsimage
.2.dylib
: $(IMAGEOBJS
)
244 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
245 -install_name
$(libdir)/$@ \
246 -current_version
2.3.0 \
247 -compatibility_version
2.0.0 \
248 $(IMAGEOBJS
) $(DSOLIBS
) -L..
/cups
$(LINKCUPS
) -lm
249 $(RM
) libcupsimage.dylib
250 $(LN
) $@ libcupsimage.dylib
257 libcupsimage_s.a
: $(IMAGEOBJS
) libcupsimage_s.exp
259 $(DSO
) $(DSOFLAGS
) -Wl
,-berok
,-bexport
:libcupsimage_s.exp \
260 -o libcupsimage_s.o
$(IMAGEOBJS
) $(DSOLIBS
) -lm
262 $(AR
) $(ARFLAGS
) $@ libcupsimage_s.o
269 libcupsimage.la
: $(IMAGEOBJS
)
271 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(IMAGEOBJS
:.o
=.lo
) $(DSOLIBS
) \
272 -L..
/cups
$(LINKCUPS
) \
273 -rpath
$(LIBDIR
) -version-info
2:3
280 libcupsimage.a
: $(IMAGEOBJS
)
283 $(AR
) $(ARFLAGS
) $@
$(IMAGEOBJS
)
291 testimage
: testimage.o libcupsimage.a ..
/Makedefs
293 $(CC
) $(LDFLAGS
) -o
$@ testimage.o libcupsimage.a \
294 $(IMGLIBS
) $(DSOLIBS
) $(LIBS
)
301 imagetops
: imagetops.o common.o
$(LIBCUPSIMAGE
) \
304 $(CC
) $(LDFLAGS
) -o
$@ imagetops.o common.o
$(LINKCUPSIMAGE
) \
312 imagetoraster
: imagetoraster.o common.o
$(LIBCUPSIMAGE
) \
315 $(CC
) $(LDFLAGS
) -o
$@ imagetoraster.o common.o
$(LINKCUPSIMAGE
) \
323 pstops
: pstops.o common.o ..
/cups
/$(LIBCUPS
)
325 $(CC
) $(LDFLAGS
) -o
$@ pstops.o common.o
$(LIBS
) -lm
332 rastertolabel
: rastertolabel.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
334 $(CC
) $(LDFLAGS
) -o
$@ rastertolabel.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
341 rastertoepson
: rastertoepson.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
343 $(CC
) $(LDFLAGS
) -o
$@ rastertoepson.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
350 rastertohp
: rastertohp.o ..
/cups
/$(LIBCUPS
) $(LIBCUPSIMAGE
)
352 $(CC
) $(LDFLAGS
) -o
$@ rastertohp.o
$(LINKCUPSIMAGE
) $(IMGLIBS
) $(LIBS
)
359 testraster
: testraster.o ..
/cups
/libcups.a libcupsimage.a
361 $(CC
) $(LDFLAGS
) -o
$@ testraster.o libcupsimage.a ..
/cups
/libcups.a \
362 $(IMGLIBS
) $(DSOLIBS
) $(COMMONLIBS
) $(SSLLIBS
) $(LIBGSSAPI
)
369 rasterbench
: rasterbench.o libcupsimage.a
371 $(CC
) $(LDFLAGS
) -o
$@ rasterbench.o libcupsimage.a
$(LIBS
)
378 texttops
: texttops.o textcommon.o common.o \
381 $(CC
) $(LDFLAGS
) -o
$@ texttops.o textcommon.o common.o
$(LIBS
)
392 # End of "$Id: Makefile 6315 2007-03-03 00:12:26Z mike $".