1# Makefile.am for the SASL library 2# Rob Earhart 3# $Id: Makefile.am,v 1.88 2011/09/05 14:18:10 murch Exp $ 4# Copyright (c) 2000 Carnegie Mellon University. All rights reserved. 5# 6# Redistribution and use in source and binary forms, with or without 7# modification, are permitted provided that the following conditions 8# are met: 9# 10# 1. Redistributions of source code must retain the above copyright 11# notice, this list of conditions and the following disclaimer. 12# 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 16# distribution. 17# 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 24# 5000 Forbes Avenue 25# Pittsburgh, PA 15213-3890 26# (412) 268-4387, fax: (412) 268-7395 27# tech-transfer@andrew.cmu.edu 28# 29# 4. Redistributions of any form whatsoever must retain the following 30# acknowledgment: 31# "This product includes software developed by Computing Services 32# at Carnegie Mellon University (http://www.cmu.edu/computing/)." 33# 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. 41# 42 43# Library version info - here at the top, for sanity 44# See <http://www.gnu.org/software/libtool/manual/libtool.html#Versioning> 45# CURRENT:REVISION:AGE 46sasl_version = 3:0:0 47 48INCLUDES=-DLIBSASL_EXPORTS=1 -I$(top_srcdir)/include -I$(top_srcdir)/plugins -I$(top_builddir)/include -I$(top_srcdir)/sasldb 49 50EXTRA_DIST = windlopen.c staticopen.h NTMakefile 51EXTRA_LIBRARIES = libsasl2.a 52noinst_LIBRARIES = @SASL_STATIC_LIBS@ 53libsasl2_a_SOURCES= 54 55BUILT_SOURCES = $(SASL_STATIC_SRCS) 56 57common_headers = saslint.h 58common_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 59 60LTLIBOBJS = @LTLIBOBJS@ 61LIBOBJS = @LIBOBJS@ 62LIB_DOOR= @LIB_DOOR@ 63 64lib_LTLIBRARIES = libsasl2.la 65 66libsasl2_la_SOURCES = $(common_sources) $(common_headers) 67libsasl2_la_LDFLAGS = -version-info $(sasl_version) 68libsasl2_la_DEPENDENCIES = $(LTLIBOBJS) 69libsasl2_la_LIBADD = $(LTLIBOBJS) $(SASL_DL_LIB) $(LIB_SOCKET) $(LIB_DOOR) 70 71if MACOSX 72framedir = /Library/Frameworks/SASL2.framework 73install-exec-hook: 74 $(mkinstalldirs) $(framedir)/Versions/A 75 ln -fs $(libdir)/libsasl2.dylib $(framedir)/Versions/A/SASL2 76 cd $(framedir) ; ln -fs Versions/A/SASL2 . 77else 78install-exec-hook: 79endif 80 81libsasl2.a: libsasl2.la $(SASL_STATIC_OBJS) 82 @echo adding static plugins and dependencies 83 $(AR) cru .libs/$@ $(SASL_STATIC_OBJS) 84 @for i in ./libsasl2.la ../sasldb/libsasldb.la ../plugins/lib*.la; do \ 85 if test ! -f $$i; then continue; fi; . $$i; \ 86 for j in $$dependency_libs foo; do \ 87 case $$j in foo) ;; \ 88 -L*) for k in $$depdirs foo; do \ 89 if test $$k = $$j; then break; fi; done; \ 90 if test $$k = foo; then depdirs="$$depdirs $$j"; fi ;; \ 91 -l*) for k in $$deplibs foo; do \ 92 if test $$k = $$j; then break; fi; done; \ 93 if test $$k = foo; then deplibs="$$deplibs $$j"; fi ;; \ 94 esac; done; dependency_libs=""; done; \ 95 sed -e "/^dependency_libs=/s%=.*%='$${depdirs}$${deplibs}'%" \ 96 libsasl2.la >TMP.$$ && mv TMP.$$ libsasl2.la 97 rm -f $@ 98 ln -s .libs/$@ $@ 99 100$(SASL_STATIC_SRCS): linksrcs 101 102linksrcs: 103 -ln -s $(SASL_STATIC_SRCS) . 104 105