2 # "$Id: Makefile 6603 2007-06-22 22:23:21Z 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.
73 LIB32OBJS
= $(LIBOBJS
:.o
=.32.o
)
74 LIB64OBJS
= $(LIBOBJS
:.o
=.64.o
)
92 # Header files to install...
112 # Targets in this directory...
132 # Make all targets...
139 # Remove object and target files...
143 $(RM
) $(OBJS
) $(TARGETS
)
144 $(RM
) libcups.so libcups.sl libcups.dylib
149 # Update dependencies (without system header dependencies...)
153 touch Dependencies.tmp
154 makedepend
-Y
-I..
-fDependencies.tmp
$(OBJS
:.o
=.c
) >/dev
/null
2>&1
156 cp Dependencies.tmp Dependencies
157 sed
-r
-e
'1,$$s/^([^.]+)\.o:/\1\.32.o: \1\.c /' Dependencies.tmp
>>Dependencies
158 sed
-r
-e
'1,$$s/^([^.]+)\.o:/\1\.64.o: \1\.c /' Dependencies.tmp
>>Dependencies
159 $(RM
) Dependencies.tmp
163 # Install object and target files...
166 install: all installhdrs
$(INSTALLSTATIC
) $(INSTALL32
) $(INSTALL64
)
167 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
168 $(INSTALL_LIB
) $(LIBCUPS
) $(LIBDIR
)
169 if
test $(LIBCUPS
) = "libcups.so.2" -o
$(LIBCUPS
) = "libcups.sl.2"; then \
170 $(RM
) $(LIBDIR
)/`basename $(LIBCUPS) .2`; \
171 $(LN
) $(LIBCUPS
) $(LIBDIR
)/`basename $(LIBCUPS) .2`; \
173 if
test $(LIBCUPS
) = "libcups.2.dylib"; then \
174 $(STRIP
) -x
$(LIBDIR
)/$(LIBCUPS
); \
175 $(RM
) $(LIBDIR
)/libcups.dylib
; \
176 $(LN
) $(LIBCUPS
) $(LIBDIR
)/libcups.dylib
; \
178 if
test "x$(SYMROOT)" != "x"; then \
179 $(INSTALL_DIR
) $(SYMROOT
); \
180 for file in
$(TARGETS
); do \
181 cp
$$file $(SYMROOT
); \
186 $(INSTALL_DIR
) -m
755 $(LIBDIR
)
187 $(INSTALL_LIB
) libcups.a
$(LIBDIR
)
188 $(RANLIB
) $(LIBDIR
)/libcups.a
191 $(INSTALL_DIR
) -m
755 $(INCLUDEDIR
)/cups
192 for file in
$(HEADERS
); do \
193 $(INSTALL_DATA
) $$file $(INCLUDEDIR
)/cups
; \
197 $(INSTALL_DIR
) -m
755 $(LIB32DIR
)
198 $(INSTALL_LIB
) 32bit
/libcups.so
.2 $(LIB32DIR
)/libcups.so
.2
199 $(LN
) libcups.so
.2 $(LIB32DIR
)/libcups.so
202 $(INSTALL_DIR
) -m
755 $(LIB64DIR
)
203 $(INSTALL_LIB
) 64bit
/libcups.so
.2 $(LIB64DIR
)/libcups.so
.2
204 $(LN
) libcups.so
.2 $(LIB64DIR
)/libcups.so
208 # Uninstall object and target files...
211 uninstall: $(UNINSTALL32
) $(UNINSTALL64
)
212 $(RM
) $(LIBDIR
)/libcups
.2.dylib
213 $(RM
) $(LIBDIR
)/libcups.a
214 $(RM
) $(LIBDIR
)/libcups.dylib
215 $(RM
) $(LIBDIR
)/libcups_s.a
216 $(RM
) $(LIBDIR
)/libcups.sl
217 $(RM
) $(LIBDIR
)/libcups.sl
.2
218 $(RM
) $(LIBDIR
)/libcups.so
219 $(RM
) $(LIBDIR
)/libcups.so
.2
221 for file in
$(HEADERS
); do \
222 $(RM
) $(INCLUDEDIR
)/cups
/$$file; \
224 -$(RMDIR
) $(INCLUDEDIR
)/cups
227 $(RM
) $(LIB32DIR
)/libcups.so
228 $(RM
) $(LIB32DIR
)/libcups.so
.2
229 -$(RMDIR
) $(LIB32DIR
)
232 $(RM
) $(LIB64DIR
)/libcups.so
233 $(RM
) $(LIB64DIR
)/libcups.so
.2
234 -$(RMDIR
) $(LIB64DIR
)
238 # libcups.so.2, libcups.sl.2
241 libcups.so
.2 libcups.sl
.2: $(LIBOBJS
)
243 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(LIBOBJS
) $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
244 $(RM
) `basename $@ .2`
245 $(LN
) $@
`basename $@ .2`
252 32bit
/libcups.so
.2: $(LIB32OBJS
)
253 echo Linking
32-bit
$@...
255 $(DSO
) $(ARCH32FLAGS
) $(DSO32FLAGS
) -o
$@
$(LIB32OBJS
) $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
256 $(RM
) 32bit
/libcups.so
257 $(LN
) libcups.so
.2 32bit
/libcups.so
264 64bit
/libcups.so
.2: $(LIB64OBJS
)
265 echo Linking
64-bit
$@...
267 $(DSO
) $(ARCH64FLAGS
) $(DSO64FLAGS
) -o
$@
$(LIB64OBJS
) $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
268 $(RM
) 64bit
/libcups.so
269 $(LN
) libcups.so
.2 64bit
/libcups.so
276 libcups
.2.dylib
: $(LIBOBJS
) $(LIBCUPSORDER
)
278 $(DSO
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@ \
279 -install_name
$(libdir)/$@ \
280 -current_version
2.8.0 \
281 -compatibility_version
2.0.0 \
282 -exported_symbols_list libcups.exp \
283 -sectorder __TEXT __text
$(LIBCUPSORDER
) \
284 $(LIBOBJS
) $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
286 $(LN
) $@ libcups.dylib
293 libcups_s.a
: $(LIBOBJS
) libcups_s.exp
295 $(DSO
) $(DSOFLAGS
) -Wl
,-bexport
:libcups_s.exp
-o libcups_s.o
$(LIBOBJS
) $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
) -lm
297 $(AR
) $(ARFLAGS
) $@ libcups_s.o
304 libcups.la
: $(LIBOBJS
)
306 $(CC
) $(ARCHFLAGS
) $(DSOFLAGS
) -o
$@
$(LIBOBJS
:.o
=.lo
) -rpath
$(LIBDIR
) \
307 -version-info
2:8 $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
314 libcups.a
: $(LIBOBJS
)
317 $(AR
) $(ARFLAGS
) $@
$(LIBOBJS
)
322 # CUPS language bindings for various scripting languages...
324 # NOTE: Not currently used or functional - see the scripting/php directory
325 # for the hand-written bindings...
328 phpcups.so
: $(LIBCUPS
) php_cups_wrap.o
330 if
test `uname` = Darwin
; then \
331 DSOFLAGS
="-bundle -flat_namespace -undefined suppress"; \
333 DSOFLAGS
="$(DSOFLAGS)"; \
335 $(DSO
) $$DSOFLAGS -o
$@ php_cups_wrap.o
$(LIBS
) `php-config --ldflags --libs`
337 php_cups_wrap.o
: php_cups_wrap.c
339 $(CC
) $(CFLAGS
) `php-config --includes` -c
$<
340 php_cups_wrap.c
: cups.h
341 echo Creating
$< using SWIG...
342 swig
-php
-o
$@
-module cups cups.h
346 # testadmin (dependency on static CUPS library is intentional)
349 testadmin
: testadmin.o libcups.a
351 $(CC
) $(LDFLAGS
) -o
$@ testadmin.o libcups.a \
352 $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
356 # testarray (dependency on static CUPS library is intentional)
359 testarray
: testarray.o libcups.a
361 $(CC
) $(LDFLAGS
) -o
$@ testarray.o libcups.a \
362 $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
366 # testcups (dependency on static CUPS library is intentional)
369 testcups
: testcups.o libcups.a
371 $(CC
) $(LDFLAGS
) -o
$@ testcups.o libcups.a \
372 $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
376 # testfile (dependency on static CUPS library is intentional)
379 testfile
: testfile.o libcups.a
381 $(CC
) $(LDFLAGS
) -o
$@ testfile.o libcups.a \
382 $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
386 # testhttp (dependency on static CUPS library is intentional)
389 testhttp
: testhttp.o libcups.a
391 $(CC
) $(LDFLAGS
) -o
$@ testhttp.o libcups.a \
392 $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
396 # testipp (dependency on static CUPS library is intentional)
399 testipp
: testipp.o libcups.a
401 $(CC
) $(LDFLAGS
) -o
$@ testipp.o libcups.a \
402 $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
406 # testi18n (dependency on static CUPS library is intentional)
409 testi18n
: testi18n.o libcups.a
411 $(CC
) $(LDFLAGS
) -o
$@ testi18n.o libcups.a \
412 $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
416 # testlang (dependency on static CUPS library is intentional)
419 testlang
: testlang.o libcups.a
421 $(CC
) $(LDFLAGS
) -o
$@ testlang.o libcups.a \
422 $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
426 # testppd (dependency on static CUPS library is intentional)
429 testppd
: testppd.o libcups.a
431 $(CC
) $(LDFLAGS
) -o
$@ testppd.o libcups.a \
432 $(LIBGSSAPI
) $(SSLLIBS
) $(COMMONLIBS
) $(LIBZ
)
436 # Automatic API help files...
440 echo Generating CUPS API help files...
441 mxmldoc
--section
"Programming" --title
"Array API" \
442 --intro api-array.shtml \
443 array.h array.c
>..
/doc
/help
/api-array.html
444 mxmldoc
--section
"Programming" --title
"CUPS API" \
445 --intro api-cups.shtml \
446 cups.h dest.c getputfile.c language.c notify.c \
447 options.c tempfile.c usersys.c \
448 util.c
>..
/doc
/help
/api-cups.html
449 mxmldoc
--section
"Programming" --title
"File and Directory APIs" \
450 --intro api-filedir.shtml \
451 file.h file.c
dir.h
dir.c
>..
/doc
/help
/api-filedir.html
452 mxmldoc
--section
"Programming" --title
"PPD API" \
453 --intro api-ppd.shtml \
454 ppd.h attr.c custom.c emit.c localize.c mark.c page.c \
455 ppd.c
>..
/doc
/help
/api-ppd.html
456 mxmldoc
--section
"Programming" --title
"HTTP and IPP APIs" \
457 --intro api-httpipp.shtml \
458 http.h ipp.h auth.c encode.c http.c http-addr.c \
459 http-support.c ipp.c ipp-support.c md5passwd.c \
460 request.c
>..
/doc
/help
/api-httpipp.html
461 mxmldoc
--section
"Programming" --title
"Filter and Backend APIs" \
462 --intro api-filter.shtml \
463 backchannel.c sidechannel.c sidechannel.h
>..
/doc
/help
/api-filter.html
474 # End of "$Id: Makefile 6603 2007-06-22 22:23:21Z mike $".