Make it possible to build libraries as static libraries only.

This commit is contained in:
Jonathan Schleifer 2008-12-23 14:36:26 +01:00
parent 142ae8f527
commit 3cc4402fcc
2 changed files with 48 additions and 6 deletions

View file

@ -150,12 +150,19 @@ ${PROG} ${PROG_NOINST}: ${EXT_DEPS} ${OBJS}
fi
${LIB} ${LIB_NOINST}: ${EXT_DEPS} ${OBJS}
${LINK_STATUS}
if ${LD} -o $@ ${OBJS} ${LIB_LDFLAGS} ${LDFLAGS} ${LIBS}; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
fi
case $@ in \
*.a) \
${MAKE} ${MFLAGS} STATIC_LIB=${LIB} LIB= $@ || exit 1 \
;; \
*) \
${LINK_STATUS}; \
if ${LD} -o $@ ${OBJS} ${LIB_LDFLAGS} ${LDFLAGS} ${LIBS}; then \
${LINK_OK}; \
else \
${LINK_FAILED}; \
fi \
;; \
esac
${PLUGIN} ${PLUGIN_NOINST}: ${EXT_DEPS} ${OBJS}
${LINK_STATUS}