1 # Makefile.am for the SASL library
3 # $Id: Makefile.am,v 1.85.2.1 2009/04/27 17:58:26 murch Exp $
4 # Copyright (c) 2000 Carnegie Mellon University. All rights reserved.
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions
10 # 1. Redistributions of source code must retain the above copyright
11 # notice, this list of conditions and the following disclaimer.
13 # 2. Redistributions in binary form must reproduce the above copyright
14 # notice, this list of conditions and the following disclaimer in
15 # the documentation and/or other materials provided with the
18 # 3. The name "Carnegie Mellon University" must not be used to
19 # endorse or promote products derived from this software without
20 # prior written permission. For permission or any other legal
21 # details, please contact
22 # Office of Technology Transfer
23 # Carnegie Mellon University
25 # Pittsburgh, PA 15213-3890
26 # (412) 268-4387, fax: (412) 268-7395
27 # tech-transfer@andrew.cmu.edu
29 # 4. Redistributions of any form whatsoever must retain the following
31 # "This product includes software developed by Computing Services
32 # at Carnegie Mellon University (http://www.cmu.edu/computing/)."
34 # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
35 # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
36 # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
37 # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
38 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
39 # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
40 # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
43 # Library version info - here at the top, for sanity
46 INCLUDES=-I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb
48 EXTRA_DIST = windlopen.c staticopen.h NTMakefile
49 EXTRA_LIBRARIES = libsasl2.a
50 noinst_LIBRARIES = @SASL_STATIC_LIBS@
53 common_headers = saslint.h
54 common_sources = auxprop.c canonusr.c checkpw.c client.c common.c config.c external.c md5.c saslutil.c server.c seterror.c dlopen.c ../plugins/plugin_common.c
56 LTLIBOBJS = @LTLIBOBJS@
60 lib_LTLIBRARIES = libsasl2.la
62 libsasl2_la_SOURCES = $(common_sources) $(common_headers)
63 libsasl2_la_LDFLAGS = -version-info $(sasl_version)
64 libsasl2_la_DEPENDENCIES = $(LTLIBOBJS)
65 libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR)
68 framedir = $(DESTDIR)/Library/Frameworks/SASL2.framework
70 $(mkinstalldirs) $(framedir)/Versions/A
71 ln -fs $(libdir)/libsasl2.dylib $(framedir)/Versions/A/SASL2
72 cd $(framedir) ; ln -fs Versions/A/SASL2 .
77 libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS)
78 @echo adding static plugins and dependencies
79 $(AR) cru .libs/$@ $(SASL_STATIC_OBJS)
80 @for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \
81 if test ! -f $$i; then continue; fi; . $$i; \
82 for j in $$dependency_libs foo; do \
84 -L*) for k in $$depdirs foo; do \
85 if test $$k = $$j; then break; fi; done; \
86 if test $$k = foo; then depdirs="$$depdirs $$j"; fi ;; \
87 -l*) for k in $$deplibs foo; do \
88 if test $$k = $$j; then break; fi; done; \
89 if test $$k = foo; then deplibs="$$deplibs $$j"; fi ;; \
90 esac; done; dependency_libs=""; done; \
91 sed -e "/^dependency_libs=/s%=.*%='$${depdirs}$${deplibs}'%" \
92 libsasl2.la >TMP.$$ && mv TMP.$$ libsasl2.la
96 $(SASL_STATIC_OBJS): linksrcs
99 -ln -s $(SASL_STATIC_SRCS) .