2 # "$Id: Makefile 4918 2006-01-12 05:14:40Z 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.
78 # Header files to install...
97 # Targets in this directory...
112 # Make all targets...
119 # Remove object and target files...
123 $(RM
) $(OBJS
) $(TARGETS
) `basename $(LIBCUPS) .2` libcups.dylib
127 # Update dependencies (without system header dependencies...)
131 makedepend
-Y
-I..
-fDependencies
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
135 # Install object and target files...
138 install: all installhdrs
139 $(INSTALL_DIR
) $(LIBDIR
)
140 $(INSTALL_LIB
) $(LIBCUPS
) $(LIBDIR
)
141 if
test $(LIBCUPS
) = "libcups.so.2" -o
$(LIBCUPS
) = "libcups.sl.2"; then \
142 $(RM
) $(LIBDIR
)/`basename $(LIBCUPS) .2`; \
143 $(LN
) $(LIBCUPS
) $(LIBDIR
)/`basename $(LIBCUPS) .2`; \
145 if
test $(LIBCUPS
) = "libcups.2.dylib"; then \
146 $(STRIP
) -x
$(LIBDIR
)/$(LIBCUPS
); \
147 $(RM
) $(LIBDIR
)/libcups.dylib
; \
148 $(LN
) $(LIBCUPS
) $(LIBDIR
)/libcups.dylib
; \
150 if
test $(LIBCUPS
) != "libcups.a"; then \
151 $(INSTALL_LIB
) libcups.a
$(LIBDIR
); \
152 $(RANLIB
) $(LIBDIR
)/libcups.a
; \
156 $(INSTALL_DIR
) $(INCLUDEDIR
)/cups
157 for file in
$(HEADERS
); do \
158 $(INSTALL_DATA
) $$file $(INCLUDEDIR
)/cups
; \
163 # libcups.so.2, libcups.sl.2
166 libcups.so
.2 libcups.sl
.2: $(LIBOBJS
)
168 $(DSO
) $(DSOFLAGS
) -o
$@
$(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
169 $(RM
) `basename $@ .2`
170 $(LN
) $@
`basename $@ .2`
177 libcups
.2.dylib
: $(LIBOBJS
)
179 $(DSO
) $(DSOFLAGS
) -o
$@ \
180 -install_name
$(libdir)/libcups.dylib \
181 -current_version
2.7.0 \
182 -compatibility_version
2.0.0 \
183 $(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
185 $(LN
) $@ libcups.dylib
192 libcups_s.a
: $(LIBOBJS
)
194 $(DSO
) $(DSOFLAGS
) -Wl
,-bexport
:libcups_s.exp
-o libcups_s.o
$(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
) -lm
196 $(AR
) $(ARFLAGS
) $@ libcups_s.o
203 libcups.la
: $(LIBOBJS
)
205 $(CC
) $(DSOFLAGS
) -o
$@
$(LIBOBJS
:.o
=.lo
) -rpath
$(LIBDIR
) \
206 -version-info
2:7 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
213 libcups.a
: $(LIBOBJS
)
216 $(AR
) $(ARFLAGS
) $@
$(LIBOBJS
)
221 # CUPS language bindings for various scripting languages...
224 phpcups.so
: $(LIBCUPS
) php_cups_wrap.o
226 if
test `uname` = Darwin
; then \
227 DSOFLAGS
="-bundle -flat_namespace -undefined suppress"; \
229 DSOFLAGS
="$(DSOFLAGS)"; \
231 $(DSO
) $$DSOFLAGS -o
$@ php_cups_wrap.o
$(LIBS
) `php-config --ldflags --libs`
233 php_cups_wrap.o
: php_cups_wrap.c
235 $(CC
) $(CFLAGS
) `php-config --includes` -c
$<
236 php_cups_wrap.c
: cups.h
237 echo Creating
$< using SWIG...
238 swig
-php
-o
$@
-module cups cups.h
242 # testarray (dependency on static CUPS library is intentional)
245 testarray
: testarray.o libcups.a
247 $(CC
) $(LDFLAGS
) -o
$@ testarray.o libcups.a \
248 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
252 # testfile (dependency on static CUPS library is intentional)
255 testfile
: testfile.o libcups.a
257 $(CC
) $(LDFLAGS
) -o
$@ testfile.o libcups.a \
258 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
262 # testhttp (dependency on static CUPS library is intentional)
265 testhttp
: testhttp.o libcups.a
267 $(CC
) $(LDFLAGS
) -o
$@ testhttp.o libcups.a \
268 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
272 # testipp (dependency on static CUPS library is intentional)
275 testipp
: testipp.o libcups.a
277 $(CC
) $(LDFLAGS
) -o
$@ testipp.o libcups.a \
278 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
282 # testi18n (dependency on static CUPS library is intentional)
285 testi18n
: testi18n.o libcups.a
287 $(CC
) $(LDFLAGS
) -o
$@ testi18n.o libcups.a \
288 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
292 # testlang (dependency on static CUPS library is intentional)
295 testlang
: testlang.o libcups.a
297 $(CC
) $(LDFLAGS
) -o
$@ testlang.o libcups.a \
298 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
302 # Automatic API help files...
306 echo Generating CUPS API help files...
307 mxmldoc
--section
"Programming" --title
"Array API" \
308 --intro api-array.shtml \
309 array.h array.c
>..
/doc
/help
/api-array.html
310 mxmldoc
--section
"Programming" --title
"CUPS API" \
311 --intro api-cups.shtml \
312 cups.h auth.c dest.c encode.c getputfile.c language.c \
313 options.c tempfile.c usersys.c \
314 util.c
>..
/doc
/help
/api-cups.html
315 mxmldoc
--section
"Programming" --title
"File and Directory APIs" \
316 --intro api-filedir.shtml \
317 file.h file.c
dir.h
dir.c
>..
/doc
/help
/api-filedir.html
318 mxmldoc
--section
"Programming" --title
"PPD API" \
319 --intro api-ppd.shtml \
320 ppd.h attr.c emit.c mark.c page.c \
321 ppd.c
>..
/doc
/help
/api-ppd.html
322 mxmldoc
--section
"Programming" --title
"HTTP and IPP APIs" \
323 --intro api-httpipp.shtml \
324 cups.h http.h ipp.h \
325 auth.c dest.c encode.c getputfile.c http.c http-addr.c \
326 http-support.c ipp.c ipp-support.c md5passwd.c options.c \
327 usersys.c util.c
>..
/doc
/help
/api-httpipp.html
328 mxmldoc
--section
"Programming" --title
"Filter and Backend APIs" \
329 --intro api-filter.shtml \
330 backchannel.c
>..
/doc
/help
/api-filter.html
341 # End of "$Id: Makefile 4918 2006-01-12 05:14:40Z mike $".