shlib-overhaul-20060802

Overhaul how we build shared libraries.  Pull the code for building and
installing shared libraries out into simple shell scripts that we can then
evolve as we need to and make more sophisticated.  Remove the details of
how to use a mapfile from the Solaris Autoconf-driven configuration and
move them to the Solaris case of the build script.  In the process, make
it possible to build more than one shared library in a single directory.

Remove the last vestiges of libafssetpag from the sys directory; kopenafs
now replaces all of that.

Only link in syscall.o in the sys and kopenafs directories on those
platforms that actually care so that we don't have to do work to generate
a valid .o file that can be included in an archive.
This commit is contained in:
Russ Allbery 2006-08-02 22:54:51 +00:00
parent aebadcd547
commit 2ec9b1db03
23 changed files with 302 additions and 177 deletions

View File

@ -37,6 +37,8 @@ src/comerr/test/Makefile \
src/config/Makefile \
src/config/Makefile.config \
src/config/Makefile.version-NOCML \
src/config/shlib-build \
src/config/shlib-install \
src/des/Makefile \
src/des/test/Makefile \
src/dir/Makefile \
@ -120,5 +122,7 @@ src/vol/Makefile \
src/vol/test/Makefile \
src/volser/Makefile \
src/xstat/Makefile \
src/helper-splint.sh \
)
src/helper-splint.sh,
[chmod a+x src/config/shlib-build
chmod a+x src/config/shlib-install])

View File

@ -747,7 +747,7 @@ case $AFS_SYSNAME in
XLIBKVM="-lkvm"
XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
LD="/usr/ccs/bin/ld"
SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
LWP_OPTMZ="-g"
;;
@ -768,7 +768,7 @@ case $AFS_SYSNAME in
LD="/usr/ccs/bin/ld"
XLIBKVM="-lkvm"
XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
LWP_OPTMZ="-g"
;;
@ -790,7 +790,7 @@ case $AFS_SYSNAME in
XLIBELFA="-lelf"
XLIBKVM="-lkvm"
XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
LWP_OPTMZ="-g"
;;
@ -812,7 +812,7 @@ case $AFS_SYSNAME in
XLIBELFA="-lelf"
XLIBKVM="-lkvm"
XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
LWP_OPTMZ="-g"
;;
@ -834,7 +834,7 @@ case $AFS_SYSNAME in
XLIBELFA="-lelf"
XLIBKVM="-lkvm"
XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
LWP_OPTMZ="-g"
;;
@ -856,7 +856,7 @@ case $AFS_SYSNAME in
XLIBELFA="-lelf"
XLIBKVM="-lkvm"
XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
LWP_OPTMZ="-g"
;;
@ -878,7 +878,7 @@ case $AFS_SYSNAME in
XLIBELFA="-lelf"
XLIBKVM="-lkvm"
XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
;;
sunx86_58)
@ -899,7 +899,7 @@ case $AFS_SYSNAME in
XLIBELFA="-lelf"
XLIBKVM="-lkvm"
XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
;;
sunx86_59)
@ -920,7 +920,7 @@ case $AFS_SYSNAME in
XLIBELFA="-lelf"
XLIBKVM="-lkvm"
XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
;;
sunx86_510)
@ -941,7 +941,7 @@ case $AFS_SYSNAME in
XLIBELFA="-lelf"
XLIBKVM="-lkvm"
XLIBS="${LIB_AFSDB} -lsocket -lnsl -lintl -ldl"
SHLIB_LINKER="${CC} -G -dy -Wl,-M\$(srcdir)/mapfile -Bsymbolic -z text"
SHLIB_LINKER="${CC} -G -dy -Bsymbolic -z text"
;;
esac

View File

@ -15,4 +15,6 @@ Makefile.sun4x_56
Makefile.sun4x_57
param.h.new
Makefile.config
shlib-build
shlib-install
stamp-h1

121
src/config/shlib-build.in Normal file
View File

