[BACK]Return to bsd.prog.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/share/mk/bsd.prog.mk between version 1.42 and 1.83

version 1.42, 1994/06/28 05:16:12 version 1.83, 1997/05/17 16:43:33
Line 1 
Line 1 
 #       from: @(#)bsd.prog.mk   5.26 (Berkeley) 6/25/91  #       $NetBSD$
 #       $Id$  #       @(#)bsd.prog.mk 8.2 (Berkeley) 4/2/94
 .if exists(${.CURDIR}/../Makefile.inc)  .if exists(${.CURDIR}/../Makefile.inc)
 .include "${.CURDIR}/../Makefile.inc"  .include "${.CURDIR}/../Makefile.inc"
 .endif  .endif
 .SUFFIXES: .out .o .c .cc .C .y .l .s .8 .7 .6 .5 .4 .3 .2 .1 .0  .include <bsd.own.mk>
   .MAIN:          all
   .PHONY:         cleanprog proginstall scriptsinstall
   realinstall:    proginstall scriptsinstall
   clean cleandir: cleanprog
 CFLAGS+=        ${COPTS}  CFLAGS+=        ${COPTS}
 LIBCRT0?=       /usr/lib/crt0.o  # ELF platforms depend on crtbegin.o and crtend.o
 LIBC?=          /usr/lib/libc.a  .if (${MACHINE_ARCH} == "alpha")   || \
 LIBCOMPAT?=     /usr/lib/libcompat.a      (${MACHINE_ARCH} == "powerpc")
 LIBCRYPT?=      /usr/lib/libcrypt.a  LIBCRTBEGIN?=   ${DESTDIR}/usr/lib/crtbegin.o
 LIBCURSES?=     /usr/lib/libcurses.a  LIBCRTEND?=     ${DESTDIR}/usr/lib/crtend.o
 LIBDBM?=        /usr/lib/libdbm.a  .else
 LIBDES?=        /usr/lib/libdes.a  LIBCRTBEGIN?=
 LIBL?=          /usr/lib/libl.a  LIBCRTEND?=
 LIBKDB?=        /usr/lib/libkdb.a  .endif
 LIBKRB?=        /usr/lib/libkrb.a  
 LIBKVM?=        /usr/lib/libkvm.a  LIBCRT0?=       ${DESTDIR}/usr/lib/crt0.o
 LIBM?=          /usr/lib/libm.a  LIBC?=          ${DESTDIR}/usr/lib/libc.a
 LIBMP?=         /usr/lib/libmp.a  LIBC_PIC?=      ${DESTDIR}/usr/lib/libc_pic.a
 LIBPC?=         /usr/lib/libpc.a  LIBCOMPAT?=     ${DESTDIR}/usr/lib/libcompat.a
 LIBPLOT?=       /usr/lib/libplot.a  LIBCRYPT?=      ${DESTDIR}/usr/lib/libcrypt.a
 LIBRESOLV?=     /usr/lib/libresolv.a  LIBCURSES?=     ${DESTDIR}/usr/lib/libcurses.a
 LIBRPCSVC?=     /usr/lib/librpcsvc.a  LIBDBM?=        ${DESTDIR}/usr/lib/libdbm.a
 LIBSKEY?=       /usr/lib/libskey.a  LIBDES?=        ${DESTDIR}/usr/lib/libdes.a
 LIBTERMCAP?=    /usr/lib/libtermcap.a  LIBEDIT?=       ${DESTDIR}/usr/lib/libedit.a
 LIBUTIL?=       /usr/lib/libutil.a  LIBGCC?=        ${DESTDIR}/usr/lib/libgcc.a
   LIBGNUMALLOC?=  ${DESTDIR}/usr/lib/libgnumalloc.a
   LIBKDB?=        ${DESTDIR}/usr/lib/libkdb.a
   LIBKRB?=        ${DESTDIR}/usr/lib/libkrb.a
   LIBKVM?=        ${DESTDIR}/usr/lib/libkvm.a
   LIBL?=          ${DESTDIR}/usr/lib/libl.a
   LIBM?=          ${DESTDIR}/usr/lib/libm.a
   LIBMP?=         ${DESTDIR}/usr/lib/libmp.a
   LIBNTP?=        ${DESTDIR}/usr/lib/libntp.a
   LIBPC?=         ${DESTDIR}/usr/lib/libpc.a
   LIBPCAP?=       ${DESTDIR}/usr/lib/libpcap.a
   LIBPLOT?=       ${DESTDIR}/usr/lib/libplot.a
   LIBRESOLV?=     ${DESTDIR}/usr/lib/libresolv.a
   LIBRPCSVC?=     ${DESTDIR}/usr/lib/librpcsvc.a
   LIBSKEY?=       ${DESTDIR}/usr/lib/libskey.a
   LIBTERMCAP?=    ${DESTDIR}/usr/lib/libtermcap.a
   LIBTELNET?=     ${DESTDIR}/usr/lib/libtelnet.a
   LIBUTIL?=       ${DESTDIR}/usr/lib/libutil.a
   LIBWRAP?=       ${DESTDIR}/usr/lib/libwrap.a
   LIBY?=          ${DESTDIR}/usr/lib/liby.a
   LIBZ?=          ${DESTDIR}/usr/lib/libz.a
 .if defined(SHAREDSTRINGS)  .if defined(SHAREDSTRINGS)
 CLEANFILES+=strings  CLEANFILES+=strings
