2 # "$Id: Makefile 5065 2006-02-03 16:55:30Z 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.
83 # Header files to install...
102 # Targets in this directory...
118 # Make all targets...
125 # Remove object and target files...
129 $(RM
) $(OBJS
) $(TARGETS
) `basename $(LIBCUPS) .2` libcups.dylib
133 # Update dependencies (without system header dependencies...)
137 makedepend
-Y
-I..
-fDependencies
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
141 # Install object and target files...
144 install: all installhdrs
$(INSTALLSTATIC
)
145 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
146 $(INSTALL_LIB
) $(LIBCUPS
) $(LIBDIR
)
147 if
test $(LIBCUPS
) = "libcups.so.2" -o
$(LIBCUPS
) = "libcups.sl.2"; then \
148 $(RM
) $(LIBDIR
)/`basename $(LIBCUPS) .2`; \
149 $(LN
) $(LIBCUPS
) $(LIBDIR
)/`basename $(LIBCUPS) .2`; \
151 if
test $(LIBCUPS
) = "libcups.2.dylib"; then \
152 $(STRIP
) -x
$(LIBDIR
)/$(LIBCUPS
); \
153 $(RM
) $(LIBDIR
)/libcups.dylib
; \
154 $(LN
) $(LIBCUPS
) $(LIBDIR
)/libcups.dylib
; \
158 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
159 if
test $(LIBCUPS
) != "libcups.a"; then \
160 $(INSTALL_LIB
) libcups.a
$(LIBDIR
); \
161 $(RANLIB
) $(LIBDIR
)/libcups.a
; \
165 $(INSTALL_DIR
) -m
755 $(INCLUDEDIR
)/cups
166 for file in
$(HEADERS
); do \
167 $(INSTALL_DATA
) $$file $(INCLUDEDIR
)/cups
; \
172 # libcups.so.2, libcups.sl.2
175 libcups.so
.2 libcups.sl
.2: $(LIBOBJS
)
177 $(DSO
) $(DSOFLAGS
) -o
$@
$(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
178 $(RM
) `basename $@ .2`
179 $(LN
) $@
`basename $@ .2`
186 libcups
.2.dylib
: $(LIBOBJS
)
188 $(DSO
) $(DSOFLAGS
) -o
$@ \
189 -install_name
$(libdir)/$@ \
190 -current_version
2.7.0 \
191 -compatibility_version
2.0.0 \
192 $(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
194 $(LN
) $@ libcups.dylib
201 libcups_s.a
: $(LIBOBJS
)
203 $(DSO
) $(DSOFLAGS
) -Wl
,-bexport
:libcups_s.exp
-o libcups_s.o
$(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
) -lm
205 $(AR
) $(ARFLAGS
) $@ libcups_s.o
212 libcups.la
: $(LIBOBJS
)
214 $(CC
) $(DSOFLAGS
) -o
$@
$(LIBOBJS
:.o
=.lo
) -rpath
$(LIBDIR
) \
215 -version-info
2:7 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
222 libcups.a
: $(LIBOBJS
)
225 $(AR
) $(ARFLAGS
) $@
$(LIBOBJS
)
230 # CUPS language bindings for various scripting languages...
233 phpcups.so
: $(LIBCUPS
) php_cups_wrap.o
235 if
test `uname` = Darwin
; then \
236 DSOFLAGS
="-bundle -flat_namespace -undefined suppress"; \
238 DSOFLAGS
="$(DSOFLAGS)"; \
240 $(DSO
) $$DSOFLAGS -o
$@ php_cups_wrap.o
$(LIBS
) `php-config --ldflags --libs`
242 php_cups_wrap.o
: php_cups_wrap.c
244 $(CC
) $(CFLAGS
) `php-config --includes` -c
$<
245 php_cups_wrap.c
: cups.h
246 echo Creating
$< using SWIG...
247 swig
-php
-o
$@
-module cups cups.h
251 # testarray (dependency on static CUPS library is intentional)
254 testarray
: testarray.o libcups.a
256 $(CC
) $(LDFLAGS
) -o
$@ testarray.o libcups.a \
257 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
261 # testfile (dependency on static CUPS library is intentional)
264 testfile
: testfile.o libcups.a
266 $(CC
) $(LDFLAGS
) -o
$@ testfile.o libcups.a \
267 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
271 # testhttp (dependency on static CUPS library is intentional)
274 testhttp
: testhttp.o libcups.a
276 $(CC
) $(LDFLAGS
) -o
$@ testhttp.o libcups.a \
277 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
281 # testipp (dependency on static CUPS library is intentional)
284 testipp
: testipp.o libcups.a
286 $(CC
) $(LDFLAGS
) -o
$@ testipp.o libcups.a \
287 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
291 # testi18n (dependency on static CUPS library is intentional)
294 testi18n
: testi18n.o libcups.a
296 $(CC
) $(LDFLAGS
) -o
$@ testi18n.o libcups.a \
297 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
301 # testlang (dependency on static CUPS library is intentional)
304 testlang
: testlang.o libcups.a
306 $(CC
) $(LDFLAGS
) -o
$@ testlang.o libcups.a \
307 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
311 # testppd (dependency on static CUPS library is intentional)
314 testppd
: testppd.o libcups.a
316 $(CC
) $(LDFLAGS
) -o
$@ testppd.o libcups.a \
317 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
321 # Automatic API help files...
325 echo Generating CUPS API help files...
326 mxmldoc
--section
"Programming" --title
"Array API" \
327 --intro api-array.shtml \
328 array.h array.c
>..
/doc
/help
/api-array.html
329 mxmldoc
--section
"Programming" --title
"CUPS API" \
330 --intro api-cups.shtml \
331 cups.h auth.c dest.c encode.c getputfile.c language.c \
332 options.c tempfile.c usersys.c \
333 util.c
>..
/doc
/help
/api-cups.html
334 mxmldoc
--section
"Programming" --title
"File and Directory APIs" \
335 --intro api-filedir.shtml \
336 file.h file.c
dir.h
dir.c
>..
/doc
/help
/api-filedir.html
337 mxmldoc
--section
"Programming" --title
"PPD API" \
338 --intro api-ppd.shtml \
339 ppd.h attr.c emit.c mark.c page.c \
340 ppd.c
>..
/doc
/help
/api-ppd.html
341 mxmldoc
--section
"Programming" --title
"HTTP and IPP APIs" \
342 --intro api-httpipp.shtml \
343 cups.h http.h ipp.h \
344 auth.c dest.c encode.c getputfile.c http.c http-addr.c \
345 http-support.c ipp.c ipp-support.c md5passwd.c options.c \
346 usersys.c util.c
>..
/doc
/help
/api-httpipp.html
347 mxmldoc
--section
"Programming" --title
"Filter and Backend APIs" \
348 --intro api-filter.shtml \
349 backchannel.c
>..
/doc
/help
/api-filter.html
360 # End of "$Id: Makefile 5065 2006-02-03 16:55:30Z mike $".