@ -0,0 +1,121 @@
#!/bin/sh
#
# Builds a shared library, incorporating the random portability work that we
# have to do. Gets the basic information from Autoconf and knows how to find
# the appropriate system-specific map or version file and set library SONAMEs.
#
# This is not libtool. If it appears to be in danger of evolving into
# libtool, please shoot it and start over, possibly by rewriting AFS in Ada.
# We take the following regular arguments: -d <srcdir>, -f <filename>, -l
# <library>, -M <major>, and -m <minor>. If -f is given, it overrides -l and
# specifies the complete filename of the shared library to build. We then
# expect a -- option indicating the end of our arguments and the rest of the
# arguments are passed along verbatim to the linker.
linker="@SHLIB_LINKER@"
suffix="@SHLIB_SUFFIX@"
sysname="@AFS_SYSNAME@"
library=
major=
minor=
srcdir=.
done=
while [ -z "$done" ] && [ $# -gt 0 ] ; do
case "$1" in
-d)
shift
srcdir="$1"
shift
;;
-f)
shift
filename="$1"
shift
;;
-l)
shift
library="$1"
shift
;;
-M)
shift
major="$1"
shift
;;
-m)
shift
minor="$1"
shift
;;
--)
shift
done=yes
;;
*)
echo 'Usage: shlib-build -l <lib> -M <major> -m <minor> -- ...' >&2
exit 1
;;
esac
done
if [ -z "$library" ] ; then
echo 'Usage: shlib-install -l <lib> -M <major> -m <minor>' >&2
exit 1
fi
# Print out what we're doing while we do it for debugging.
export=
if [ -z "$filename" ] ; then
if [ -z "$major" ] ; then
filename="$library.$suffix"
soname=
else
filename="$library.$suffix.$major.$minor"
soname="$library.$suffix.$major"
fi
fi
case $sysname in
rs_aix*)
if [ -f "$srcdir/$library.exp" ] ; then
export="-bE:$srcdir/$library.exp"
fi
echo "$linker $export -o $filename $*"
$linker $export -o "$filename" "$@"
;;
sun*_5*)
if [ -f "$srcdir/$library.map" ] ; then
export="-Wl,-M$srcdir/$library.map"
fi
if [ -z "$soname" ] ; then
echo "$linker $export -o $filename $*"
$linker $export -o "$filename" "$@"
else
echo "$linker $export -h $soname -o $filename $*"
$linker $export -h "$soname" -o "$filename" "$@"
fi
;;
*_linux*)
if [ -f "$srcdir/$library.map" ] ; then
export="-Wl,--version-script=$srcdir/$library.map"
fi
if [ -z "$soname" ] ; then
echo "$linker $export -o $filename $*"
$linker $export -o "$filename" "$@"
else
echo "$linker $export -Wl,-h,$soname -o $filename $*"
$linker $export -Wl,-h,"$soname" -o "$filename" "$@"
fi
;;
hp_ux*)
if [ -f "$srcdir/$library.hp" ] ; then
export="-c $srcdir/$library.hp"
fi
echo "$linker $export -o $filename $*"
$linker $export -o "$filename" "$@"
;;
*)
echo "$linker -o $filename $*"
$linker -o "$filename" "$@"
;;
esac

View File

@ -0,0 +1,79 @@
#!/bin/sh
#
# Install a shared library, doing the appropriate portable linking depending
# on the platform. We don't deal with rpath.
#
# This is not libtool. If it appears to be in danger of evolving into
# libtool, please shoot it and start over, possibly by rewriting AFS in Ada.
# We take the following regular arguments: -d <destination>, -l <library>, -M
# <major>, -m <minor>.
INSTALL="@INSTALL@"
install="@INSTALL_DATA@"
suffix="@SHLIB_SUFFIX@"
sysname="@AFS_SYSNAME@"
library=
major=
minor=
while [ $# -gt 0 ] ; do
case "$1" in
-d)
shift
dest="$1"
shift
;;
-l)
shift
library="$1"
shift
;;
-M)
shift
major="$1"
shift
;;
-m)
shift
minor="$1"
shift
;;
*)
echo 'Usage: shlib-install -d <dest> -l <lib> -M <maj> -m <min>' >&2
exit 1
;;
esac
done
if [ -z "$library" ] || [ -z "$dest" ] ; then
echo 'Usage: shlib-install -d <dest> -l <lib> -M <maj> -m <min>' >&2
exit 1
fi
if [ -z "$major" ] ; then
filename="$library.$suffix"
else
filename="$library.$suffix.$major.$minor"
fi
case $sysname in
rs_aix*)
$install "$filename" "$dest/$library.$suffix.shared"
;;
hp_ux*)
if [ -z "$major" ] ; then
$install "$filename" "$dest/$library.$suffix"
else
$install "$filename" "$dest/$library.$suffix.$major"
ln -s -f "$library.$suffix.$major" "$dest/$library.$suffix"
fi
;;
*)
if [ -z "$major" ] ; then
$install "$filename" "$dest/$library.$suffix"
else
$install "$filename" $dest/"$filename"
ln -s -f "$filename" "$dest/$library.$suffix"
ln -s -f "$filename" "$dest/$library.$suffix.$major"
fi
;;
esac

