From f9244175db50ecf63e958b9eb5f91519bb720648 Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Tue, 23 Jan 1996 09:07:27 +0000 Subject: [PATCH] Add support for building GSSAPI as a shared library git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7366 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/gssapi/ChangeLog | 5 +++++ src/lib/gssapi/Makefile.in | 29 ++++++++++++++++++++++++----- src/lib/gssapi/configure.in | 7 +++++++ src/lib/gssapi/krb5/ChangeLog | 5 +++++ src/lib/gssapi/krb5/Makefile.in | 19 ++++++++++++++++--- 5 files changed, 57 insertions(+), 8 deletions(-) diff --git a/src/lib/gssapi/ChangeLog b/src/lib/gssapi/ChangeLog index 77951a717..cdb45edfc 100644 --- a/src/lib/gssapi/ChangeLog +++ b/src/lib/gssapi/ChangeLog @@ -1,3 +1,8 @@ +Tue Jan 23 04:06:36 1996 + + * Makefile.in: Add support for building the gssapi library as a + shared library. + Tue Jan 23 03:32:25 1996 Theodore Y. Ts'o * configure.in: Add the mechglue directory as a subdir diff --git a/src/lib/gssapi/Makefile.in b/src/lib/gssapi/Makefile.in index 560d6b576..fd01ecf55 100644 --- a/src/lib/gssapi/Makefile.in +++ b/src/lib/gssapi/Makefile.in @@ -2,15 +2,34 @@ TST=if test -n "`cat DONE`" ; then ##DOSBUILDTOP = ..\.. +CRYPTO_VER=@CRYPTO_SH_VERS@ +COMERR_VER=@COMERR_SH_VERS@ +KRB5_VER=@KRB5_SH_VERS@ +DEPLIBS=$(TOPLIBD)/libcrypto.$(SHEXT).$(CRYPTO_VER) \ + $(TOPLIBD)/libcom_err.$(SHEXT).$(COMERR_VER) \ + $(TOPLIBD)/libkrb5.$(SHEXT).$(KRB5_VER) +LIB_SUBDIRS= generic krb5 mechglue +LIBDONE= generic/DONE krb5/DONE mechglue/DONE +LIBUPDATE= $(BUILDTOP)/util/libupdate + all-unix:: all-mac:: -libgssapi_krb5.a: generic/DONE krb5/DONE mechglue/DONE - (cd generic; $(TST) $(ARADD) ../$@ `cat DONE` ; fi) - (cd krb5; $(TST) $(ARADD) ../$@ `cat DONE` ; fi) - (cd mechglue; $(TST) $(ARADD) ../$@ `cat DONE` ; fi) - $(RANLIB) $@ +libgssapi_krb5.$(STEXT): $(LIBDONE) + if test -f $@ ; then \ + for i in $(LIB_SUBDIRS) ; \ + do \ + $(LIBUPDATE) $@ $$i/DONE $$i ; \ + done ; \ + else \ + for i in $(LIB_SUBDIRS) ; \ + do \ + $(LIBUPDATE) --force $@ $$i/DONE $$i ; \ + done ; \ + fi + $(RANLIB) libgssapi_krb5.$(STEXT) + touch libgssapi_krb5.stamp install:: libgssapi_krb5.a $(INSTALL_DATA) libgssapi_krb5.a $(DESTDIR)$(KRB5_LIBDIR)/libgssapi_krb5.a diff --git a/src/lib/gssapi/configure.in b/src/lib/gssapi/configure.in index 9aa41ce33..2930ff582 100644 --- a/src/lib/gssapi/configure.in +++ b/src/lib/gssapi/configure.in @@ -6,6 +6,13 @@ AC_PROG_ARCHIVE_ADD AC_PROG_RANLIB AC_PROG_INSTALL DO_SUBDIRS +V5_MAKE_SHARED_LIB(libgssapi_krb5,0.1,.., ./krb5) +CRYPTO_SH_VERS=$krb5_cv_shlib_version_libcrypto +AC_SUBST(CRYPTO_SH_VERS) +COMERR_SH_VERS=$krb5_cv_shlib_version_libcom_err +AC_SUBST(COMERR_SH_VERS) +KRB5_SH_VERS=$krb5_cv_shlib_version_libkrb5 +AC_SUBST(KRB5_SH_VERS) AppendRule([all:: libgssapi_krb5.a]) LinkFileDir(../libgssapi_krb5.a, libgssapi_krb5.a, ./gssapi) AppendRule([all-unix:: ../libgssapi_krb5.a]) diff --git a/src/lib/gssapi/krb5/ChangeLog b/src/lib/gssapi/krb5/ChangeLog index 68ff7b801..6646e8bcb 100644 --- a/src/lib/gssapi/krb5/ChangeLog +++ b/src/lib/gssapi/krb5/ChangeLog @@ -1,3 +1,8 @@ +Tue Jan 23 04:05:23 1996 + + * Makefile.in: Add support for building GSSAPI as a shared + library. + Tue Jan 23 03:25:02 1996 Theodore Y. Ts'o * rel_oid.c (krb5_gss_internal_release_oid): Add the new interface diff --git a/src/lib/gssapi/krb5/Makefile.in b/src/lib/gssapi/krb5/Makefile.in index 89db40572..846e8f19f 100644 --- a/src/lib/gssapi/krb5/Makefile.in +++ b/src/lib/gssapi/krb5/Makefile.in @@ -3,13 +3,26 @@ CFLAGS = $(CCOPTS) $(DEFS) -I. -I$(srcdir) -I../generic -I$(srcdir)/../generic - ##DOSBUILDTOP = ..\..\.. ##DOSLIBNAME=..\gssapi.$(LIBEXT) -all:: $(OBJS) +.c.o: + $(CC) $(CFLAGS) -c $(srcdir)/$*.c +@SHARED_RULE@ + +all-unix:: shared $(OBJS) + +all-mac:: shared $(OBJS) + +all-windows:: $(OBJS) + +shared: + mkdir shared ETSRCS= gssapi_err_krb5.c ETOBJS= gssapi_err_krb5.$(OBJEXT) ETHDRS= gssapi_err_krb5.h gssapi_err_krb5.$(OBJEXT): gssapi_err_krb5.c + $(CC) $(CFLAGS) -c $*.c +@SHARED_RULE_LOCAL@ gssapi_err_krb5.h: gssapi_err_krb5.et @@ -98,10 +111,10 @@ all-mac:: $(SRCS) $(HDRS) includes $(OBJS) all-windows:: $(SRCS) $(HDRS) includes $(OBJS) clean-unix:: - $(RM) $(ETHDRS) $(ETSRCS) + $(RM) $(ETHDRS) $(ETSRCS) shared/* clean-mac:: - $(RM) $(ETHDRS) $(ETSRCS) + $(RM) $(ETHDRS) $(ETSRCS) shared/* clean-windows:: -- 2.26.2