Deleted Added
full compact
bsd.lib.mk (155264) bsd.lib.mk (156772)
1# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
1# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91
2# $FreeBSD: head/share/mk/bsd.lib.mk 155264 2006-02-03 16:50:32Z ru $
2# $FreeBSD: head/share/mk/bsd.lib.mk 156772 2006-03-16 15:12:26Z deischen $
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.

--- 83 unchanged lines hidden (view full) ---

94.S.po:
95 ${CC} -DPROF ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
96
97.S.So:
98 ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
99
100all: objwarn
101
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.

--- 83 unchanged lines hidden (view full) ---

94.S.po:
95 ${CC} -DPROF ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
96
97.S.So:
98 ${CC} ${PICFLAG} -DPIC ${CFLAGS} -c ${.IMPSRC} -o ${.TARGET}
99
100all: objwarn
101
102# Generate the version map given the version definitions
103# and symbol maps.
104.if !empty(VERSION_DEF) && !empty(SYMBOL_MAPS)
105# Find the awk script that generates the version map.
106VERSION_GEN?= version_gen.awk
107VERSION_MAP?= Version.map
108
109# Compute the make's -m path.
110_mpath=
111_oarg=
112.for _arg in ${.MAKEFLAGS}
113.if ${_oarg} == "-m"
114_mpath+= ${_arg}
115.endif
116_oarg= ${_arg}
117.endfor
118_mpath+= /usr/share/mk
119
120# Look up ${VERSION_GEN} in ${_mpath}.
121_vgen=
122.for path in ${_mpath}
123.if empty(_vgen)
124.if exists(${path}/${VERSION_GEN})
125_vgen= ${path}/${VERSION_GEN}
126.endif
127.endif
128.endfor
129
130${VERSION_MAP}:
131 awk -v vfile=${VERSION_DEF} -f ${_vgen} ${SYMBOL_MAPS} \
132 > ${.TARGET}
133.endif # !empty(VERSION_DEF) && !empty(SYMBOL_MAPS)
134
135# Allow librararies to specify their own version map or have it
136# automatically generated (see above).
137.if !empty(VERSION_MAP)
138${SHLIB_NAME}: ${VERSION_MAP}
139LDFLAGS+= -Wl,--version-script=${VERSION_MAP}
140.endif
141
102.if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME)
103OBJS+= ${SRCS:N*.h:R:S/$/.o/}
104.endif
105
106.if defined(LIB) && !empty(LIB)
107_LIBS= lib${LIB}.a
108
109lib${LIB}.a: ${OBJS} ${STATICOBJS}

--- 213 unchanged lines hidden ---
142.if defined(LIB) && !empty(LIB) || defined(SHLIB_NAME)
143OBJS+= ${SRCS:N*.h:R:S/$/.o/}
144.endif
145
146.if defined(LIB) && !empty(LIB)
147_LIBS= lib${LIB}.a
148
149lib${LIB}.a: ${OBJS} ${STATICOBJS}

--- 213 unchanged lines hidden ---