View File

@ -1,5 +1,6 @@
AFS_component_version_number.c
Makefile
libkopenafs.*
libkopenafs.a*
libkopenafs.so*
test-setpag
test-unlog

View File

@ -20,7 +20,7 @@ INCLUDES = -I. -I${srcdir} -I../sys
CFLAGS = ${COMMON_CFLAGS} ${INCLUDES} ${MT_CFLAGS} ${SHLIB_CFLAGS}
SYS = ${srcdir}/../sys
SYSOBJS = glue.o pioctl.o setpag.o syscall.o
SYSOBJS = glue.o pioctl.o setpag.o
LIBOBJS = kopenafs.o ${SYSOBJS} AFS_component_version_number.o
LIBKOPENAFS = libkopenafs.${SHLIB_SUFFIX}.${MAJOR}.${MINOR}
@ -29,11 +29,8 @@ all: ${TOP_LIBDIR}/${LIBKOPENAFS} ${TOP_LIBDIR}/libkopenafs.a \
${TOP_INCDIR}/kopenafs.h
${TOP_LIBDIR}/${LIBKOPENAFS}: ${LIBKOPENAFS}
${INSTALL_DATA} ${LIBKOPENAFS} ${TOP_LIBDIR}/${LIBKOPENAFS}
-ln -f -s ${LIBKOPENAFS} \
${TOP_LIBDIR}/libkopenafs.${SHLIB_SUFFIX}
-ln -f -s ${LIBKOPENAFS} \
${TOP_LIBDIR}/libkopenafs.${SHLIB_SUFFIX}.${MAJOR}
../config/shlib-install -d ${TOP_LIBDIR} \
-l libkopenafs -M ${MAJOR} -m ${MINOR}
${TOP_LIBDIR}/libkopenafs.a: libkopenafs.a
${INSTALL_DATA} libkopenafs.a $@
@ -53,47 +50,41 @@ setpag.o: ${SYS}/setpag.c ${SYS}/afssyscalls.h
# This file is only actually used on SGI and AIX, but some systems can't cope
# with an empty .o file being included in a link.
syscall.o: ${SYS}/syscall.s
@set -x; case "$(SYS_NAME)" in \
@set -e; set -x; case "$(SYS_NAME)" in \
sgi_*) \
${CC} ${CFLAGS} -c ${SYS}/syscall.s; \
;; \
*fbsd* | *obsd* | *nbsd*) \
${CCOBJ} -E ${SFLAGS} syscall.s > syscall.S ; \
${AS} syscall.S -o syscall.o ; \
$(RM) -f syscall.S; \
;; \
rs_aix*) \
rs_aix* | hp_ux10*) \
/lib/cpp -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss; \
;; \
*) \
touch syscall.o; \
touch syscall.o ; \
;; \
esac
libkopenafs.a: ${LIBOBJS}
${RM} -f $@
${AR} crv $@ ${LIBOBJS}
@set -e; set -x; case "$(SYS_NAME)" in \
sgi_* | rs_aix* | hp_ux10*) \
${AR} crv $@ ${LIBOBJS} syscall.o ;; \
*) \
${AR} crv $@ ${LIBOBJS} ;; \
esac
${RANLIB} $@
${LIBKOPENAFS}: ${LIBOBJS}
case ${SYS_NAME} in \
rs_aix*) \
${SHLIB_LINKER} -o ${LIBKOPENAFS} ${LIBOBJS} \
-bE:${srcdir}/kopenafs.exp ${MT_LIBS}; \
;; \
sun*_5*) \
${SHLIB_LINKER} -h libafsrpc.${SHLIB_SUFFIX}.${MAJOR} \
-o ${LIBKOPENAFS} ${LIBOBJS} ${MT_LIBS}; \
;; \
*_linux*) \
${SHLIB_LINKER} -Wl,-h,libafsrpc.${SHLIB_SUFFIX}.${MAJOR} \
-Wl,--version-script=${srcdir}/mapfile \
-o ${LIBKOPENAFS} ${LIBOBJS} ${MT_LIBS}; \
@set -e; set -x; case ${SYS_NAME} in \
sgi_* | rs_aix* | hp_ux10*) \
../config/shlib-build -d $(srcdir) -l libkopenafs \
-M ${MAJOR} -m ${MINOR} -- \
${LIBOBJS} syscall.o ${MT_LIBS} ; \
;; \
*) \
${SHLIB_LINKER} -o ${LIBKOPENAFS} ${LIBOBJS} ${MT_LIBS}; \
../config/shlib-build -d $(srcdir) -l libkopenafs \
-M ${MAJOR} -m ${MINOR} -- \
${LIBOBJS} ${MT_LIBS} ; \
;; \
esac
@ -110,28 +101,23 @@ install: ${LIBKOPENAFS}
${INSTALL} -d ${DESTDIR}${libdir}
${INSTALL} -d ${DESTDIR}${includedir}
${INSTALL_DATA} libkopenafs.a ${DESTDIR}${libdir}/libkopenafs.a
${INSTALL_DATA} ${LIBKOPENAFS} ${DESTDIR}${libdir}/${LIBKOPENAFS}
-ln -f -s ${LIBKOPENAFS} \
${DESTDIR}${libdir}/libkopenafs.${SHLIB_SUFFIX}
-ln -f -s ${LIBKOPENAFS} \
${DESTDIR}${libdir}/libkopenafs.${SHLIB_SUFFIX}.${MAJOR}
${INSTALL_DATA} kopenafs.h ${DESTDIR}${includedir}/kopenafs.h
../config/shlib-install -d ${DESTDIR}${libdir} \
-l libkopenafs -M ${MAJOR} -m ${MINOR}
dest: ${LIBKOPENAFS}
${INSTALL} -d ${DEST}/lib
${INSTALL} -d ${DEST}/include
${INSTALL_DATA} libkopenafs.a ${DEST}/lib/libkopenafs.a
${INSTALL_DATA} ${LIBKOPENAFS} ${DEST}/lib/${LIBKOPENAFS}
-ln -f -s ${LIBKOPENAFS} \
${DEST}/lib/libkopenafs.${SHLIB_SUFFIX}
-ln -f -s ${LIBKOPENAFS} \
${DEST}/lib/libkopenafs.${SHLIB_SUFFIX}.${MAJOR}
${INSTALL_DATA} kopenafs.h ${DEST}/include/kopenafs.h
../config/shlib-install -d ${DEST}/lib \
-l libkopenafs -M ${MAJOR} -m ${MINOR}
#
# Misc targets
#
clean:
$(RM) -f *.o *.a ${LIBKOPENAFS} AFS_component_version_number.c
$(RM) -f *.o *.a ${LIBKOPENAFS} AFS_component_version_number.c \
test-setpag test-unlog
include ../config/Makefile.version

