version 1.1.1.1, 1993/03/21 09:45:37 |
version 1.1.1.2, 1997/03/29 06:27:32 |
|
|
# @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91 |
# @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94 |
|
|
.if exists(${.CURDIR}/../Makefile.inc) |
.if !defined(NOINCLUDE) && exists(${.CURDIR}/../Makefile.inc) |
.include "${.CURDIR}/../Makefile.inc" |
.include "${.CURDIR}/../Makefile.inc" |
.endif |
.endif |
|
|
.SUFFIXES: .out .o .c .y .l .s .8 .7 .6 .5 .4 .3 .2 .1 .0 |
.SUFFIXES: .out .o .c .y .l .s .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 -mandoc ${.IMPSRC} > ${.TARGET} |
nroff -man ${.IMPSRC} > ${.TARGET} |
|
|
CFLAGS+=${COPTS} |
CFLAGS+=${COPTS} |
|
|
Line 25 LIBDES?= /usr/lib/libdes.a |
|
Line 25 LIBDES?= /usr/lib/libdes.a |
|
LIBL?= /usr/lib/libl.a |
LIBL?= /usr/lib/libl.a |
LIBKDB?= /usr/lib/libkdb.a |
LIBKDB?= /usr/lib/libkdb.a |
LIBKRB?= /usr/lib/libkrb.a |
LIBKRB?= /usr/lib/libkrb.a |
|
LIBKVM?= /usr/lib/libkvm.a |
LIBM?= /usr/lib/libm.a |
LIBM?= /usr/lib/libm.a |
LIBMP?= /usr/lib/libmp.a |
LIBMP?= /usr/lib/libmp.a |
LIBPC?= /usr/lib/libpc.a |
LIBPC?= /usr/lib/libpc.a |
Line 50 OBJS+= ${SRCS:R:S/$/.o/g} |
|
Line 51 OBJS+= ${SRCS:R:S/$/.o/g} |
|
${PROG}: ${OBJS} ${LIBC} ${DPADD} |
${PROG}: ${OBJS} ${LIBC} ${DPADD} |
${CC} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} |
${CC} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD} |
|
|
.else defined(PROG) |
.else defined(SRCS) |
|
|
SRCS= ${PROG}.c |
SRCS= ${PROG}.c |
|
|
|
|
MAN1= ${PROG}.0 |
MAN1= ${PROG}.0 |
.endif |
.endif |
.endif |
.endif |
|
.if !defined(NOMAN) |
MANALL= ${MAN1} ${MAN2} ${MAN3} ${MAN4} ${MAN5} ${MAN6} ${MAN7} ${MAN8} |
MANALL= ${MAN1} ${MAN2} ${MAN3} ${MAN4} ${MAN5} ${MAN6} ${MAN7} ${MAN8} |
|
.else |
|
MANALL= |
|
.endif |
|
manpages: ${MANALL} |
|
|
_PROGSUBDIR: .USE |
_PROGSUBDIR: .USE |
.if defined(SUBDIR) && !empty(SUBDIR) |
.if defined(SUBDIR) && !empty(SUBDIR) |
Line 82 _PROGSUBDIR: .USE |
|
Line 88 _PROGSUBDIR: .USE |
|
done |
done |
.endif |
.endif |
|
|
|
.if !target(all) |
.MAIN: all |
.MAIN: all |
all: ${PROG} ${MANALL} _PROGSUBDIR |
all: ${PROG} ${MANALL} _PROGSUBDIR |
|
.endif |
|
|
.if !target(clean) |
.if !target(clean) |
clean: _PROGSUBDIR |
clean: _PROGSUBDIR |
rm -f a.out [Ee]rrs mklog core ${PROG} ${OBJS} ${CLEANFILES} |
rm -f a.out [Ee]rrs mklog ${PROG}.core ${PROG} ${OBJS} ${CLEANFILES} |
.endif |
.endif |
|
|
.if !target(cleandir) |
.if !target(cleandir) |
cleandir: _PROGSUBDIR |
cleandir: _PROGSUBDIR |
rm -f a.out [Ee]rrs mklog core ${PROG} ${OBJS} ${CLEANFILES} |
rm -f a.out [Ee]rrs mklog ${PROG}.core ${PROG} ${OBJS} ${CLEANFILES} |
rm -f .depend ${MANALL} |
rm -f .depend ${MANALL} |
.endif |
.endif |
|
|
|
|
realinstall: _PROGSUBDIR |
realinstall: _PROGSUBDIR |
.if defined(PROG) |
.if defined(PROG) |
install ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ |
install ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \ |
${PROG} ${DESTDIR}${BINDIR} |
${INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR} |
.endif |
.endif |
.if defined(HIDEGAME) |
.if defined(HIDEGAME) |
(cd ${DESTDIR}/usr/games; rm -f ${PROG}; ln -s dm ${PROG}; \ |
(cd ${DESTDIR}/usr/games; rm -f ${PROG}; ln -s dm ${PROG}; \ |
Line 135 realinstall: _PROGSUBDIR |
|
Line 143 realinstall: _PROGSUBDIR |
|
done; true |
done; true |
.endif |
.endif |
|
|
install: maninstall |
install: afterinstall maninstall |
maninstall: afterinstall |
|
afterinstall: realinstall |
afterinstall: realinstall |
realinstall: beforeinstall |
realinstall: beforeinstall |
.endif |
.endif |
Line 164 obj: _PROGSUBDIR |
|
Line 171 obj: _PROGSUBDIR |
|
.endif |
.endif |
.endif |
.endif |
|
|
|
.if !target(objdir) |
|
.if defined(NOOBJ) |
|
objdir: _PROGSUBDIR |
|
.else |
|
objdir: _PROGSUBDIR |
|
@cd ${.CURDIR}; \ |
|
here=`pwd`; dest=/usr/obj/`echo $$here | sed 's,/usr/src/,,'`; \ |
|
if test -d /usr/obj -a ! -d $$dest; then \ |
|
mkdir -p $$dest; \ |
|
else \ |
|
true; \ |
|
fi; |
|
.endif |
|
.endif |
|
|
.if !target(tags) |
.if !target(tags) |
tags: ${SRCS} _PROGSUBDIR |
tags: ${SRCS} _PROGSUBDIR |
.if defined(PROG) |
.if defined(PROG) |
-cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC} | \ |
-ctags -f /dev/stdout ${.ALLSRC} | \ |
sed "s;\${.CURDIR}/;;" > tags |
sed "s;${.CURDIR}/;;" > ${.CURDIR}/tags |
.endif |
.endif |
.endif |
.endif |
|
|
.if !defined(NOMAN) |
.if !defined(NOMAN) |
.include <bsd.man.mk> |
.include <bsd.man.mk> |
|
.else |
|
maninstall: |
.endif |
.endif |