2 # "$Id: Makefile 5000 2006-01-26 23:38:43Z 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
$(INSTALLSTATIC
)
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
; \
157 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
158 if
test $(LIBCUPS
) != "libcups.a"; then \
159 $(INSTALL_LIB
) libcups.a
$(LIBDIR
); \
160 $(RANLIB
) $(LIBDIR
)/libcups.a
; \
164 $(INSTALL_DIR
) $(INCLUDEDIR
)/cups
165 for file in
$(HEADERS
); do \
166 $(INSTALL_DATA
) $$file $(INCLUDEDIR
)/cups
; \
171 # libcups.so.2, libcups.sl.2
174 libcups.so
.2 libcups.sl
.2: $(LIBOBJS
)
176 $(DSO
) $(DSOFLAGS
) -o
$@
$(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
177 $(RM
) `basename $@ .2`
178 $(LN
) $@
`basename $@ .2`
185 libcups
.2.dylib
: $(LIBOBJS
)
187 $(DSO
) $(DSOFLAGS
) -o
$@ \
188 -install_name
$(libdir)/$@ \
189 -current_version
2.7.0 \
190 -compatibility_version
2.0.0 \
191 $(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
193 $(LN
) $@ libcups.dylib
200 libcups_s.a
: $(LIBOBJS
)
202 $(DSO
) $(DSOFLAGS
) -Wl
,-bexport
:libcups_s.exp
-o libcups_s.o
$(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
) -lm
204 $(AR
) $(ARFLAGS
) $@ libcups_s.o
211 libcups.la
: $(LIBOBJS
)
213 $(CC
) $(DSOFLAGS
) -o
$@
$(LIBOBJS
:.o
=.lo
) -rpath
$(LIBDIR
) \
214 -version-info
2:7 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
221 libcups.a
: $(LIBOBJS
)
224 $(AR
) $(ARFLAGS
) $@
$(LIBOBJS
)
229 # CUPS language bindings for various scripting languages...
232 phpcups.so
: $(LIBCUPS
) php_cups_wrap.o
234 if
test `uname` = Darwin
; then \
235 DSOFLAGS
="-bundle -flat_namespace -undefined suppress"; \
237 DSOFLAGS
="$(DSOFLAGS)"; \
239 $(DSO
) $$DSOFLAGS -o
$@ php_cups_wrap.o
$(LIBS
) `php-config --ldflags --libs`
241 php_cups_wrap.o
: php_cups_wrap.c
243 $(CC
) $(CFLAGS
) `php-config --includes` -c
$<
244 php_cups_wrap.c
: cups.h
245 echo Creating
$< using SWIG...
246 swig
-php
-o
$@
-module cups cups.h
250 # testarray (dependency on static CUPS library is intentional)
253 testarray
: testarray.o libcups.a
255 $(CC
) $(LDFLAGS
) -o
$@ testarray.o libcups.a \
256 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
260 # testfile (dependency on static CUPS library is intentional)
263 testfile
: testfile.o libcups.a
265 $(CC
) $(LDFLAGS
) -o
$@ testfile.o libcups.a \
266 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
270 # testhttp (dependency on static CUPS library is intentional)
273 testhttp
: testhttp.o libcups.a
275 $(CC
) $(LDFLAGS
) -o
$@ testhttp.o libcups.a \
276 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
280 # testipp (dependency on static CUPS library is intentional)
283 testipp
: testipp.o libcups.a
285 $(CC
) $(LDFLAGS
) -o
$@ testipp.o libcups.a \
286 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
290 # testi18n (dependency on static CUPS library is intentional)
293 testi18n
: testi18n.o libcups.a
295 $(CC
) $(LDFLAGS
) -o
$@ testi18n.o libcups.a \
296 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
300 # testlang (dependency on static CUPS library is intentional)
303 testlang
: testlang.o libcups.a
305 $(CC
) $(LDFLAGS
) -o
$@ testlang.o libcups.a \
306 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
310 # testppd (dependency on static CUPS library is intentional)
313 testppd
: testppd.o libcups.a
315 $(CC
) $(LDFLAGS
) -o
$@ testppd.o libcups.a \
316 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
320 # Automatic API help files...
324 echo Generating CUPS API help files...
325 mxmldoc
--section
"Programming" --title
"Array API" \
326 --intro api-array.shtml \
327 array.h array.c
>..
/doc
/help
/api-array.html
328 mxmldoc
--section
"Programming" --title
"CUPS API" \
329 --intro api-cups.shtml \
330 cups.h auth.c dest.c encode.c getputfile.c language.c \
331 options.c tempfile.c usersys.c \
332 util.c
>..
/doc
/help
/api-cups.html
333 mxmldoc
--section
"Programming" --title
"File and Directory APIs" \
334 --intro api-filedir.shtml \
335 file.h file.c
dir.h
dir.c
>..
/doc
/help
/api-filedir.html
336 mxmldoc
--section
"Programming" --title
"PPD API" \
337 --intro api-ppd.shtml \
338 ppd.h attr.c emit.c mark.c page.c \
339 ppd.c
>..
/doc
/help
/api-ppd.html
340 mxmldoc
--section
"Programming" --title
"HTTP and IPP APIs" \
341 --intro api-httpipp.shtml \
342 cups.h http.h ipp.h \
343 auth.c dest.c encode.c getputfile.c http.c http-addr.c \
344 http-support.c ipp.c ipp-support.c md5passwd.c options.c \
345 usersys.c util.c
>..
/doc
/help
/api-httpipp.html
346 mxmldoc
--section
"Programming" --title
"Filter and Backend APIs" \
347 --intro api-filter.shtml \
348 backchannel.c
>..
/doc
/help
/api-filter.html
359 # End of "$Id: Makefile 5000 2006-01-26 23:38:43Z mike $".