View File

@ -48,46 +48,13 @@ afs_util_krb.o: afs_util.c afs_pam_msg.h afs_message.h afs_util.h
${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/afs_util.c -o afs_util_krb.o
pam_afs.so.1: $(SHOBJS) afs_setcred.o afs_auth.o afs_util.o
set -x; \
case "$(SYS_NAME)" in \
hp_ux* | ia64_hpux*) \
$(LD) $(LDFLAGS) -c ${srcdir}/mapfile.hp -o $@ \
afs_setcred.o afs_auth.o afs_util.o \
$(SHOBJS) $(LIBS) ;; \
sun*_5*) \
$(LD) $(LDFLAGS) -M ${srcdir}/mapfile -o $@ \
afs_setcred.o afs_auth.o afs_util.o \
$(SHOBJS) $(LIBS) ;; \
*linux*) \
$(CC) $(LDFLAGS) -o $@ afs_setcred.o \
afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\
*fbsd*| *nbsd*) \
$(CC) $(LDFLAGS) -o $@ afs_setcred.o \
afs_auth.o afs_util.o $(SHOBJS) $(LIBS) ;;\
* ) \
echo No link line for system $(SYS_NAME). ;; \
esac
../config/shlib-build -d $(srcdir) -f pam_afs.so.1 -l pam_afs -- \
afs_setcred.o afs_auth.o afs_util.o ${SHOBJS} ${LIBS}
pam_afs.krb.so.1: $(SHOBJS) afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o
set -x; \
case "$(SYS_NAME)" in \
hp_ux* | ia64_hpux*) \
$(LD) $(LDFLAGS) -c ${srcdir}/mapfile.hp -o $@ \
afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o \
$(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \
sun*_5*) \
$(LD) $(LDFLAGS) -M ${srcdir}/mapfile -o $@ \
afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o \
$(SHOBJS) $(LDFLAGS) $(KLIBS) ;; \
*linux*) \
$(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o \
afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
*fbsd*| *nbsd*) \
$(CC) $(LDFLAGS) -o $@ afs_setcred_krb.o \
afs_auth_krb.o afs_util_krb.o $(SHOBJS) $(KLIBS) ;;\
* ) \
echo No link line for system $(SYS_NAME). ;; \
esac
../config/shlib-build -d $(srcdir) -f pam_afs.krb.so.1 -l pam_afs -- \
afs_setcred_krb.o afs_auth_krb.o afs_util_krb.o \
${SHOBJS} ${KLIBS}
test_pam: test_pam.o
set -x; \

