Add MKSTATICLIBS switch
The MKSTATICLIBS switch, which defaults to yes, controls whether or not static libraries are built and installed. Reported-by: Agostino Sarubbo <ago@autistici.org> x-Gentoo-Bug: 378267 x-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=378267
This commit is contained in:
parent
a5ba2f3264
commit
9a3d6c7600
1
README
1
README
@ -14,6 +14,7 @@ MKPAM=pam
|
|||||||
MKPKGCONFIG=no
|
MKPKGCONFIG=no
|
||||||
MKRCSYS=prefix
|
MKRCSYS=prefix
|
||||||
MKSELINUX=yes
|
MKSELINUX=yes
|
||||||
|
MKSTATICLIBS=no
|
||||||
MKTERMCAP=ncurses
|
MKTERMCAP=ncurses
|
||||||
MKTERMCAP=termcap
|
MKTERMCAP=termcap
|
||||||
PKG_PREFIX=/usr/pkg
|
PKG_PREFIX=/usr/pkg
|
||||||
|
12
mk/lib.mk
12
mk/lib.mk
@ -8,9 +8,15 @@ SHLIB_NAME= lib${LIB}.so.${SHLIB_MAJOR}
|
|||||||
SHLIB_LINK= lib${LIB}.so
|
SHLIB_LINK= lib${LIB}.so
|
||||||
SONAME?= ${SHLIB_NAME}
|
SONAME?= ${SHLIB_NAME}
|
||||||
|
|
||||||
|
SOBJS+= ${SRCS:.c=.So}
|
||||||
|
|
||||||
|
MKSTATICLIBS?= yes
|
||||||
|
ifeq (${MKSTATICLIBS},yes)
|
||||||
OBJS+= ${SRCS:.c=.o}
|
OBJS+= ${SRCS:.c=.o}
|
||||||
SOBJS+= ${OBJS:.o=.So}
|
_LIBS+= lib${LIB}.a
|
||||||
_LIBS= lib${LIB}.a ${SHLIB_NAME}
|
endif
|
||||||
|
|
||||||
|
_LIBS+= ${SHLIB_NAME}
|
||||||
|
|
||||||
CLEANFILES+= ${OBJS} ${SOBJS} ${_LIBS} ${SHLIB_LINK}
|
CLEANFILES+= ${OBJS} ${SOBJS} ${_LIBS} ${SHLIB_LINK}
|
||||||
|
|
||||||
@ -39,8 +45,10 @@ ${SHLIB_NAME}: ${SOBJS}
|
|||||||
${SOBJS} ${LDADD}
|
${SOBJS} ${LDADD}
|
||||||
|
|
||||||
install: all
|
install: all
|
||||||
|
ifeq (${MKSTATICLIBS},yes)
|
||||||
${INSTALL} -d ${DESTDIR}${LIBDIR}
|
${INSTALL} -d ${DESTDIR}${LIBDIR}
|
||||||
${INSTALL} -m ${LIBMODE} lib${LIB}.a ${DESTDIR}${LIBDIR}
|
${INSTALL} -m ${LIBMODE} lib${LIB}.a ${DESTDIR}${LIBDIR}
|
||||||
|
endif
|
||||||
${INSTALL} -d ${DESTDIR}${SHLIBDIR}
|
${INSTALL} -d ${DESTDIR}${SHLIBDIR}
|
||||||
${INSTALL} -m ${LIBMODE} ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}
|
${INSTALL} -m ${LIBMODE} ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}
|
||||||
ln -fs ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}/${SHLIB_LINK}
|
ln -fs ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}/${SHLIB_LINK}
|
||||||
|
Loading…
Reference in New Issue
Block a user