Line 52  CLEANFILES+=strings
Line 77  CLEANFILES+=strings
 .if defined(PROG)  .if defined(PROG)
 SRCS?=  ${PROG}.c  SRCS?=          ${PROG}.c
 OBJS+=  ${SRCS:N*.h:N*.sh:R:S/$/.o/g}  
   DPSRCS+=        ${SRCS:M*.l:.l=.c} ${SRCS:M*.y:.y=.c}
   .if !empty(SRCS:N*.h:N*.sh)
   OBJS+=          ${SRCS:N*.h:N*.sh:R:S/$/.o/g}
   LOBJS+=         ${LSRCS:.c=.ln} ${SRCS:M*.c:.c=.ln}
 .if defined(LDONLY)  .if defined(OBJS) && !empty(OBJS)
   .if defined(DESTDIR)
         ${LD} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${LIBCRT0} ${OBJS} ${LIBC} ${LDADD}          ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} -nostdlib -L${DESTDIR}/usr/lib ${LIBCRT0} ${LIBCRTBEGIN} ${OBJS} ${LDADD} -lgcc -lc -lgcc ${LIBCRTEND}
 .else defined(LDONLY)  .else
         ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}          ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}
 .endif  .endif  # defined(DESTDIR)
   .endif  # defined(OBJS) && !empty(OBJS)
 .if     !defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \  .if     !defined(MAN)
         !defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \  MAN=    ${PROG}.1
         !defined(MAN7) && !defined(MAN8)  .endif  # !defined(MAN)
 MAN1=   ${PROG}.0  .endif  # defined(PROG)
 .MAIN: all  
 all: ${PROG}  all: ${PROG}
 .if !target(clean)  cleanprog:
 clean:          rm -f a.out [Ee]rrs mklog core *.core \
         rm -f a.out [Ee]rrs mklog core *.core ${PROG} ${OBJS} ${CLEANFILES}              ${PROG} ${OBJS} ${LOBJS} ${CLEANFILES}
   .if defined(SRCS)
   afterdepend: .depend
           @(TMP=/tmp/_depend$$$$; \
               sed -e 's/^\([^\.]*\).o[ ]*:/\1.o \1.ln:/' \
                 < .depend > $$TMP; \
               mv $$TMP .depend)
 .endif  .endif
 cleandir: clean  .if defined(PROG) && !target(proginstall)
   proginstall:: ${DESTDIR}${BINDIR}/${PROGNAME}
   .if !defined(UPDATE)
   .if !defined(BUILD)
 .if !target(install)  .PRECIOUS: ${DESTDIR}${BINDIR}/${PROGNAME}
 .if !target(beforeinstall)  ${DESTDIR}${BINDIR}/${PROGNAME}: ${PROG}
 beforeinstall:          ${INSTALL} ${COPY} ${STRIPFLAG} -o ${BINOWN} -g ${BINGRP} \
               -m ${BINMODE} ${.ALLSRC} ${.TARGET}
 .endif  .endif
 .if !target(afterinstall)  
 afterinstall:  .if !target(proginstall)
 .endif  .endif
 .if !target(realinstall)  .if defined(SCRIPTS) && !target(scriptsinstall)
 realinstall:  SCRIPTSDIR?=${BINDIR}
 .if defined(PROG)  SCRIPTSOWN?=${BINOWN}
         install ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \  SCRIPTSGRP?=${BINGRP}
   .for S in ${SCRIPTS}
   .if defined(SCRIPTSNAME)
   SCRIPTSNAME_${S} ?= ${S:T:R}
 .endif  .endif
         (cd ${DESTDIR}/usr/games; rm -f ${PROG}; ln -s dm ${PROG})  scriptsinstall:: ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}
   .if !defined(UPDATE)
 .endif  .endif
   .if !defined(BUILD)
 .endif  .endif
 .if defined(LINKS) && !empty(LINKS)  ${DESTDIR}${SCRIPTSDIR_${S}}/${SCRIPTSNAME_${S}}: ${S}
         @set ${LINKS}; \          ${INSTALL} ${COPY} -o ${SCRIPTSOWN_${S}} -g ${SCRIPTSGRP_${S}} \
         while test $$# -ge 2; do \                  -m ${SCRIPTSMODE_${S}} ${.ALLSRC} ${.TARGET}
                 l=${DESTDIR}$$1; \  .endfor
                 shift; \  
                 t=${DESTDIR}$$1; \  
                 shift; \  
                 echo $$t -\> $$l; \  
                 rm -f $$t; \  
                 ln $$l $$t; \  
         done; true  
 .endif  .endif
 maninstall: afterinstall  .if !target(scriptsinstall)
 afterinstall: realinstall  scriptsinstall::
 realinstall: beforeinstall  
 .endif  .endif
 .if !target(lint)  lint: ${LOBJS}
 lint: ${SRCS}  .if defined(LOBJS) && !empty(LOBJS)
 .if defined(PROG)          @${LINT} ${LINTFLAGS} ${LDFLAGS:M-L*} ${LOBJS} ${LDADD}
         @${LINT} ${LINTFLAGS} ${CFLAGS} ${.ALLSRC} | more 2>&1  
 .endif  .endif
 .if !defined(NOMAN)  .if !defined(NOMAN)
 .include <bsd.man.mk>  .include <bsd.man.mk>
 .endif  .endif
   .if !defined(NONLS)
   .include <bsd.nls.mk>
 .include <bsd.obj.mk>  .include <bsd.obj.mk>
   .include <bsd.files.mk>
   .include <bsd.inc.mk>
   .include <bsd.links.mk>
 .include <bsd.dep.mk>  .include <bsd.dep.mk>
 .include <bsd.subdir.mk>  .include <bsd.subdir.mk>
   .include <bsd.sys.mk>

Removed from v.1.42  
changed lines
  Added in v.1.83

CVSweb <webmaster@jp.NetBSD.org>