View File

@ -1,2 +1,4 @@
Makefile
libafsauthent.so.1.0
libafsauthent.a.*
libafsauthent.sl*
libafsauthent.so*

View File

@ -103,31 +103,24 @@ LIBAFSAUTHENT = libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR}.${LIBAFSAUTH
all: ${TOP_LIBDIR}/${LIBAFSAUTHENT}
${TOP_LIBDIR}/${LIBAFSAUTHENT}: ${LIBAFSAUTHENT}
${INSTALL_DATA} ${LIBAFSAUTHENT} ${TOP_LIBDIR}/${LIBAFSAUTHENT}
-ln -f -s ${LIBAFSAUTHENT} ${TOP_LIBDIR}/libafsauthent.${SHLIB_SUFFIX}
-ln -f -s ${LIBAFSAUTHENT} ${TOP_LIBDIR}/libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR}
../config/shlib-install -d ${TOP_LIBDIR} \
-l libafsauthent \
-M ${LIBAFSAUTHENTMAJOR} -m ${LIBAFSAUTHENTMINOR}
install: ${LIBAFSAUTHENT}
${INSTALL_DATA} ${LIBAFSAUTHENT} ${DESTDIR}${libdir}/${LIBAFSAUTHENT}
-ln -f -s ${LIBAFSAUTHENT} ${DESTDIR}${libdir}/libafsauthent.${SHLIB_SUFFIX}
-ln -f -s ${LIBAFSAUTHENT} ${DESTDIR}${libdir}/libafsauthent.${SHLIB_SUFFIX}.${LIBFASAUTHENTMAJOR}
../config/shlib-install -d ${DESTDIR}${libdir} \
-l libafsauthent \
-M ${LIBAFSAUTHENTMAJOR} -m ${LIBAFSAUTHENTMINOR}
dest: ${LIBAFSAUTHENT}
${INSTALL_DATA} ${LIBAFSAUTHENT} ${DEST}/lib/${LIBAFSAUTHENT}
-ln -f -s ${LIBAFSAUTHENT} ${DEST}/lib/libafsauthent.${SHLIB_SUFFIX}
-ln -f -s ${LIBAFSAUTHENT} ${DEST}/lib/libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR}
../config/shlib-install -d ${DEST}/lib \
-l libafsauthent \
-M ${LIBAFSAUTHENTMAJOR} -m ${LIBAFSAUTHENTMINOR}
${LIBAFSAUTHENT}: ${LIBOBJS}
case ${SYS_NAME} in \
rs_aix4*) \
${SHLIB_LINKER} -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -bE:afsauthent.exp -lafsrpc ${MT_LIBS};; \
sun*_5*) \
${SHLIB_LINKER} -h libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR} -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -lafsrpc ${MT_LIBS};; \
*_linux*) \
${SHLIB_LINKER} -Wl,-h,libafsauthent.${SHLIB_SUFFIX}.${LIBAFSAUTHENTMAJOR} -Wl,--version-script=${srcdir}/mapfile -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -lafsrpc ${MT_LIBS};; \
*) \
${SHLIB_LINKER} -o ${LIBAFSAUTHENT} ${LIBOBJS} -L${TOP_LIBDIR} -lafsrpc ${MT_LIBS};; \
esac
../config/shlib-build -d $(srcdir) -l libafsauthent \
-M ${LIBAFSAUTHENTMAJOR} -m ${LIBAFSAUTHENTMINOR} -- \
${LIBOBJS} ${MT_LIBS}
audit.o: ${AUDIT}/audit.c
${CCRULE}
@ -281,4 +274,4 @@ pioctl.o: ${SYS}/pioctl.c
${CCRULE}
clean:
$(RM) -f *.o *.a libafsauthent*
$(RM) -f *.o *.a libafsauthent.a* libafsauthent.sl* libafsauthent.so*

