2 # "$Id: Makefile 5138 2006-02-21 10:49:06Z 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.
84 # Header files to install...
103 # Targets in this directory...
119 # Make all targets...
126 # Remove object and target files...
130 $(RM
) $(OBJS
) $(TARGETS
) `basename $(LIBCUPS) .2` libcups.dylib
134 # Update dependencies (without system header dependencies...)
138 makedepend
-Y
-I..
-fDependencies
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
142 # Install object and target files...
145 install: all installhdrs
$(INSTALLSTATIC
)
146 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
147 $(INSTALL_LIB
) $(LIBCUPS
) $(LIBDIR
)
148 if
test $(LIBCUPS
) = "libcups.so.2" -o
$(LIBCUPS
) = "libcups.sl.2"; then \
149 $(RM
) $(LIBDIR
)/`basename $(LIBCUPS) .2`; \
150 $(LN
) $(LIBCUPS
) $(LIBDIR
)/`basename $(LIBCUPS) .2`; \
152 if
test $(LIBCUPS
) = "libcups.2.dylib"; then \
153 $(STRIP
) -x
$(LIBDIR
)/$(LIBCUPS
); \
154 $(RM
) $(LIBDIR
)/libcups.dylib
; \
155 $(LN
) $(LIBCUPS
) $(LIBDIR
)/libcups.dylib
; \
159 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
160 if
test $(LIBCUPS
) != "libcups.a"; then \
161 $(INSTALL_LIB
) libcups.a
$(LIBDIR
); \
162 $(RANLIB
) $(LIBDIR
)/libcups.a
; \
166 $(INSTALL_DIR
) -m
755 $(INCLUDEDIR
)/cups
167 for file in
$(HEADERS
); do \
168 $(INSTALL_DATA
) $$file $(INCLUDEDIR
)/cups
; \
173 # libcups.so.2, libcups.sl.2
176 libcups.so
.2 libcups.sl
.2: $(LIBOBJS
)
178 $(DSO
) $(DSOFLAGS
) -o
$@
$(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
179 $(RM
) `basename $@ .2`
180 $(LN
) $@
`basename $@ .2`
187 libcups
.2.dylib
: $(LIBOBJS
)
189 $(DSO
) $(DSOFLAGS
) -o
$@ \
190 -install_name
$(libdir)/$@ \
191 -current_version
2.7.0 \
192 -compatibility_version
2.0.0 \
193 $(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
195 $(LN
) $@ libcups.dylib
202 libcups_s.a
: $(LIBOBJS
)
204 $(DSO
) $(DSOFLAGS
) -Wl
,-bexport
:libcups_s.exp
-o libcups_s.o
$(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
) -lm
206 $(AR
) $(ARFLAGS
) $@ libcups_s.o
213 libcups.la
: $(LIBOBJS
)
215 $(CC
) $(DSOFLAGS
) -o
$@
$(LIBOBJS
:.o
=.lo
) -rpath
$(LIBDIR
) \
216 -version-info
2:7 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
223 libcups.a
: $(LIBOBJS
)
226 $(AR
) $(ARFLAGS
) $@
$(LIBOBJS
)
231 # CUPS language bindings for various scripting languages...
234 phpcups.so
: $(LIBCUPS
) php_cups_wrap.o
236 if
test `uname` = Darwin
; then \
237 DSOFLAGS
="-bundle -flat_namespace -undefined suppress"; \
239 DSOFLAGS
="$(DSOFLAGS)"; \
241 $(DSO
) $$DSOFLAGS -o
$@ php_cups_wrap.o
$(LIBS
) `php-config --ldflags --libs`
243 php_cups_wrap.o
: php_cups_wrap.c
245 $(CC
) $(CFLAGS
) `php-config --includes` -c
$<
246 php_cups_wrap.c
: cups.h
247 echo Creating
$< using SWIG...
248 swig
-php
-o
$@
-module cups cups.h
252 # testarray (dependency on static CUPS library is intentional)
255 testarray
: testarray.o libcups.a
257 $(CC
) $(LDFLAGS
) -o
$@ testarray.o libcups.a \
258 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
262 # testfile (dependency on static CUPS library is intentional)
265 testfile
: testfile.o libcups.a
267 $(CC
) $(LDFLAGS
) -o
$@ testfile.o libcups.a \
268 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
272 # testhttp (dependency on static CUPS library is intentional)
275 testhttp
: testhttp.o libcups.a
277 $(CC
) $(LDFLAGS
) -o
$@ testhttp.o libcups.a \
278 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
282 # testipp (dependency on static CUPS library is intentional)
285 testipp
: testipp.o libcups.a
287 $(CC
) $(LDFLAGS
) -o
$@ testipp.o libcups.a \
288 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
292 # testi18n (dependency on static CUPS library is intentional)
295 testi18n
: testi18n.o libcups.a
297 $(CC
) $(LDFLAGS
) -o
$@ testi18n.o libcups.a \
298 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
302 # testlang (dependency on static CUPS library is intentional)
305 testlang
: testlang.o libcups.a
307 $(CC
) $(LDFLAGS
) -o
$@ testlang.o libcups.a \
308 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
312 # testppd (dependency on static CUPS library is intentional)
315 testppd
: testppd.o libcups.a
317 $(CC
) $(LDFLAGS
) -o
$@ testppd.o libcups.a \
318 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
322 # Automatic API help files...
326 echo Generating CUPS API help files...
327 mxmldoc
--section
"Programming" --title
"Array API" \
328 --intro api-array.shtml \
329 array.h array.c
>..
/doc
/help
/api-array.html
330 mxmldoc
--section
"Programming" --title
"CUPS API" \
331 --intro api-cups.shtml \
332 cups.h dest.c getputfile.c language.c \
333 options.c tempfile.c usersys.c \
334 util.c
>..
/doc
/help
/api-cups.html
335 mxmldoc
--section
"Programming" --title
"File and Directory APIs" \
336 --intro api-filedir.shtml \
337 file.h file.c
dir.h
dir.c
>..
/doc
/help
/api-filedir.html
338 mxmldoc
--section
"Programming" --title
"PPD API" \
339 --intro api-ppd.shtml \
340 ppd.h attr.c emit.c mark.c page.c \
341 ppd.c
>..
/doc
/help
/api-ppd.html
342 mxmldoc
--section
"Programming" --title
"HTTP and IPP APIs" \
343 --intro api-httpipp.shtml \
344 http.h ipp.h auth.c encode.c http.c http-addr.c \
345 http-support.c ipp.c ipp-support.c md5passwd.c \
346 request.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 5138 2006-02-21 10:49:06Z mike $".