version 1.93, 1997/04/17 06:32:23 |
version 1.104, 1997/05/09 13:40:36 |
|
|
.include "${.CURDIR}/../Makefile.inc" |
.include "${.CURDIR}/../Makefile.inc" |
.endif |
.endif |
|
|
.include <bsd.own.mk> # for 'NOPIC' definition |
.include <bsd.own.mk> |
|
|
|
.MAIN: all |
|
.PHONY: cleanlib libinstall |
|
realinstall: libinstall |
|
clean cleandir: cleanlib |
|
|
.if exists(${.CURDIR}/shlib_version) |
.if exists(${.CURDIR}/shlib_version) |
SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major |
SHLIB_MAJOR != . ${.CURDIR}/shlib_version ; echo $$major |
SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor |
SHLIB_MINOR != . ${.CURDIR}/shlib_version ; echo $$minor |
.endif |
.endif |
|
|
.MAIN: all |
# add additional suffixes not exported. |
|
# .po is used for profiling object files. |
# prefer .S to a .c, add .po, remove stuff not used in the BSD libraries. |
# .so is used for PIC object files. |
# .so used for PIC object files. .ln used for lint output files. |
.SUFFIXES: .out .a .ln .so .po .o .c .cc .C .F .f .r .y .l .s .S .cl .p .h .sh .m4 |
.SUFFIXES: |
|
.SUFFIXES: .out .o .po .so .S .s .c .cc .C .f .y .l .ln .m4 |
|
|
|
|
|
# Set PICFLAGS to cc flags for producing position-independent code, |
# Set PICFLAGS to cc flags for producing position-independent code, |
Line 152 _LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHL |
|
Line 155 _LIBS+=lib${LIB}.so.${SHLIB_MAJOR}.${SHL |
|
_LIBS+=llib-l${LIB}.ln |
_LIBS+=llib-l${LIB}.ln |
.endif |
.endif |
|
|
all: ${_LIBS} _SUBDIRUSE |
all: ${SRCS} ${_LIBS} |
|
|
OBJS+= ${SRCS:N*.h:R:S/$/.o/g} |
|
|
|
__archivebuild: .USE |
__archivebuild: .USE |
@rm -f ${.TARGET} |
@rm -f ${.TARGET} |
Line 167 __archiveinstall: .USE |
|
Line 168 __archiveinstall: .USE |
|
${RANLIB} -t ${.TARGET} |
${RANLIB} -t ${.TARGET} |
chmod ${LIBMODE} ${.TARGET} |
chmod ${LIBMODE} ${.TARGET} |
|
|
|
DPSRCS+= ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c} |
|
CLEANFILES+= ${DPSRCS} |
|
|
|
OBJS+= ${SRCS:N*.h:N*.sh:R:S/$/.o/g} |
lib${LIB}.a:: ${OBJS} __archivebuild |
lib${LIB}.a:: ${OBJS} __archivebuild |
@echo building standard ${LIB} library |
@echo building standard ${LIB} library |
|
|
POBJS+= ${OBJS:.o=.po} |
POBJS+= ${OBJS:.o=.po} |
lib${LIB}_p.a:: ${POBJS} __archivebuild |
lib${LIB}_p.a:: ${POBJS} __archivebuild |
@echo building profiled ${LIB} library |
@echo building profiled ${LIB} library |
|
|
SOBJS+= ${OBJS:.o=.so} |
SOBJS+= ${OBJS:.o=.so} |
lib${LIB}_pic.a:: ${SOBJS} __archivebuild |
lib${LIB}_pic.a:: ${SOBJS} __archivebuild |
@echo building shared object ${LIB} library |
@echo building shared object ${LIB} library |
|
|
Line 192 lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINO |
|
Line 197 lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINO |
|
${SHLIB_LDENDFILE} |
${SHLIB_LDENDFILE} |
.endif |
.endif |
|
|
LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} |
LOBJS+= ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln} |
LLIBS?= -lc |
LLIBS?= -lc |
llib-l${LIB}.ln: ${LOBJS} |
llib-l${LIB}.ln: ${LOBJS} |
@echo building llib-l${LIB}.ln |
@echo building llib-l${LIB}.ln |
@rm -f llib-l${LIB}.ln |
@rm -f llib-l${LIB}.ln |
@${LINT} -C${LIB} ${LOBJS} ${LLIBS} |
@${LINT} -C${LIB} ${LOBJS} ${LLIBS} |
|
|
.if !target(clean) |
|
cleanlib: |
cleanlib: |
rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES} |
rm -f a.out [Ee]rrs mklog core *.core ${CLEANFILES} |
rm -f lib${LIB}.a ${OBJS} |
rm -f lib${LIB}.a ${OBJS} |
|
|
rm -f lib${LIB}_pic.a lib${LIB}.so.*.* ${SOBJS} |
rm -f lib${LIB}_pic.a lib${LIB}.so.*.* ${SOBJS} |
rm -f llib-l${LIB}.ln ${LOBJS} |
rm -f llib-l${LIB}.ln ${LOBJS} |
|
|
clean: _SUBDIRUSE cleanlib |
|
cleandir: _SUBDIRUSE cleanlib |
|
.else |
|
cleandir: _SUBDIRUSE clean |
|
.endif |
|
|
|
.if defined(SRCS) |
.if defined(SRCS) |
afterdepend: .depend |
afterdepend: .depend |
@(TMP=/tmp/_depend$$$$; \ |
@(TMP=/tmp/_depend$$$$; \ |
Line 221 afterdepend: .depend |
|
Line 219 afterdepend: .depend |
|
mv $$TMP .depend) |
mv $$TMP .depend) |
.endif |
.endif |
|
|
.if !target(install) |
.if !target(libinstall) |
.if !target(beforeinstall) |
|
beforeinstall: |
|
.endif |
|
|
|
libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a |
libinstall:: ${DESTDIR}${LIBDIR}/lib${LIB}.a |
.if !defined(UPDATE) |
.if !defined(UPDATE) |
.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a |
.PHONY: ${DESTDIR}${LIBDIR}/lib${LIB}.a |
Line 234 libinstall:: ${DESTDIR}${LIBDIR}/lib${LI |
|
Line 228 libinstall:: ${DESTDIR}${LIBDIR}/lib${LI |
|
${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE |
${DESTDIR}${LIBDIR}/lib${LIB}.a: .MADE |
.endif |
.endif |
|
|
|
.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.a |
${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall |
${DESTDIR}${LIBDIR}/lib${LIB}.a: lib${LIB}.a __archiveinstall |
|
|
.if !defined(NOPROFILE) |
.if !defined(NOPROFILE) |
Line 245 libinstall:: ${DESTDIR}${LIBDIR}/lib${LI |
|
Line 240 libinstall:: ${DESTDIR}${LIBDIR}/lib${LI |
|
${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE |
${DESTDIR}${LIBDIR}/lib${LIB}_p.a: .MADE |
.endif |
.endif |
|
|
|
.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_p.a |
${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall |
${DESTDIR}${LIBDIR}/lib${LIB}_p.a: lib${LIB}_p.a __archiveinstall |
.endif |
.endif |
|
|
Line 257 libinstall:: ${DESTDIR}${LIBDIR}/lib${LI |
|
Line 253 libinstall:: ${DESTDIR}${LIBDIR}/lib${LI |
|
${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE |
${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: .MADE |
.endif |
.endif |
|
|
|
.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}_pic.a |
${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall |
${DESTDIR}${LIBDIR}/lib${LIB}_pic.a: lib${LIB}_pic.a __archiveinstall |
.endif |
.endif |
|
|
Line 269 libinstall:: ${DESTDIR}${LIBDIR}/lib${LI |
|
Line 266 libinstall:: ${DESTDIR}${LIBDIR}/lib${LI |
|
${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: .MADE |
${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: .MADE |
.endif |
.endif |
|
|
|
.PRECIOUS: ${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} |
${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} |
${DESTDIR}${LIBDIR}/lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}: lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR} |
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} \ |
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} ${.ALLSRC} \ |
${.TARGET} |
${.TARGET} |
Line 291 libinstall:: ${DESTDIR}${LINTLIBDIR}/lli |
|
Line 289 libinstall:: ${DESTDIR}${LINTLIBDIR}/lli |
|
${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE |
${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: .MADE |
.endif |
.endif |
|
|
${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln llib-l${LIB}.ln |
.PRECIOUS: ${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln |
|
${DESTDIR}${LINTLIBDIR}/llib-l${LIB}.ln: llib-l${LIB}.ln |
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ |
${INSTALL} ${COPY} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ |
llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR} |
llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR} |
.endif |
.endif |
|
|
libinstall:: linksinstall |
|
realinstall: libinstall filesinstall |
|
|
|
install: ${MANINSTALL} _SUBDIRUSE |
|
${MANINSTALL}: afterinstall |
|
afterinstall: realinstall |
|
realinstall: beforeinstall |
|
.endif |
.endif |
|
|
.if !defined(NOMAN) |
.if !defined(NOMAN) |