View File

@ -1,2 +1,4 @@
Makefile
libafsrpc.so.1.1
libafsrpc.a*
libafsrpc.sl*
libafsrpc.so*

View File

@ -137,31 +137,21 @@ LIBAFSRPC = libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR}.${LIBAFSRPCMINOR}
all: ${TOP_LIBDIR}/${LIBAFSRPC}
${TOP_LIBDIR}/${LIBAFSRPC}: ${LIBAFSRPC}
${INSTALL_DATA} ${LIBAFSRPC} ${TOP_LIBDIR}/${LIBAFSRPC}
-ln -f -s ${LIBAFSRPC} ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}
-ln -f -s ${LIBAFSRPC} ${TOP_LIBDIR}/libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR}
../config/shlib-install -d ${TOP_LIBDIR} \
-l libafsrpc -M ${LIBAFSRPCMAJOR} -m ${LIBAFSRPCMINOR}
install: ${LIBAFSRPC}
${INSTALL_DATA} ${LIBAFSRPC} ${DESTDIR}${libdir}/${LIBAFSRPC}
-ln -f -s ${LIBAFSRPC} ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}
-ln -f -s ${LIBAFSRPC} ${DESTDIR}${libdir}/libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR}
../config/shlib-install -d ${DESTDIR}${libdir} \
-l libafsrpc -M ${LIBAFSRPCMAJOR} -m ${LIBAFSRPCMINOR}
dest: ${LIBAFSRPC}
${INSTALL_DATA} ${LIBAFSRPC} ${DEST}/lib/${LIBAFSRPC}
-ln -f -s ${LIBAFSRPC} ${DEST}/lib/libafsrpc.${SHLIB_SUFFIX}
-ln -f -s ${LIBAFSRPC} ${DEST}/lib/libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR}
../config/shlib-install -d ${DEST}/lib \
-l libafsrpc -M ${LIBAFSRPCMAJOR} -m ${LIBAFSRPCMINOR}
${LIBAFSRPC}: ${LIBOBJS}
case ${SYS_NAME} in \
rs_aix4* | rs_aix5*) \
${SHLIB_LINKER} -o ${LIBAFSRPC} ${LIBOBJS} -bE:${srcdir}/afsrpc.exp ${MT_LIBS};; \
sun*_5*) \
${SHLIB_LINKER} -h libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR} -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \
*_linux*) \
${SHLIB_LINKER} -Wl,-h,libafsrpc.${SHLIB_SUFFIX}.${LIBAFSRPCMAJOR} -Wl,--version-script=${srcdir}/mapfile -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \
*) \
${SHLIB_LINKER} -o ${LIBAFSRPC} ${LIBOBJS} ${MT_LIBS};; \
esac
../config/shlib-build -d $(srcdir) -l libafsrpc \
-M ${LIBAFSRPCMAJOR} -m ${LIBAFSRPCMINOR} -- \
${LIBOBJS} ${MT_LIBS}
rx_event.o: ${RX}/rx_event.c
${CCRULE}
@ -417,4 +407,4 @@ afsaux.o: ${FSINT}/afsaux.c
${CCRULE}
clean:
$(RM) -f *.o libafsrpc*
$(RM) -f *.o libafsrpc.a* libafsrpc.sl* libafsrpc.so*

View File

