Deleted Added
full compact
1c1,2
< # @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
---
> # from: @(#)bsd.prog.mk 5.26 (Berkeley) 6/25/91
> # $Id: bsd.prog.mk,v 1.28 1994/06/15 10:14:41 ache Exp $
3c4
< .if !defined(NOINCLUDE) && exists(${.CURDIR}/../Makefile.inc)
---
> .if exists(${.CURDIR}/../Makefile.inc)
7c8
< .SUFFIXES: .out .o .c .y .l .s .8 .7 .6 .5 .4 .3 .2 .1 .0
---
> .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S
9,11d9
< .8.0 .7.0 .6.0 .5.0 .4.0 .3.0 .2.0 .1.0:
< nroff -man ${.IMPSRC} > ${.TARGET}
<
12a11,14
> .if defined(DESTDIR)
> CFLAGS+= -I${DESTDIR}/usr/include
> CXXINCLUDES+= -I${DESTDIR}/usr/include/${CXX}
> .endif
19a22,24
> INSTALL?= install
> .if !defined(DESTDIR)
> LIBCRT0?= /usr/lib/crt0.o
21a27
> LIBCRYPT?= /usr/lib/libcrypt.a
24a31,32
> LIBGNUMALLOC?= /usr/lib/libgnumalloc.a
> LIBGNUREGEX?= /usr/lib/libgnuregex.a
28d35
< LIBKVM?= /usr/lib/libkvm.a
32a40
> LIBREADLINE?= /usr/lib/libreadline.a
34,35c42,45
< LIBRPC?= /usr/lib/sunrpc.a
< LIBTERM?= /usr/lib/libterm.a
---
> LIBRPCSVC?= /usr/lib/librpcsvc.a
> LIBSKEY?= /usr/lib/libskey.a
> LIBTELNET?= /usr/lib/libtelnet.a
> LIBTERM?= /usr/lib/libtermcap.a
36a47,74
> .else
> LIBCRT0?= ${DESTDIR}/usr/lib/crt0.o
> LIBC?= ${DESTDIR}/usr/lib/libc.a
> LIBCOMPAT?= ${DESTDIR}/usr/lib/libcompat.a
> LIBCRYPT?= ${DESTDIR}/usr/lib/libcrypt.a
> LIBCURSES?= ${DESTDIR}/usr/lib/libcurses.a
> LIBDBM?= ${DESTDIR}/usr/lib/libdbm.a
> LIBDES?= ${DESTDIR}/usr/lib/libdes.a
> LIBGNUMALLOC?= ${DESTDIR}/usr/lib/libgnumalloc.a
> LIBGNUREGEX?= ${DESTDIR}/usr/lib/libgnuregex.a
> LIBL?= ${DESTDIR}/usr/lib/libl.a
> LIBKDB?= ${DESTDIR}/usr/lib/libkdb.a
> LIBKRB?= ${DESTDIR}/usr/lib/libkrb.a
> LIBM?= ${DESTDIR}/usr/lib/libm.a
> LIBMP?= ${DESTDIR}/usr/lib/libmp.a
> LIBPC?= ${DESTDIR}/usr/lib/libpc.a
> LIBPLOT?= ${DESTDIR}/usr/lib/libplot.a
> LIBREADLINE?= ${DESTDIR}/usr/lib/libreadline.a
> LIBRESOLV?= ${DESTDIR}/usr/lib/libresolv.a
> LIBRPCSVC?= ${DESTDIR}/usr/lib/librpcsvc.a
> LIBSKEY?= ${DESTDIR}/usr/lib/libskey.a
> LIBTELNET?= ${DESTDIR}/usr/lib/libtelnet.a
> LIBTERM?= ${DESTDIR}/usr/lib/libtermcap.a
> LIBUTIL?= ${DESTDIR}/usr/lib/libutil.a
> .endif
> .if defined(NOSHARED)
> LDFLAGS+= -static
> .endif
43a82,87
>
> .cc.o .cxx.o .C.o:
> ${CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c -
> @mv -f x.c x.cc
> @${CXX} ${CXXFLAGS} -c x.cc -o ${.TARGET}
>
45a90,93
> .if defined(DESTDIR)
> LDDESTDIR?= -L${DESTDIR}/usr/lib
> .endif
>
49c97,98
< OBJS+= ${SRCS:R:S/$/.o/g}
---
> DPSRCS+= ${SRCS:M*.h}
> OBJS+= ${SRCS:N*.h:R:S/$/.o/g}
51,52c100
< ${PROG}: ${OBJS} ${LIBC} ${DPADD}
< ${CC} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDADD}
---
> .if defined(LDONLY)
54c102,104
< .else defined(SRCS)
---
> ${PROG}: ${LIBCRT0} ${LIBC} ${DPSRCS} ${OBJS} ${DPADD}
> ${LD} ${LDFLAGS} -o ${.TARGET} ${LIBCRT0} ${OBJS} ${LIBC} ${LDDESTDR} \
> ${LDADD}
55a106,114
> .else defined(LDONLY)
>
> ${PROG}: ${DPSRCS} ${OBJS} ${LIBC} ${DPADD}
> ${CC} ${CFLAGS} ${LDFLAGS} -o ${.TARGET} ${OBJS} ${LDDESTDIR} ${LDADD}
>
> .endif
>
> .else defined(PROG)
>
58,59c117,119
< ${PROG}: ${SRCS} ${LIBC} ${DPADD}
< ${CC} ${CFLAGS} -o ${.TARGET} ${.CURDIR}/${SRCS} ${LDADD}
---
> ${PROG}: ${DPSRCS} ${SRCS} ${LIBC} ${DPADD}
> ${CC} ${LDFLAGS} ${CFLAGS} -o ${.TARGET} ${.CURDIR}/${SRCS} \
> ${LDDESTDIR} ${LDADD}
68c128
< MAN1= ${PROG}.0
---
> MAN1= ${PROG}.1
71,76d130
< .if !defined(NOMAN)
< MANALL= ${MAN1} ${MAN2} ${MAN3} ${MAN4} ${MAN5} ${MAN6} ${MAN7} ${MAN8}
< .else
< MANALL=
< .endif
< manpages: ${MANALL}
91d144
< .if !target(all)
93,94c146
< all: ${PROG} ${MANALL} _PROGSUBDIR
< .endif
---
> all: ${PROG} _PROGSUBDIR
98c150
< rm -f a.out [Ee]rrs mklog ${PROG}.core ${PROG} ${OBJS} ${CLEANFILES}
---
> rm -f a.out [Ee]rrs mklog ${PROG} ${OBJS} ${CLEANFILES}
103,104c155,157
< rm -f a.out [Ee]rrs mklog ${PROG}.core ${PROG} ${OBJS} ${CLEANFILES}
< rm -f .depend ${MANALL}
---
> rm -f a.out [Ee]rrs mklog ${PROG} ${OBJS} ${CLEANFILES}
> rm -f ${.CURDIR}/tags .depend
> cd ${.CURDIR}; rm -rf obj;
107,115d159
< # some of the rules involve .h sources, so remove them from mkdep line
< .if !target(depend)
< depend: .depend _PROGSUBDIR
< .depend: ${SRCS}
< .if defined(PROG)
< mkdep ${MKDEP} ${CFLAGS:M-[ID]*} ${.ALLSRC:M*.c}
< .endif
< .endif
<
126,127c170,171
< install ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
< ${INSTALLFLAGS} ${PROG} ${DESTDIR}${BINDIR}
---
> ${INSTALL} ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
> ${PROG} ${DESTDIR}${BINDIR}
146c190,193
< install: afterinstall maninstall
---
> install: afterinstall
> .if !defined(NOMAN)
> afterinstall: realinstall maninstall
> .else
147a195
> .endif
164c212
< here=`pwd`; dest=/usr/obj/`echo $$here | sed 's,/usr/src/,,'`; \
---
> here=`pwd`; dest=/usr/obj`echo $$here | sed 's,^/usr/src,,'`; \
174,188d221
< .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
<
192,193c225,226
< -ctags -f /dev/stdout ${.ALLSRC} | \
< sed "s;${.CURDIR}/;;" > ${.CURDIR}/tags
---
> -cd ${.CURDIR}; ctags -f /dev/stdout ${.ALLSRC} | \
> sed "s;\${.CURDIR}/;;" > tags
199c232
< .else
---
> .elif !target(maninstall)
201a235,236
>
> .include <bsd.dep.mk>