diff --git a/src/.gitignore b/src/.gitignore index f0308601..f04dfe20 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -3,6 +3,7 @@ rc *.[oa] *.lo *.so +*.So *.so.* version.h diff --git a/src/lib.mk b/src/lib.mk index 947492c1..f98e25ce 100644 --- a/src/lib.mk +++ b/src/lib.mk @@ -30,11 +30,15 @@ INCMODE?= 0444 all: ${_LIBS} + + lib${LIB}.a: ${OBJS} ${STATICOBJS} @${ECHO} building static library $@ ${AR} rc $@ $^ ${RANLIB} $@ +${SHLIB_NAME}: ${VERSION_MAP} +LDFLAGS+= -Wl,--version-script=${VERSION_MAP} ${SHLIB_NAME}: ${SOBJS} @${ECHO} building shared library $@ diff --git a/src/libeinfo/Makefile b/src/libeinfo/Makefile index b6826340..5cace0cc 100644 --- a/src/libeinfo/Makefile +++ b/src/libeinfo/Makefile @@ -5,10 +5,10 @@ LIB= einfo SHLIB_MAJOR= 1 SRCS= libeinfo.c INCS= einfo.h +VERSION_MAP= einfo.map SHLIBDIR= /${LIBNAME} include $(TOPDIR)/cc.mk include $(TOPDIR)/lib.mk include $(TOPDIR)/$(TERMCAP).mk - diff --git a/src/librc/Makefile b/src/librc/Makefile index d5ec7df8..722f4a31 100644 --- a/src/librc/Makefile +++ b/src/librc/Makefile @@ -5,6 +5,7 @@ LIB= rc SHLIB_MAJOR= 1 SRCS= librc.c librc-daemon.c librc-depend.c librc-misc.c librc-strlist.c INCS= rc.h +VERSION_MAP= rc.map CPPFLAGS+= -DLIB=\"${LIBNAME}\" LDADD+= ${LIBKVM} diff --git a/src/rc/rc.map b/src/librc/rc.map similarity index 100% rename from src/rc/rc.map rename to src/librc/rc.map