| version 1.1.1.1, 1993/03/21 09:45:37 |
version 1.1.1.2, 1997/03/29 06:27:34 |
|
|
| # @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 |
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 |
| |
|
| .if exists(${.CURDIR}/../Makefile.inc) |
.if exists(${.CURDIR}/../Makefile.inc) |
| .include "${.CURDIR}/../Makefile.inc" |
.include "${.CURDIR}/../Makefile.inc" |
|
|
| |
|
| # prefer .s to a .c, add .po, remove stuff not used in the BSD libraries |
# prefer .s to a .c, add .po, remove stuff not used in the BSD libraries |
| .SUFFIXES: |
.SUFFIXES: |
| .SUFFIXES: .out .o .po .s .c .f .y .l .8 .7 .6 .5 .4 .3 .2 .1 .0 |
.SUFFIXES: .out .o .po .s .c .f .y .l .8 .7 .6 .5 .4 .3 .2 .1 .0 .m4 |
| |
|
| .8.0 .7.0 .6.0 .5.0 .4.0 .3.0 .2.0 .1.0: |
.8.0 .7.0 .6.0 .5.0 .4.0 .3.0 .2.0 .1.0: |
| nroff -mandoc ${.IMPSRC} > ${.TARGET} |
nroff -man ${.IMPSRC} > ${.TARGET} |
| |
|
| .c.o: |
.c.o: |
| ${CC} ${CFLAGS} -c ${.IMPSRC} |
${CC} ${CFLAGS} -c ${.IMPSRC} |
|
|
| @mv a.out ${.TARGET} |
@mv a.out ${.TARGET} |
| |
|
| MANALL= ${MAN1} ${MAN2} ${MAN3} ${MAN4} ${MAN5} ${MAN6} ${MAN7} ${MAN8} |
MANALL= ${MAN1} ${MAN2} ${MAN3} ${MAN4} ${MAN5} ${MAN6} ${MAN7} ${MAN8} |
| |
manpages: ${MANALL} |
| |
|
| .if !defined(NOPROFILE) |
.if !defined(NOPROFILE) |
| _LIBS=lib${LIB}.a lib${LIB}_p.a |
_LIBS=lib${LIB}.a lib${LIB}_p.a |
| Line 55 _LIBS=lib${LIB}.a lib${LIB}_p.a |
|
| Line 56 _LIBS=lib${LIB}.a lib${LIB}_p.a |
|
| _LIBS=lib${LIB}.a |
_LIBS=lib${LIB}.a |
| .endif |
.endif |
| |
|
| all: ${_LIBS} ${MANALL}# llib-l${LIB}.ln |
all: ${_LIBS} # llib-l${LIB}.ln |
| |
.if !defined(NOMAN) |
| |
all: ${MANALL} |
| |
.endif |
| |
|
| OBJS+= ${SRCS:R:S/$/.o/g} |
OBJS+= ${SRCS:R:S/$/.o/g} |
| |
|
| Line 77 llib-l${LIB}.ln: ${SRCS} |
|
| Line 81 llib-l${LIB}.ln: ${SRCS} |
|
| |
|
| .if !target(clean) |
.if !target(clean) |
| clean: |
clean: |
| rm -f a.out Errs errs mklog core ${CLEANFILES} ${OBJS} ${POBJS} \ |
rm -f ${OBJS} |
| |
rm -f ${POBJS} |
| |
rm -f a.out [Ee]rrs mklog ${CLEANFILES} \ |
| profiled/*.o lib${LIB}.a lib${LIB}_p.a llib-l${LIB}.ln |
profiled/*.o lib${LIB}.a lib${LIB}_p.a llib-l${LIB}.ln |
| .endif |
.endif |
| |
|
| .if !target(cleandir) |
.if !target(cleandir) |
| cleandir: |
cleandir: |
| rm -f a.out Errs errs mklog core ${CLEANFILES} ${OBJS} ${POBJS} \ |
rm -f ${OBJS} |
| |
rm -f ${POBJS} |
| |
rm -f a.out [Ee]rrs mklog ${CLEANFILES} \ |
| profiled/*.o lib${LIB}.a lib${LIB}_p.a llib-l${LIB}.ln |
profiled/*.o lib${LIB}.a lib${LIB}_p.a llib-l${LIB}.ln |
| rm -f ${MANALL} ${.CURDIR}/tags .depend |
rm -f ${MANALL} .depend |
| .endif |
.endif |
| |
|
| .if !target(depend) |
.if !target(depend) |
|
|
| .depend: ${SRCS} |
.depend: ${SRCS} |
| mkdep ${CFLAGS:M-[ID]*} ${AINC} ${.ALLSRC} |
mkdep ${CFLAGS:M-[ID]*} ${AINC} ${.ALLSRC} |
| @(TMP=/tmp/_depend$$$$; \ |
@(TMP=/tmp/_depend$$$$; \ |
| sed -e 's/^\([^\.]*\).o:/\1.o \1.po:/' < .depend > $$TMP; \ |
sed -e 's/^\([^\.]*\).o *:/\1.o \1.po:/' < .depend > $$TMP; \ |
| mv $$TMP .depend) |
mv $$TMP .depend) |
| .endif |
.endif |
| |
|
| Line 107 realinstall: beforeinstall |
|
| Line 115 realinstall: beforeinstall |
|
| install -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} lib${LIB}.a \ |
install -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} lib${LIB}.a \ |
| ${DESTDIR}${LIBDIR} |
${DESTDIR}${LIBDIR} |
| ${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}.a |
${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}.a |
| |
.if !defined(NOPROFILE) |
| ranlib lib${LIB}_p.a |
ranlib lib${LIB}_p.a |
| install -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ |
install -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ |
| lib${LIB}_p.a ${DESTDIR}${LIBDIR} |
lib${LIB}_p.a ${DESTDIR}${LIBDIR} |
| ${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}_p.a |
${RANLIB} -t ${DESTDIR}${LIBDIR}/lib${LIB}_p.a |
| |
.endif |
| # install -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ |
# install -c -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ |
| # llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR} |
# llib-l${LIB}.ln ${DESTDIR}${LINTLIBDIR} |
| .if defined(LINKS) && !empty(LINKS) |
.if defined(LINKS) && !empty(LINKS) |
| Line 127 realinstall: beforeinstall |
|
| Line 137 realinstall: beforeinstall |
|
| .endif |
.endif |
| |
|
| install: afterinstall |
install: afterinstall |
| afterinstall: realinstall maninstall |
afterinstall: realinstall |
| |
.if !defined(NOMAN) |
| |
afterinstall: maninstall |
| |
.endif |
| .endif |
.endif |
| |
|
| .if !target(lint) |
.if !target(lint) |
|
|
| |
|
| .if !target(tags) |
.if !target(tags) |
| tags: ${SRCS} |
tags: ${SRCS} |
| -cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:M*.c} | \ |
-ctags -f /dev/stdout ${.ALLSRC:M*.c} | \ |
| sed "s;\${.CURDIR}/;;" > tags |
sed "s;\${.CURDIR}/;;" > ${.CURDIR}/tags |
| .endif |
.endif |
| |
|
| .include <bsd.man.mk> |
.include <bsd.man.mk> |