version 1.1.1.2, 1997/03/29 06:27:34 |
version 1.4, 1993/04/04 15:31:38 |
|
|
# @(#)bsd.lib.mk 8.3 (Berkeley) 4/22/94 |
# @(#)bsd.lib.mk 5.26 (Berkeley) 5/2/91 |
|
|
.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 .m4 |
.SUFFIXES: .out .o .po .s .c .f .y .l .8 .7 .6 .5 .4 .3 .2 .1 .0 |
|
|
.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 -man ${.IMPSRC} > ${.TARGET} |
nroff -mandoc ${.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 56 _LIBS=lib${LIB}.a lib${LIB}_p.a |
|
Line 55 _LIBS=lib${LIB}.a lib${LIB}_p.a |
|
_LIBS=lib${LIB}.a |
_LIBS=lib${LIB}.a |
.endif |
.endif |
|
|
all: ${_LIBS} # llib-l${LIB}.ln |
all: ${_LIBS} ${MANALL}# llib-l${LIB}.ln |
.if !defined(NOMAN) |
|
all: ${MANALL} |
|
.endif |
|
|
|
OBJS+= ${SRCS:R:S/$/.o/g} |
OBJS+= ${SRCS:R:S/$/.o/g} |
|
|
Line 81 llib-l${LIB}.ln: ${SRCS} |
|
Line 77 llib-l${LIB}.ln: ${SRCS} |
|
|
|
.if !target(clean) |
.if !target(clean) |
clean: |
clean: |
rm -f ${OBJS} |
rm -f a.out Errs errs mklog core ${CLEANFILES} ${OBJS} ${POBJS} \ |
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 ${OBJS} |
rm -f a.out Errs errs mklog core ${CLEANFILES} ${OBJS} ${POBJS} \ |
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} .depend |
rm -f ${MANALL} ${.CURDIR}/tags .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 |
|
|
|
|
|
|
realinstall: beforeinstall |
realinstall: beforeinstall |
ranlib lib${LIB}.a |
ranlib lib${LIB}.a |
install -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} lib${LIB}.a \ |
install -c -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 -c -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 137 realinstall: beforeinstall |
|
Line 127 realinstall: beforeinstall |
|
.endif |
.endif |
|
|
install: afterinstall |
install: afterinstall |
afterinstall: realinstall |
afterinstall: realinstall maninstall |
.if !defined(NOMAN) |
|
afterinstall: maninstall |
|
.endif |
|
.endif |
.endif |
|
|
.if !target(lint) |
.if !target(lint) |
|
|
|
|
.if !target(tags) |
.if !target(tags) |
tags: ${SRCS} |
tags: ${SRCS} |
-ctags -f /dev/stdout ${.ALLSRC:M*.c} | \ |
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC:M*.c} | \ |
sed "s;\${.CURDIR}/;;" > ${.CURDIR}/tags |
sed "s;\${.CURDIR}/;;" > tags |
.endif |
.endif |
|
|
.include <bsd.man.mk> |
.include <bsd.man.mk> |
|
|
obj: |
obj: |
.else |
.else |
obj: |
obj: |
@cd ${.CURDIR}; rm -rf obj; \ |
@cd ${.CURDIR}; rm -f obj > /dev/null 2>&1 || true; \ |
here=`pwd`; dest=/usr/obj/`echo $$here | sed 's,/usr/src/,,'`; \ |
here=`pwd`; subdir=`echo $$here | sed 's,^/usr/src/,,'`; \ |
echo "$$here -> $$dest"; ln -s $$dest obj; \ |
if test $$here != $$subdir ; then \ |
if test -d /usr/obj -a ! -d $$dest; then \ |
dest=/usr/obj/$$subdir ; \ |
mkdir -p $$dest; \ |
echo "$$here -> $$dest"; ln -s $$dest obj; \ |
|
if test -d /usr/obj -a ! -d $$dest; then \ |
|
mkdir -p $$dest; \ |
|
else \ |
|
true; \ |
|
fi; \ |
else \ |
else \ |
true; \ |
true ; \ |
|
dest=$$here/obj ; \ |
|
echo "making $$here/obj" ; \ |
|
if test ! -d obj ; then \ |
|
mkdir $$here/obj; \ |
|
fi; \ |
fi; |
fi; |
.endif |
.endif |
.endif |
.endif |