2 # "$Id: Makefile 4961 2006-01-20 22:19:13Z mike $"
4 # API library Makefile for the Common UNIX Printing System (CUPS).
6 # Copyright 1997-2006 by Easy Software Products, all rights reserved.
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.
82 # Header files to install...
101 # Targets in this directory...
117 # Make all targets...
124 # Remove object and target files...
128 $(RM
) $(OBJS
) $(TARGETS
) `basename $(LIBCUPS) .2` libcups.dylib
132 # Update dependencies (without system header dependencies...)
136 makedepend
-Y
-I..
-fDependencies
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
140 # Install object and target files...
143 install: all installhdrs
144 $(INSTALL_DIR
) $(LIBDIR
)
145 $(INSTALL_LIB
) $(LIBCUPS
) $(LIBDIR
)
146 if
test $(LIBCUPS
) = "libcups.so.2" -o
$(LIBCUPS
) = "libcups.sl.2"; then \
147 $(RM
) $(LIBDIR
)/`basename $(LIBCUPS) .2`; \
148 $(LN
) $(LIBCUPS
) $(LIBDIR
)/`basename $(LIBCUPS) .2`; \
150 if
test $(LIBCUPS
) = "libcups.2.dylib"; then \
151 $(STRIP
) -x
$(LIBDIR
)/$(LIBCUPS
); \
152 $(RM
) $(LIBDIR
)/libcups.dylib
; \
153 $(LN
) $(LIBCUPS
) $(LIBDIR
)/libcups.dylib
; \
155 if
test $(LIBCUPS
) != "libcups.a"; then \
156 $(INSTALL_LIB
) libcups.a
$(LIBDIR
); \
157 $(RANLIB
) $(LIBDIR
)/libcups.a
; \
161 $(INSTALL_DIR
) $(INCLUDEDIR
)/cups
162 for file in
$(HEADERS
); do \
163 $(INSTALL_DATA
) $$file $(INCLUDEDIR
)/cups
; \
168 # libcups.so.2, libcups.sl.2
171 libcups.so
.2 libcups.sl
.2: $(LIBOBJS
)
173 $(DSO
) $(DSOFLAGS
) -o
$@
$(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
174 $(RM
) `basename $@ .2`
175 $(LN
) $@
`basename $@ .2`
182 libcups
.2.dylib
: $(LIBOBJS
)
184 $(DSO
) $(DSOFLAGS
) -o
$@ \
185 -install_name
$(libdir)/$@ \
186 -current_version
2.7.0 \
187 -compatibility_version
2.0.0 \
188 $(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
190 $(LN
) $@ libcups.dylib
197 libcups_s.a
: $(LIBOBJS
)
199 $(DSO
) $(DSOFLAGS
) -Wl
,-bexport
:libcups_s.exp
-o libcups_s.o
$(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
) -lm
201 $(AR
) $(ARFLAGS
) $@ libcups_s.o
208 libcups.la
: $(LIBOBJS
)
210 $(CC
) $(DSOFLAGS
) -o
$@
$(LIBOBJS
:.o
=.lo
) -rpath
$(LIBDIR
) \
211 -version-info
2:7 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
218 libcups.a
: $(LIBOBJS
)
221 $(AR
) $(ARFLAGS
) $@
$(LIBOBJS
)
226 # CUPS language bindings for various scripting languages...
229 phpcups.so
: $(LIBCUPS
) php_cups_wrap.o
231 if
test `uname` = Darwin
; then \
232 DSOFLAGS
="-bundle -flat_namespace -undefined suppress"; \
234 DSOFLAGS
="$(DSOFLAGS)"; \
236 $(DSO
) $$DSOFLAGS -o
$@ php_cups_wrap.o
$(LIBS
) `php-config --ldflags --libs`
238 php_cups_wrap.o
: php_cups_wrap.c
240 $(CC
) $(CFLAGS
) `php-config --includes` -c
$<
241 php_cups_wrap.c
: cups.h
242 echo Creating
$< using SWIG...
243 swig
-php
-o
$@
-module cups cups.h
247 # testarray (dependency on static CUPS library is intentional)
250 testarray
: testarray.o libcups.a
252 $(CC
) $(LDFLAGS
) -o
$@ testarray.o libcups.a \
253 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
257 # testfile (dependency on static CUPS library is intentional)
260 testfile
: testfile.o libcups.a
262 $(CC
) $(LDFLAGS
) -o
$@ testfile.o libcups.a \
263 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
267 # testhttp (dependency on static CUPS library is intentional)
270 testhttp
: testhttp.o libcups.a
272 $(CC
) $(LDFLAGS
) -o
$@ testhttp.o libcups.a \
273 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
277 # testipp (dependency on static CUPS library is intentional)
280 testipp
: testipp.o libcups.a
282 $(CC
) $(LDFLAGS
) -o
$@ testipp.o libcups.a \
283 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
287 # testi18n (dependency on static CUPS library is intentional)
290 testi18n
: testi18n.o libcups.a
292 $(CC
) $(LDFLAGS
) -o
$@ testi18n.o libcups.a \
293 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
297 # testlang (dependency on static CUPS library is intentional)
300 testlang
: testlang.o libcups.a
302 $(CC
) $(LDFLAGS
) -o
$@ testlang.o libcups.a \
303 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
307 # testppd (dependency on static CUPS library is intentional)
310 testppd
: testppd.o libcups.a
312 $(CC
) $(LDFLAGS
) -o
$@ testppd.o libcups.a \
313 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
317 # Automatic API help files...
321 echo Generating CUPS API help files...
322 mxmldoc
--section
"Programming" --title
"Array API" \
323 --intro api-array.shtml \
324 array.h array.c
>..
/doc
/help
/api-array.html
325 mxmldoc
--section
"Programming" --title
"CUPS API" \
326 --intro api-cups.shtml \
327 cups.h auth.c dest.c encode.c getputfile.c language.c \
328 options.c tempfile.c usersys.c \
329 util.c
>..
/doc
/help
/api-cups.html
330 mxmldoc
--section
"Programming" --title
"File and Directory APIs" \
331 --intro api-filedir.shtml \
332 file.h file.c
dir.h
dir.c
>..
/doc
/help
/api-filedir.html
333 mxmldoc
--section
"Programming" --title
"PPD API" \
334 --intro api-ppd.shtml \
335 ppd.h attr.c emit.c mark.c page.c \
336 ppd.c
>..
/doc
/help
/api-ppd.html
337 mxmldoc
--section
"Programming" --title
"HTTP and IPP APIs" \
338 --intro api-httpipp.shtml \
339 cups.h http.h ipp.h \
340 auth.c dest.c encode.c getputfile.c http.c http-addr.c \
341 http-support.c ipp.c ipp-support.c md5passwd.c options.c \
342 usersys.c util.c
>..
/doc
/help
/api-httpipp.html
343 mxmldoc
--section
"Programming" --title
"Filter and Backend APIs" \
344 --intro api-filter.shtml \
345 backchannel.c
>..
/doc
/help
/api-filter.html
356 # End of "$Id: Makefile 4961 2006-01-20 22:19:13Z mike $".