1# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
2# $FreeBSD: head/share/mk/bsd.lib.mk 156813 2006-03-17 18:54:44Z ru $
3#
4
5.include <bsd.init.mk>
6
7# Set up the variables controlling shared libraries. After this section,
8# SHLIB_NAME will be defined only if we are to create a shared library.
9# SHLIB_LINK will be defined only if we are to create a link to it.
10# INSTALL_PIC_ARCHIVE will be defined only if we are to create a PIC archive.
--- 139 unchanged lines hidden (view full) ---
150 @${ECHO} building static ${LIB} library
151 @rm -f ${.TARGET}
152 @${AR} cq ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
153 ${RANLIB} ${.TARGET}
154.endif
155
156.if !defined(INTERNALLIB)
157
158.if !defined(NO_PROFILE) && defined(LIB) && !empty(LIB)
159_LIBS+= lib${LIB}_p.a
160POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o=.po}
161
162lib${LIB}_p.a: ${POBJS}
163 @${ECHO} building profiled ${LIB} library
164 @rm -f ${.TARGET}
165 @${AR} cq ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD}
166 ${RANLIB} ${.TARGET}
--- 79 unchanged lines hidden (view full) ---
246.if !defined(INTERNALLIB)
247realinstall: _libinstall
248.ORDER: beforeinstall _libinstall
249_libinstall:
250.if defined(LIB) && !empty(LIB) && !defined(NO_INSTALLLIB)
251 ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
252 ${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${LIBDIR}
253.endif
254.if !defined(NO_PROFILE) && defined(LIB) && !empty(LIB)
255 ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
256 ${_INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${LIBDIR}
257.endif
258.if defined(SHLIB_NAME)
259 ${INSTALL} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
260 ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
261 ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}
262.if defined(SHLIB_LINK)
--- 62 unchanged lines hidden (view full) ---
325clean:
326.if defined(CLEANFILES) && !empty(CLEANFILES)
327 rm -f ${CLEANFILES}
328.endif
329.if defined(LIB) && !empty(LIB)
330 rm -f a.out ${OBJS} ${OBJS:S/$/.tmp/} ${STATICOBJS}
331.endif
332.if !defined(INTERNALLIB)
333.if !defined(NO_PROFILE) && defined(LIB) && !empty(LIB)
334 rm -f ${POBJS} ${POBJS:S/$/.tmp/}
335.endif
336.if defined(SHLIB_NAME) || \
337 defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
338 rm -f ${SOBJS} ${SOBJS:.So=.so} ${SOBJS:S/$/.tmp/}
339.endif
340.if defined(SHLIB_NAME)
341.if defined(SHLIB_LINK)
--- 21 unchanged lines hidden ---
2# $FreeBSD: head/share/mk/bsd.lib.mk 156813 2006-03-17 18:54:44Z ru $
3#
4
5.include <bsd.init.mk>
6
7# Set up the variables controlling shared libraries. After this section,
8# SHLIB_NAME will be defined only if we are to create a shared library.
9# SHLIB_LINK will be defined only if we are to create a link to it.
10# INSTALL_PIC_ARCHIVE will be defined only if we are to create a PIC archive.
--- 139 unchanged lines hidden (view full) ---
150 @${ECHO} building static ${LIB} library
151 @rm -f ${.TARGET}
152 @${AR} cq ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
153 ${RANLIB} ${.TARGET}
154.endif
155
156.if !defined(INTERNALLIB)
157
158.if !defined(NO_PROFILE) && defined(LIB) && !empty(LIB)
159_LIBS+= lib${LIB}_p.a
160POBJS+= ${OBJS:.o=.po} ${STATICOBJS:.o=.po}
161
162lib${LIB}_p.a: ${POBJS}
163 @${ECHO} building profiled ${LIB} library
164 @rm -f ${.TARGET}
165 @${AR} cq ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD}
166 ${RANLIB} ${.TARGET}
--- 79 unchanged lines hidden (view full) ---
246.if !defined(INTERNALLIB)
247realinstall: _libinstall
248.ORDER: beforeinstall _libinstall
249_libinstall:
250.if defined(LIB) && !empty(LIB) && !defined(NO_INSTALLLIB)
251 ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
252 ${_INSTALLFLAGS} lib${LIB}.a ${DESTDIR}${LIBDIR}
253.endif
254.if !defined(NO_PROFILE) && defined(LIB) && !empty(LIB)
255 ${INSTALL} -C -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
256 ${_INSTALLFLAGS} lib${LIB}_p.a ${DESTDIR}${LIBDIR}
257.endif
258.if defined(SHLIB_NAME)
259 ${INSTALL} ${STRIP} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \
260 ${_INSTALLFLAGS} ${_SHLINSTALLFLAGS} \
261 ${SHLIB_NAME} ${DESTDIR}${SHLIBDIR}
262.if defined(SHLIB_LINK)
--- 62 unchanged lines hidden (view full) ---
325clean:
326.if defined(CLEANFILES) && !empty(CLEANFILES)
327 rm -f ${CLEANFILES}
328.endif
329.if defined(LIB) && !empty(LIB)
330 rm -f a.out ${OBJS} ${OBJS:S/$/.tmp/} ${STATICOBJS}
331.endif
332.if !defined(INTERNALLIB)
333.if !defined(NO_PROFILE) && defined(LIB) && !empty(LIB)
334 rm -f ${POBJS} ${POBJS:S/$/.tmp/}
335.endif
336.if defined(SHLIB_NAME) || \
337 defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
338 rm -f ${SOBJS} ${SOBJS:.So=.so} ${SOBJS:S/$/.tmp/}
339.endif
340.if defined(SHLIB_NAME)
341.if defined(SHLIB_LINK)
--- 21 unchanged lines hidden ---