@ -1,8 +1,3 @@
# API version. When something changes, increment as appropriate.
# Ignore at your own risk.
LIBAFSSETPAGMAJOR=1
LIBAFSSETPAGMINOR=0
# Copyright 2000, International Business Machines Corporation and others.
# All Rights Reserved.
#
@ -19,7 +14,8 @@ CFLAGS=-I. -I${srcdir} ${DBUG} -I${TOP_OBJDIR}/src/config -I${TOP_INCDIR} ${XCF
SFLAGS=-I${TOP_INCDIR}
LIBS=libsys.a ${TOP_LIBDIR}/librx.a libsys.a ${TOP_LIBDIR}/liblwp.a ${TOP_LIBDIR}/util.a ${XLIBS}
OBJECTS= afssyscalls.o setpag.o pioctl.o glue.o syscall.o
OBJECTS= afssyscalls.o setpag.o pioctl.o glue.o \
AFS_component_version_number.o
SHLIBOBJS = picobj/setpag.o picobj/glue.o syscall.o
RMTOBJS=rmtsysnet.o rmtsysc.o rmtsys.cs.o rmtsys.xdr.o rmtsys.ss.o rmtsyss.o
@ -80,39 +76,32 @@ depinstall: \
Krmtsys.cs.c Krmtsys.h Krmtsys.xdr.c rmtsys.h
libsys.a: ${OBJECTS} ${RMTOBJS} afsl.exp AFS_component_version_number.o
-$(RM) -f $@
$(AR) crv $@ ${OBJECTS} ${RMTOBJS} \
AFS_component_version_number.o ${LIBSYS_AIX_EXP}
$(RANLIB) $@
@set -x; case "${SYS_NAME}" in \
rs_aix*) \
$(AR) crv $@ afsl.exp;; \
$(RM) -f $@
@set -e; set -x; case "$(SYS_NAME)" in \
sgi_* | hp_ux10*) \
${AR} crv $@ ${OBJECTS} ${RMTOBJS} syscall.o ;; \
rs_aix*) \
${AR} crv $@ ${OBJECTS} ${RMTOBJS} syscall.o afsl.exp ;; \
*) \
${AR} crv $@ ${OBJECTS} ${RMTOBJS} ;; \
esac
$(RANLIB) $@
tests: pagsh pagsh.krb fixit iinc idec icreate iopen istat rmtsysd
syscall.o: syscall.s
@set -x; case "$(SYS_NAME)" in \
sun4c_51 | sun4c_52 | sun4m_51 | sun4m_52 | sun4c_53 | sun4m_53 | sun4_53 | sun4_52 | sun4_54 | sun4c_54 | sun4m_54 | sun4x_5? | sun4x_5?? | sunx86_5? | sunx86_5?? ) \
/usr/ccs/lib/cpp -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss;; \
sgi_* |*_darwin* ) \
${CC} ${CFLAGS} -c ${srcdir}/syscall.s;; \
alpha_osf1 | alpha_osf20 | alpha_osf30 | alpha_osf32 | alpha_osf32c | alpha_dux?? ) \
${AS} -P ${CFLAGS} -D_NO_PROTO -DMACH -DOSF -nostdinc -traditional -DASSEMBLER ${srcdir}/syscall.s; \
${AS} -o syscall.o syscall.i; \
$(RM) -f syscall.ss syscall.i;; \
hp_ux11? ) \
touch syscall.o;; \
amd64_fbsd*|i386_*bsd*|*nbsd*) \
${CCOBJ} -E ${SFLAGS} syscall.s > syscall.S ; \
${AS} syscall.S -o syscall.o ; \
$(RM) -f syscall.S ;;\
*) \
@set -e; set -x; case "$(SYS_NAME)" in \
sgi_*) \
${CC} ${CFLAGS} -c ${SYS}/syscall.s; \
;; \
rs_aix* | hp_ux10*) \
/lib/cpp -P ${SFLAGS} ${srcdir}/syscall.s syscall.ss; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss;; \
as -o syscall.o syscall.ss; \
$(RM) syscall.ss; \
;; \
*) \
touch syscall.o ; \
;; \
esac
afssyscalls.o: afssyscalls.c afssyscalls.h

View File

@ -1 +0,0 @@
lsetpag

View File

@ -1,10 +0,0 @@
# Export map for libafssetpag, used on Linux and Solaris to restrict
# exports from the shared libraries to just the public ABI. Add symbol
# versioning while we're at it, just in case.
AFSSETPAG_1.0 {
global:
lsetpag;
local:
*;
};