# form dir1:dir2 ...
# RELDIR path to this directory relative to $(TOPLIBD)
+LIBPREFIX=
+
# STOBJLISTS=dir1/OBJS.ST dir2/OBJS.ST etc...
SHOBJLISTS=$(STOBJLISTS:.ST=.SH)
PARSE_OBJLISTS= set -x && $(PERL) -p -e '$$e=$$ARGV; $$e =~ s/OBJS\...$$//; s/^/ /; s/ $$//; s/ / $$e/g;'
SHLIBVEXT=$(SHLIBEXT)
-LIBLIST=lib$(LIBBASE)$(SHLIBEXT)
+LIBLIST=$(LIBBASE)$(SHLIBEXT)
LIBINSTLIST=install-shared
-lib$(LIBBASE)$(SHLIBVEXT): $(SHOBJLISTS) $(SHLIB_EXPDEPS) $(SHLIB_EXPORT_FILE_DEP)
+$(LIBBASE)$(SHLIBVEXT): $(SHOBJLISTS) $(SHLIB_EXPDEPS) $(SHLIB_EXPORT_FILE_DEP)
$(RM) $@
@echo "building shared $(LIBBASE) library"
set -x; objlist=`$(PARSE_OBJLISTS) $(SHOBJLISTS)` && $(MAKE_SHLIB_COMMAND)
echo "+e errno" >> hpux10.tmp
mv -f hpux10.tmp hpux10.exports
-$(TOPLIBD)/lib$(LIBBASE)$(SHLIBEXT): lib$(LIBBASE)$(SHLIBEXT)
+$(TOPLIBD)/$(LIBBASE)$(SHLIBEXT): $(LIBBASE)$(SHLIBEXT)
$(RM) $@
- (cd $(TOPLIBD) && $(LN_S) $(RELDIR)/lib$(LIBBASE)$(SHLIBEXT) .)
+ (cd $(TOPLIBD) && $(LN_S) $(RELDIR)/$(LIBBASE)$(SHLIBEXT) .)
all-libs: $(LIBLIST)
clean-libs:
- $(RM) lib$(LIBBASE)$(SHLIBEXT)
+ $(RM) $(LIBBASE)$(SHLIBEXT)
$(RM) binutils.versions osf1.exports
install-libs: $(LIBINSTLIST)
install-shared:
- $(RM) $(DESTDIR)$(KRB5_LIBDIR)/lib$(LIBBASE)$(SHLIBEXT)
- $(INSTALL_SHLIB) lib$(LIBBASE)$(SHLIBEXT) $(DESTDIR)$(KRB5_LIBDIR)
+ $(RM) $(DESTDIR)$(KRB5_DB_MODULE_DIR)/$(LIBBASE)$(SHLIBEXT)
+ $(INSTALL_SHLIB) $(LIBBASE)$(SHLIBEXT) $(DESTDIR)$(KRB5_DB_MODULE_DIR)
Makefile: $(SRCTOP)/config/libnover.in
$(thisconfigdir)/config.status: $(SRCTOP)/config/shlib.conf
# Alpha OSF/1 doesn't need separate PIC objects
SHOBJEXT=.o
INIT_FINI_PREP=initfini=
- LDCOMBINE='$(CC) $(PTHREAD_CFLAGS) -shared -Wl,-expect_unresolved -Wl,\* -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations -Wl,-soname -Wl,lib$(LIBBASE)$(SHLIBSEXT) -Wl,-hidden -Wl,-input,osf1.exports $$initfini'
+ LDCOMBINE='$(CC) $(PTHREAD_CFLAGS) -shared -Wl,-expect_unresolved -Wl,\* -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations -Wl,-soname -Wl,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) -Wl,-hidden -Wl,-input,osf1.exports $$initfini'
SHLIB_EXPORT_FILE_DEP=osf1.exports
use_linker_init_option=yes
use_linker_fini_option=yes
if test "$krb5_cv_prog_gcc" = yes; then
PICFLAGS=-fPIC
SHLIB_EXPFLAGS='-Wl,+s -Wl,+b,$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
- LDCOMBINE='gcc -fPIC -shared -Wl,+h,lib$(LIBBASE)$(SHLIBSEXT) -Wl,-c,hpux10.exports'
+ LDCOMBINE='gcc -fPIC -shared -Wl,+h,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) -Wl,-c,hpux10.exports'
else
PICFLAGS=+z
SHLIB_EXPFLAGS='+s +b $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
- LDCOMBINE='ld -b +h lib$(LIBBASE)$(SHLIBSEXT) -c hpux10.exports'
+ LDCOMBINE='ld -b +h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) -c hpux10.exports'
fi
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -Wl,+s $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
SHOBJEXT=.o
# Kludge follows: (gcc makes n32 object files but ld expects o32, so we reeducate ld)
if test "$krb5_cv_prog_gcc" = yes; then
- LDCOMBINE='ld -n32 -shared -ignore_unresolved -update_registry $(BUILDTOP)/so_locations -soname lib$(LIBBASE)$(SHLIBSEXT)'
+ LDCOMBINE='ld -n32 -shared -ignore_unresolved -update_registry $(BUILDTOP)/so_locations -soname $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
else
- LDCOMBINE='ld -shared -ignore_unresolved -update_registry $(BUILDTOP)/so_locations -soname lib$(LIBBASE)$(SHLIBSEXT)'
+ LDCOMBINE='ld -shared -ignore_unresolved -update_registry $(BUILDTOP)/so_locations -soname $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
fi
SHLIB_EXPFLAGS='-rpath $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
# no gprof for Irix...
INIT_FINI_PREP='initfini=; for f in . $(LIBINITFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-init,$${f}__auxinit"; fi; done; for f in . $(LIBFINIFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-fini,$${f}"; fi; done'
LDCOMBINE_TAIL='-Wl,-exports_file -Wl,$(SHLIB_EXPORT_FILE)'
fi
- LDCOMBINE='$(CC) -shared -Wl,-ignore_unresolved -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations -Wl,-soname -Wl,lib$(LIBBASE)$(SHLIBSEXT) $$initfini'
+ LDCOMBINE='$(CC) -shared -Wl,-ignore_unresolved -Wl,-update_registry -Wl,$(BUILDTOP)/so_locations -Wl,-soname -Wl,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) $$initfini'
SHLIB_EXPFLAGS='-rpath $(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
# no gprof for Irix...
PROFFLAGS=-p
mips-sni-sysv4)
if test "$krb5_cv_prog_gcc" = yes; then
PICFLAGS=-fpic
- LDCOMBINE='$(CC) -G -Wl,-h -Wl,lib$(LIBBASE)$(SHLIBSEXT)'
+ LDCOMBINE='$(CC) -G -Wl,-h -Wl,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
else
PICFLAGS=-Kpic
- LDCOMBINE='$(CC) -G -h lib$(LIBBASE)$(SHLIBSEXT)'
+ LDCOMBINE='$(CC) -G -h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
fi
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
SHLIBEXT=.so
SHLIBVEXT='.so.$(LIBMAJOR).$(LIBMINOR)'
SHLIBSEXT='.so.$(LIBMAJOR)'
SHLIBEXT=.so
- LDCOMBINE='ld -shared -soname lib$(LIBBASE)$(SHLIBSEXT)'
+ LDCOMBINE='ld -shared -soname $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
RPATH_FLAG='-Wl,-rpath -Wl,'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) $(RPATH_FLAG)$(PROG_RPATH) $(CFLAGS) $(LDFLAGS)'
SHLIBSEXT='.$(LIBMAJOR).dylib'
SHLIB_EXPFLAGS='$(SHLIB_DIRS) $(SHLIB_EXPLIBS)'
SHLIBEXT=.dylib
- LDCOMBINE='$(CC) -undefined warning -dynamiclib -compatibility_version $(LIBMAJOR) -current_version $(LIBMAJOR).$(LIBMINOR) -install_name "$(KRB5_LIBDIR)/lib$(LIBBASE)$(SHLIBVEXT)" $(CFLAGS) $(LDFLAGS)'
+ LDCOMBINE='$(CC) -undefined warning -dynamiclib -compatibility_version $(LIBMAJOR) -current_version $(LIBMAJOR).$(LIBMINOR) -install_name "$(KRB5_LIBDIR)/$(LIBPREFIX)$(LIBBASE)$(SHLIBVEXT)" $(CFLAGS) $(LDFLAGS)'
CC_LINK_SHARED='$(CC) $(PROG_LIBPATH) -dynamic $(CFLAGS) $(LDFLAGS)'
CC_LINK_STATIC='$(CC) $(PROG_LIBPATH) $(CFLAGS) $(LDFLAGS)'
RUN_ENV='DYLD_LIBRARY_PATH=`echo $(PROG_LIBPATH) | sed -e "s/-L//g" -e "s/ /:/g"`; export DYLD_LIBRARY_PATH;'
*-*-solaris*)
if test "$krb5_cv_prog_gcc" = yes; then
PICFLAGS=-fPIC
- LDCOMBINE='$(CC) -shared -h lib$(LIBBASE)$(SHLIBSEXT)'
+ LDCOMBINE='$(CC) -shared -h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
else
PICFLAGS=-KPIC
# Solaris cc doesn't default to stuffing the SONAME field...
- LDCOMBINE='$(CC) -dy -G -z text -h lib$(LIBBASE)$(SHLIBSEXT) $$initfini'
+ LDCOMBINE='$(CC) -dy -G -z text -h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT) $$initfini'
#
INIT_FINI_PREP='if test -z "$(LIBINITFUNC)"; then initfini=; else initfini="-Wl,-z,initarray=$(LIBINITFUNC)__auxinit"; fi ; if test -z "$(LIBFINIFUNC)"; then :; else initfini="$$initfini -Wl,-z,finiarray=$(LIBFINIFUNC)" ; fi'
INIT_FINI_PREP='initfini=; for f in . $(LIBINITFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-z,initarray=$${f}__auxinit"; fi; done; for f in . $(LIBFINIFUNC); do if test $$f = .; then :; else initfini="$$initfini -Wl,-z,finiarray=$$f"; fi; done'
SHLIBEXT=.so
# Linux ld doesn't default to stuffing the SONAME field...
# Use objdump -x to examine the fields of the library
- LDCOMBINE='$(CC) -shared -fPIC -Wl,-h,lib$(LIBBASE)$(SHLIBSEXT)'
+ LDCOMBINE='$(CC) -shared -fPIC -Wl,-h,$(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
#
LDCOMBINE_TAIL='-Wl,--version-script binutils.versions'
SHLIB_EXPORT_FILE_DEP=binutils.versions
# for the libraries marked as not having any dependencies; while
# that's not strictly correct, the resulting behavior -- not adding
# extra -R directories -- is still what we want.
- #LDCOMBINE='ld -shared -h lib$(LIBBASE)$(SHLIBSEXT)'
+ #LDCOMBINE='ld -shared -h $(LIBPREFIX)$(LIBBASE)$(SHLIBSEXT)'
#LDCOMBINE_TAIL="-lc"
#SHLIB_EXPFLAGS='-R$(SHLIB_RDIRS) $(SHLIB_DIRS) $(SHLIB_EXPLIBS)'