Index: bsd.lib.mk =================================================================== --- bsd.lib.mk (revision 275122) +++ bsd.lib.mk (working copy) @@ -164,7 +164,7 @@ NOPATH_FILES+= ${OBJS} .endif -.if defined(LIB) && !empty(LIB) +.if defined(LIB) && !empty(LIB) && !defined(INTERNALPICLIB) _LIBS= lib${LIB}.a lib${LIB}.a: ${OBJS} ${STATICOBJS} @@ -180,12 +180,12 @@ .if !defined(INTERNALLIB) -.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) -_LIBS+= lib${LIB}_p.a +.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) && !defined(INTERNALPICLIB) +_LIBS+= lib${LIB}${LIBPIC}_p.a POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o=.po} NOPATH_FILES+= ${POBJS} -lib${LIB}_p.a: ${POBJS} +lib${LIB}${LIBPIC}_p.a: ${POBJS} @${ECHO} building profiled ${LIB} library @rm -f ${.TARGET} .if !defined(NM) @@ -197,12 +197,13 @@ .endif .if defined(SHLIB_NAME) || \ - defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) + defined(INSTALL_PIC_ARCHIVE) || \ + defined(INTERNALPICLIB) && defined(LIB) && !empty(LIB) SOBJS+= ${OBJS:.o=.So} NOPATH_FILES+= ${SOBJS} .endif -.if defined(SHLIB_NAME) +.if defined(SHLIB_NAME) && !defined(INTERNALPICLIB) _LIBS+= ${SHLIB_NAME} SOLINKOPTS= -shared -Wl,-x @@ -244,7 +245,8 @@ .endif .endif #defined(SHLIB_NAME) -.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" +.if defined(INSTALL_PIC_ARCHIVE) || defined(INTERNALPICLIB) && \ + defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" _LIBS+= lib${LIB}_pic.a lib${LIB}_pic.a: ${SOBJS} @@ -429,11 +431,12 @@ rm -f a.out ${OBJS} ${OBJS:S/$/.tmp/} ${STATICOBJS} .endif .if !defined(INTERNALLIB) -.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) +.if ${MK_PROFILE} != "no" && defined(LIB) && !empty(LIB) && !defined(INTERNALPICLIB) rm -f ${POBJS} ${POBJS:S/$/.tmp/} .endif .if defined(SHLIB_NAME) || \ - defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) + defined(INSTALL_PIC_ARCHIVE) || \ + defined(INTERNALPICLIB) && defined(LIB) && !empty(LIB) rm -f ${SOBJS} ${SOBJS:.So=.so} ${SOBJS:S/$/.tmp/} .endif .if defined(SHLIB_NAME)