bsd.lib.mk (2298) | bsd.lib.mk (2353) |
---|---|
1# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 | 1# from: @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 |
2# $Id: bsd.lib.mk,v 1.4 1994/08/10 02:48:07 wollman Exp $ | 2# $Id: bsd.lib.mk,v 1.5 1994/08/26 18:58:10 wollman Exp $ |
3# 4 5.if exists(${.CURDIR}/../Makefile.inc) 6.include "${.CURDIR}/../Makefile.inc" 7.endif 8 9.if exists(${.CURDIR}/shlib_version) 10SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major 11SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor 12.endif 13 14.if defined(DESTDIR) 15CFLAGS+= -I${DESTDIR}/usr/include 16CXXINCLUDES+= -I${DESTDIR}/usr/include/${CXX} 17.endif | 3# 4 5.if exists(${.CURDIR}/../Makefile.inc) 6.include "${.CURDIR}/../Makefile.inc" 7.endif 8 9.if exists(${.CURDIR}/shlib_version) 10SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major 11SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor 12.endif 13 14.if defined(DESTDIR) 15CFLAGS+= -I${DESTDIR}/usr/include 16CXXINCLUDES+= -I${DESTDIR}/usr/include/${CXX} 17.endif |
18 |
|
18INSTALL?= install 19LIBDIR?= /usr/lib 20LINTLIBDIR?= /usr/libdata/lint 21LIBGRP?= bin 22LIBOWN?= bin 23LIBMODE?= 444 24 25STRIP?= -s --- 107 unchanged lines hidden (view full) --- 133PICFLAG=-fpic 134.endif 135 136all: ${_LIBS} # llib-l${LIB}.ln 137 138OBJS+= ${SRCS:N*.h:R:S/$/.o/g} 139 140lib${LIB}.a:: ${OBJS} | 19INSTALL?= install 20LIBDIR?= /usr/lib 21LINTLIBDIR?= /usr/libdata/lint 22LIBGRP?= bin 23LIBOWN?= bin 24LIBMODE?= 444 25 26STRIP?= -s --- 107 unchanged lines hidden (view full) --- 134PICFLAG=-fpic 135.endif 136 137all: ${_LIBS} # llib-l${LIB}.ln 138 139OBJS+= ${SRCS:N*.h:R:S/$/.o/g} 140 141lib${LIB}.a:: ${OBJS} |
141 @echo building standard ${LIB} library | 142 @${ECHO} building standard ${LIB} library |
142 @rm -f lib${LIB}.a 143 @${AR} cTq lib${LIB}.a `lorder ${OBJS} | tsort` ${ARADD} 144 ${RANLIB} lib${LIB}.a 145 146POBJS+= ${OBJS:.o=.po} 147lib${LIB}_p.a:: ${POBJS} | 143 @rm -f lib${LIB}.a 144 @${AR} cTq lib${LIB}.a `lorder ${OBJS} | tsort` ${ARADD} 145 ${RANLIB} lib${LIB}.a 146 147POBJS+= ${OBJS:.o=.po} 148lib${LIB}_p.a:: ${POBJS} |
148 @echo building profiled ${LIB} library | 149 @${ECHO} building profiled ${LIB} library |
149 @rm -f lib${LIB}_p.a 150 @${AR} cTq lib${LIB}_p.a `lorder ${POBJS} | tsort` ${ARADD} 151 ${RANLIB} lib${LIB}_p.a 152 153.if defined(DESTDIR) 154LDDESTDIR?= -L${DESTDIR}/usr/lib 155.endif 156 157.if defined(CPLUSPLUSLIB) && !make(clean) && !make(cleandir) 158SOBJS+= ${DESTDIR}/usr/lib/c++rt0.o 159.endif 160 161SOBJS+= ${OBJS:.o=.so} 162lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: ${SOBJS} | 150 @rm -f lib${LIB}_p.a 151 @${AR} cTq lib${LIB}_p.a `lorder ${POBJS} | tsort` ${ARADD} 152 ${RANLIB} lib${LIB}_p.a 153 154.if defined(DESTDIR) 155LDDESTDIR?= -L${DESTDIR}/usr/lib 156.endif 157 158.if defined(CPLUSPLUSLIB) && !make(clean) && !make(cleandir) 159SOBJS+= ${DESTDIR}/usr/lib/c++rt0.o 160.endif 161 162SOBJS+= ${OBJS:.o=.so} 163lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: ${SOBJS} |
163 @echo building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\) | 164 @${ECHO} building shared ${LIB} library \(version ${SHLIB_MAJOR}.${SHLIB_MINOR}\) |
164 @rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} | 165 @rm -f lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} |
165 @$(LD) -Bshareable \ | 166 @${LD} -Bshareable \ |
166 -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ 167 ${SOBJS} ${LDDESTDIR} ${LDADD} 168 169lib${LIB}_pic.a:: ${SOBJS} | 167 -o lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} \ 168 ${SOBJS} ${LDDESTDIR} ${LDADD} 169 170lib${LIB}_pic.a:: ${SOBJS} |
170 @echo building special pic ${LIB} library | 171 @${ECHO} building special pic ${LIB} library |
171 @rm -f lib${LIB}_pic.a 172 @${AR} cTq lib${LIB}_pic.a ${SOBJS} ${ARADD} 173 ${RANLIB} lib${LIB}_pic.a 174 175llib-l${LIB}.ln: ${SRCS} 176 ${LINT} -C${LIB} ${CFLAGS} ${.ALLSRC:M*.c} 177 178.if !target(clean) --- 58 unchanged lines hidden (view full) --- 237.endif 238.if defined(LINKS) && !empty(LINKS) 239 @set ${LINKS}; \ 240 while test $$# -ge 2; do \ 241 l=${DESTDIR}$$1; \ 242 shift; \ 243 t=${DESTDIR}$$1; \ 244 shift; \ | 172 @rm -f lib${LIB}_pic.a 173 @${AR} cTq lib${LIB}_pic.a ${SOBJS} ${ARADD} 174 ${RANLIB} lib${LIB}_pic.a 175 176llib-l${LIB}.ln: ${SRCS} 177 ${LINT} -C${LIB} ${CFLAGS} ${.ALLSRC:M*.c} 178 179.if !target(clean) --- 58 unchanged lines hidden (view full) --- 238.endif 239.if defined(LINKS) && !empty(LINKS) 240 @set ${LINKS}; \ 241 while test $$# -ge 2; do \ 242 l=${DESTDIR}$$1; \ 243 shift; \ 244 t=${DESTDIR}$$1; \ 245 shift; \ |
245 echo $$t -\> $$l; \ | 246 ${ECHO} $$t -\> $$l; \ |
246 rm -f $$t; \ 247 ln $$l $$t; \ 248 done; true 249.endif 250 251install: afterinstall 252.if !defined(NOMAN) 253afterinstall: realinstall maninstall --- 20 unchanged lines hidden (view full) --- 274 275.if !target(obj) 276.if defined(NOOBJ) 277obj: 278.else 279obj: 280 @cd ${.CURDIR}; rm -rf obj; \ 281 here=`pwd`; dest=/usr/obj`echo $$here | sed 's,^/usr/src,,'`; \ | 247 rm -f $$t; \ 248 ln $$l $$t; \ 249 done; true 250.endif 251 252install: afterinstall 253.if !defined(NOMAN) 254afterinstall: realinstall maninstall --- 20 unchanged lines hidden (view full) --- 275 276.if !target(obj) 277.if defined(NOOBJ) 278obj: 279.else 280obj: 281 @cd ${.CURDIR}; rm -rf obj; \ 282 here=`pwd`; dest=/usr/obj`echo $$here | sed 's,^/usr/src,,'`; \ |
282 echo "$$here -> $$dest"; ln -s $$dest obj; \ | 283 ${ECHO} "$$here -> $$dest"; ln -s $$dest obj; \ |
283 if test -d /usr/obj -a ! -d $$dest; then \ 284 mkdir -p $$dest; \ 285 else \ 286 true; \ 287 fi; 288.endif 289.endif 290 291.include <bsd.dep.mk> | 284 if test -d /usr/obj -a ! -d $$dest; then \ 285 mkdir -p $$dest; \ 286 else \ 287 true; \ 288 fi; 289.endif 290.endif 291 292.include <bsd.dep.mk> |