1### config/libnover.in 2# *** keep this in sync with lib.in 3# 4# Makefile fragment that creates shared libraries sans version 5# info (plugin modules). 6# 7# The following variables must be set in the Makefile.in: 8# 9# LIBBASE library name without "lib" or extension 10# SHLIB_EXPDEPS list of libraries that this one has explicit 11# dependencies on, pref. in the form libfoo$(SHLIBEXT) 12# SHLIB_EXPLIBS list of libraries that this one has explicit 13# dependencies on, in "-lfoo" form. 14# RELDIR path to this directory relative to $(TOPLIBD) 15# 16# Makefile.in can also override the defaults for SHLIB_DIRS, 17# SHLIB_RDIRS, and STOBJLISTS from pre.in. 18 19LIBPREFIX= 20 21SHOBJLISTS=$(STOBJLISTS:.ST=.SH) 22PFOBJLISTS=$(STOBJLISTS:.ST=.PF) 23 24dummy-target-1 $(SUBDIROBJLISTS) $(SUBDIROBJLISTS:.ST=.SH) $(SUBDIROBJLISTS:.ST=.PF): all-recurse 25 26# Gets invoked as $(PARSE_OBJLISTS) list-of-OBJS.*-files 27PARSE_OBJLISTS= set -x && $(PERL) -p -e 'BEGIN { $$SIG{__WARN__} = sub {die @_} }; $$e=$$ARGV; $$e =~ s/OBJS\...$$//; s/^/ /; s/ $$//; s/ / $$e/g;' 28 29LIBINSTLIST=install-shared 30 31libkrb5_$(LIBBASE)$(STLIBEXT): $(STOBJLISTS) 32 $(RM) $@ 33 @echo "building static $(LIBBASE) library" 34 set -x; objlist=`$(PARSE_OBJLISTS) $(STOBJLISTS)` && $(AR) cq $@ $$objlist 35 $(RANLIB) $@ 36 37$(LIBBASE)$(DYNOBJEXT): $(SHOBJLISTS) $(DYNOBJ_EXPDEPS) $(SHLIB_EXPORT_FILE_DEP) 38 $(RM) $@ 39 @echo "building dynamic $(LIBBASE) object" 40 set -x; objlist=`$(PARSE_OBJLISTS) $(SHOBJLISTS)` && $(MAKE_DYNOBJ_COMMAND) 41 42binutils.versions: $(SHLIB_EXPORT_FILE) Makefile 43 echo > binutils.versions "HIDDEN { local: __*; _rest*; _save*; *; };" 44 echo >> binutils.versions "$(LIBBASE)_$(LIBMAJOR)_MIT {" 45 sed >> binutils.versions < $(SHLIB_EXPORT_FILE) "s/$$/;/" 46 echo >> binutils.versions "};" 47 48osf1.exports: $(SHLIB_EXPORT_FILE) Makefile 49 $(RM) osf1.tmp osf1.exports 50 sed "s/^/-exported_symbol /" < $(SHLIB_EXPORT_FILE) > osf1.tmp 51 for f in . $(LIBINITFUNC); do \ 52 if test "$$f" != "." ; then \ 53 echo " -init $$f"__auxinit >> osf1.tmp; \ 54 else :; fi; \ 55 done 56 a=""; \ 57 for f in . $(LIBFINIFUNC); do \ 58 if test "$$f" != "." ; then \ 59 a="-fini $$f $$a"; \ 60 else :; fi; \ 61 done; echo " $$a" >> osf1.tmp; \ 62 mv -f osf1.tmp osf1.exports 63 64hpux.exports: $(SHLIB_EXPORT_FILE) Makefile 65 $(RM) hpux.tmp hpux.exports 66 sed "s/^/+e /" < $(SHLIB_EXPORT_FILE) > hpux.tmp 67 a=""; \ 68 for f in . $(LIBFINIFUNC); do \ 69 if test "$$f" != .; then \ 70 a="+I $${f}__auxfini $$a"; \ 71 else :; fi; \ 72 done; echo "$$a" >> hpux.tmp 73 echo "+e errno" >> hpux.tmp 74 mv -f hpux.tmp hpux.exports 75 76darwin.exports: $(SHLIB_EXPORT_FILE) Makefile 77 $(RM) darwin.exports 78 sed "s/^/_/" < $(SHLIB_EXPORT_FILE) > darwin.exports 79 80libkrb5_$(LIBBASE)$(PFLIBEXT): $(PFOBJLISTS) 81 $(RM) $@ 82 @echo "building profiled $(LIBBASE) library" 83 set -x; objlist=`$(PARSE_OBJLISTS) $(PFOBJLISTS)` && $(AR) cq $@ $$objlist 84 $(RANLIB) $@ 85 86# For static builds, we make a symlink in the main library directory, 87# allowing the plugin library to be a dependency of the core libraries 88# which use it. 89$(TOPLIBD)/libkrb5_$(LIBBASE)$(STLIBEXT): 90 $(RM) $@ 91 (cd $(TOPLIBD) && $(LN_S) $(RELDIR)/libkrb5_$(LIBBASE)$(STLIBEXT) .) 92 93# For shared builds, we make a symlink in the parent directory, allowing 94# tests to point plugin_base_dir at $(BUILDTOP)/plugins. 95../$(LIBBASE)$(DYNOBJEXT): 96 $(RM) $@ 97 (cd .. && $(LN_S) `basename $(mydir)`/$(LIBBASE)$(DYNOBJEXT) .) 98 99all-liblinks: all-libs $(PLUGINLINK) 100all-libs: $(PLUGIN) 101 102clean-libs: 103 $(RM) $(LIBBASE)$(DYNOBJEXT) 104 $(RM) binutils.versions osf1.exports darwin.exports hpux.exports 105 106clean-liblinks: 107 $(RM) $(PLUGINLINK) 108 109install-libs: $(PLUGININST) 110install-static: 111 $(RM) $(DESTDIR)$(KRB5_LIBDIR)/libkrb5_$(LIBBASE)$(STLIBEXT) 112 $(INSTALL_DATA) libkrb5_$(LIBBASE)$(STLIBEXT) $(DESTDIR)$(KRB5_LIBDIR) 113 $(RANLIB) $(DESTDIR)$(KRB5_LIBDIR)/libkrb5_$(LIBBASE)$(STLIBEXT) 114install-plugin: 115 $(RM) $(DESTDIR)$(MODULE_INSTALL_DIR)/$(LIBBASE)$(DYNOBJEXT) 116 $(INSTALL_SHLIB) $(LIBBASE)$(DYNOBJEXT) $(DESTDIR)$(MODULE_INSTALL_DIR) 117 118Makefile: $(top_srcdir)/config/libnover.in 119$(BUILDTOP)/config.status: $(top_srcdir)/config/shlib.conf 120 121# Use the following if links need to be made to $(TOPLIBD): 122# all-unix: all-liblinks 123# install-unix: install-libs 124# clean-unix:: clean-liblinks clean-libs 125 126# Use the following if links need not be made: 127# all-unix: all-libs 128# install-unix: install-libs 129# clean-unix:: clean-libs 130 131### 132### end config/libnovers.in 133