version 1.32, 2001/07/20 19:48:26 |
version 1.33, 2001/07/20 23:02:21 |
|
|
.endif |
.endif |
|
|
.if exists(${.CURDIR}/shlib_version) |
.if exists(${.CURDIR}/shlib_version) |
SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major |
.include "${.CURDIR}/shlib_version" |
SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor |
|
.endif |
.endif |
|
|
.MAIN: all |
.MAIN: all |
|
|
.if (${MACHINE_ARCH} != "mips") |
.if (${MACHINE_ARCH} != "mips") |
_LIBS+=lib${LIB}_pic.a |
_LIBS+=lib${LIB}_pic.a |
.endif |
.endif |
.if defined(SHLIB_MAJOR) && defined(SHLIB_MINOR) |
.if defined(major) && defined(minor) |
_LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} |
_LIBS+=lib${LIB}.so.${major}.${minor} |
.endif |
.endif |
.endif |
.endif |
|
|
|
|
@${AR} cq lib${LIB}_pic.a `${LORDER} ${SOBJS} | tsort -q` |
@${AR} cq lib${LIB}_pic.a `${LORDER} ${SOBJS} | tsort -q` |
${RANLIB} lib${LIB}_pic.a |
${RANLIB} lib${LIB}_pic.a |
|
|
.if (${MACHINE_ARCH} == "mips") |
lib${LIB}.so.${major}.${minor}: ${SOBJS} ${DPADD} |
lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: ${OBJS} ${DPADD} |
@echo building shared ${LIB} library \(version ${major}.${minor}\) |
@echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\) |
@rm -f lib${LIB}.so.${major}.${minor} |
@rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} |
|
${CC} -shared ${PICFLAG} -Wl,-soname,lib${LIB}.so.${SHLIB_MAJOR} \ |
|
-o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ |
|
`${LORDER} ${OBJS}|tsort -q` ${LDADD} |
|
.else |
|
lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: ${SOBJS} ${DPADD} |
|
@echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\) |
|
@rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} |
|
${CC} -shared ${PICFLAG} \ |
${CC} -shared ${PICFLAG} \ |
-o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ |
-o lib${LIB}.so.${major}.${minor} \ |
`${LORDER} ${SOBJS}|tsort -q` ${LDADD} |
`${LORDER} ${SOBJS}|tsort -q` ${LDADD} |
.endif |
|
|
|
LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} |
LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} |
# the following looks XXX to me... -- cgd |
# the following looks XXX to me... -- cgd |
|
|
.endif |
.endif |
chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a |
chmod ${LIBMODE} ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a |
.endif |
.endif |
.if !defined(NOPIC) && defined(SHLIB_MAJOR) && defined(SHLIB_MINOR) |
.if !defined(NOPIC) && defined(major) && defined(minor) |
${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ |
${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ |
lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} ${DESTDIR}${LIBDIR} |
lib${LIB}.so.${major}.${minor} ${DESTDIR}${LIBDIR} |
.endif |
.endif |
.if !defined(NOLINT) |
.if !defined(NOLINT) |
${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ |
${INSTALL} ${INSTALL_COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ |
llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR} |
llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR} |
.endif |
.endif |
.if defined(LINKS) && !empty(LINKS) |
.if defined(LINKS) && !empty(LINKS) |
@set ${LINKS}; \ |
. for lnk file in ${LINKS} |
while test $$# -ge 2; do \ |
@l=${DESTDIR}${lnk}; \ |
l=${DESTDIR}$$1; \ |
t=${DESTDIR}${file}; \ |
shift; \ |
echo $$t -\> $$l; \ |
t=${DESTDIR}$$1; \ |
rm -f $$t; ln $$l $$t |
shift; \ |
. endfor |
echo $$t -\> $$l; \ |
|
rm -f $$t; \ |
|
ln $$l $$t; \ |
|
done; true |
|
.endif |
.endif |
|
|
install: maninstall _SUBDIRUSE |
install: maninstall _SUBDIRUSE |