2 # "$Id: Makefile 5240 2006-03-07 21:55:29Z 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.
86 # Header files to install...
106 # Targets in this directory...
123 # Make all targets...
130 # Remove object and target files...
134 $(RM
) $(OBJS
) $(TARGETS
) `basename $(LIBCUPS) .2` libcups.dylib
138 # Update dependencies (without system header dependencies...)
142 makedepend
-Y
-I..
-fDependencies
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
146 # Install object and target files...
149 install: all installhdrs
$(INSTALLSTATIC
)
150 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
151 $(INSTALL_LIB
) $(LIBCUPS
) $(LIBDIR
)
152 if
test $(LIBCUPS
) = "libcups.so.2" -o
$(LIBCUPS
) = "libcups.sl.2"; then \
153 $(RM
) $(LIBDIR
)/`basename $(LIBCUPS) .2`; \
154 $(LN
) $(LIBCUPS
) $(LIBDIR
)/`basename $(LIBCUPS) .2`; \
156 if
test $(LIBCUPS
) = "libcups.2.dylib"; then \
157 $(STRIP
) -x
$(LIBDIR
)/$(LIBCUPS
); \
158 $(RM
) $(LIBDIR
)/libcups.dylib
; \
159 $(LN
) $(LIBCUPS
) $(LIBDIR
)/libcups.dylib
; \
163 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
164 if
test $(LIBCUPS
) != "libcups.a"; then \
165 $(INSTALL_LIB
) libcups.a
$(LIBDIR
); \
166 $(RANLIB
) $(LIBDIR
)/libcups.a
; \
170 $(INSTALL_DIR
) -m
755 $(INCLUDEDIR
)/cups
171 for file in
$(HEADERS
); do \
172 $(INSTALL_DATA
) $$file $(INCLUDEDIR
)/cups
; \
177 # Uninstall object and target files...
181 $(RM
) $(LIBDIR
)/libcups
.2.dylib
182 $(RM
) $(LIBDIR
)/libcups.a
183 $(RM
) $(LIBDIR
)/libcups.dylib
184 $(RM
) $(LIBDIR
)/libcups_s.a
185 $(RM
) $(LIBDIR
)/libcups.sl
186 $(RM
) $(LIBDIR
)/libcups.sl
.2
187 $(RM
) $(LIBDIR
)/libcups.so
188 $(RM
) $(LIBDIR
)/libcups.so
.2
190 for file in
$(HEADERS
); do \
191 $(RM
) $(INCLUDEDIR
)/cups
/$$file; \
193 -$(RMDIR
) $(INCLUDEDIR
)/cups
197 # libcups.so.2, libcups.sl.2
200 libcups.so
.2 libcups.sl
.2: $(LIBOBJS
)
202 $(DSO
) $(DSOFLAGS
) -o
$@
$(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
203 $(RM
) `basename $@ .2`
204 $(LN
) $@
`basename $@ .2`
211 libcups
.2.dylib
: $(LIBOBJS
)
213 $(DSO
) $(DSOFLAGS
) -o
$@ \
214 -install_name
$(libdir)/$@ \
215 -current_version
2.7.0 \
216 -compatibility_version
2.0.0 \
217 $(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
219 $(LN
) $@ libcups.dylib
226 libcups_s.a
: $(LIBOBJS
)
228 $(DSO
) $(DSOFLAGS
) -Wl
,-bexport
:libcups_s.exp
-o libcups_s.o
$(LIBOBJS
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
) -lm
230 $(AR
) $(ARFLAGS
) $@ libcups_s.o
237 libcups.la
: $(LIBOBJS
)
239 $(CC
) $(DSOFLAGS
) -o
$@
$(LIBOBJS
:.o
=.lo
) -rpath
$(LIBDIR
) \
240 -version-info
2:7 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
247 libcups.a
: $(LIBOBJS
)
250 $(AR
) $(ARFLAGS
) $@
$(LIBOBJS
)
255 # CUPS language bindings for various scripting languages...
257 # NOTE: Not currently used or functional - see the scripting/php directory
258 # for the hand-written bindings...
261 phpcups.so
: $(LIBCUPS
) php_cups_wrap.o
263 if
test `uname` = Darwin
; then \
264 DSOFLAGS
="-bundle -flat_namespace -undefined suppress"; \
266 DSOFLAGS
="$(DSOFLAGS)"; \
268 $(DSO
) $$DSOFLAGS -o
$@ php_cups_wrap.o
$(LIBS
) `php-config --ldflags --libs`
270 php_cups_wrap.o
: php_cups_wrap.c
272 $(CC
) $(CFLAGS
) `php-config --includes` -c
$<
273 php_cups_wrap.c
: cups.h
274 echo Creating
$< using SWIG...
275 swig
-php
-o
$@
-module cups cups.h
279 # testadmin (dependency on static CUPS library is intentional)
282 testadmin
: testadmin.o libcups.a
284 $(CC
) $(LDFLAGS
) -o
$@ testadmin.o libcups.a \
285 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
289 # testarray (dependency on static CUPS library is intentional)
292 testarray
: testarray.o libcups.a
294 $(CC
) $(LDFLAGS
) -o
$@ testarray.o libcups.a \
295 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
299 # testfile (dependency on static CUPS library is intentional)
302 testfile
: testfile.o libcups.a
304 $(CC
) $(LDFLAGS
) -o
$@ testfile.o libcups.a \
305 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
309 # testhttp (dependency on static CUPS library is intentional)
312 testhttp
: testhttp.o libcups.a
314 $(CC
) $(LDFLAGS
) -o
$@ testhttp.o libcups.a \
315 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
319 # testipp (dependency on static CUPS library is intentional)
322 testipp
: testipp.o libcups.a
324 $(CC
) $(LDFLAGS
) -o
$@ testipp.o libcups.a \
325 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
329 # testi18n (dependency on static CUPS library is intentional)
332 testi18n
: testi18n.o libcups.a
334 $(CC
) $(LDFLAGS
) -o
$@ testi18n.o libcups.a \
335 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
339 # testlang (dependency on static CUPS library is intentional)
342 testlang
: testlang.o libcups.a
344 $(CC
) $(LDFLAGS
) -o
$@ testlang.o libcups.a \
345 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
349 # testppd (dependency on static CUPS library is intentional)
352 testppd
: testppd.o libcups.a
354 $(CC
) $(LDFLAGS
) -o
$@ testppd.o libcups.a \
355 $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
359 # Automatic API help files...
363 echo Generating CUPS API help files...
364 mxmldoc
--section
"Programming" --title
"Array API" \
365 --intro api-array.shtml \
366 array.h array.c
>..
/doc
/help
/api-array.html
367 mxmldoc
--section
"Programming" --title
"CUPS API" \
368 --intro api-cups.shtml \
369 cups.h dest.c getputfile.c language.c \
370 options.c tempfile.c usersys.c \
371 util.c
>..
/doc
/help
/api-cups.html
372 mxmldoc
--section
"Programming" --title
"File and Directory APIs" \
373 --intro api-filedir.shtml \
374 file.h file.c
dir.h
dir.c
>..
/doc
/help
/api-filedir.html
375 mxmldoc
--section
"Programming" --title
"PPD API" \
376 --intro api-ppd.shtml \
377 ppd.h attr.c emit.c mark.c page.c \
378 ppd.c
>..
/doc
/help
/api-ppd.html
379 mxmldoc
--section
"Programming" --title
"HTTP and IPP APIs" \
380 --intro api-httpipp.shtml \
381 http.h ipp.h auth.c encode.c http.c http-addr.c \
382 http-support.c ipp.c ipp-support.c md5passwd.c \
383 request.c
>..
/doc
/help
/api-httpipp.html
384 mxmldoc
--section
"Programming" --title
"Filter and Backend APIs" \
385 --intro api-filter.shtml \
386 backchannel.c
>..
/doc
/help
/api-filter.html
397 # End of "$Id: Makefile 5240 2006-03-07 21:55:29Z mike $".