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

Annotation of src/share/mk/bsd.prog.mk, Revision 1.39

1.25      mycroft     1: #      from: @(#)bsd.prog.mk   5.26 (Berkeley) 6/25/91
1.39    ! deraadt     2: #      $Id: bsd.prog.mk,v 1.38 1994/05/22 23:03:58 jtc Exp $
1.1       cgd         3:
                      4: .if exists(${.CURDIR}/../Makefile.inc)
                      5: .include "${.CURDIR}/../Makefile.inc"
                      6: .endif
                      7:
1.18      mycroft     8: .SUFFIXES: .out .o .c .cc .C .y .l .s .8 .7 .6 .5 .4 .3 .2 .1 .0
1.1       cgd         9:
1.25      mycroft    10: CFLAGS+=       ${COPTS}
1.1       cgd        11:
1.4       nate       12: LIBCRT0?=      /usr/lib/crt0.o
1.1       cgd        13: LIBC?=         /usr/lib/libc.a
                     14: LIBCOMPAT?=    /usr/lib/libcompat.a
1.15      cgd        15: LIBCRYPT?=     /usr/lib/libcrypt.a
1.1       cgd        16: LIBCURSES?=    /usr/lib/libcurses.a
                     17: LIBDBM?=       /usr/lib/libdbm.a
                     18: LIBDES?=       /usr/lib/libdes.a
                     19: LIBL?=         /usr/lib/libl.a
                     20: LIBKDB?=       /usr/lib/libkdb.a
                     21: LIBKRB?=       /usr/lib/libkrb.a
1.34      cgd        22: LIBKVM?=       /usr/lib/libkvm.a
1.1       cgd        23: LIBM?=         /usr/lib/libm.a
                     24: LIBMP?=                /usr/lib/libmp.a
                     25: LIBPC?=                /usr/lib/libpc.a
                     26: LIBPLOT?=      /usr/lib/libplot.a
                     27: LIBRESOLV?=    /usr/lib/libresolv.a
1.17      brezak     28: LIBRPCSVC?=    /usr/lib/librpcsvc.a
1.39    ! deraadt    29: LIBSKEY?=      /usr/lib/libskey.a
1.31      cgd        30: LIBTERMCAP?=   /usr/lib/libtermcap.a
1.1       cgd        31: LIBUTIL?=      /usr/lib/libutil.a
                     32:
                     33: .if defined(SHAREDSTRINGS)
                     34: CLEANFILES+=strings
                     35: .c.o:
                     36:        ${CC} -E ${CFLAGS} ${.IMPSRC} | xstr -c -
                     37:        @${CC} ${CFLAGS} -c x.c -o ${.TARGET}
                     38:        @rm -f x.c
1.18      mycroft    39:
                     40: .cc.o:
                     41:        ${CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c -
                     42:        @mv -f x.c x.cc
                     43:        @${CXX} ${CXXFLAGS} -c x.cc -o ${.TARGET}
1.26      mycroft    44:        @rm -f x.cc
1.18      mycroft    45:
                     46: .C.o:
                     47:        ${CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c -
                     48:        @mv -f x.c x.C
                     49:        @${CXX} ${CXXFLAGS} -c x.C -o ${.TARGET}
1.26      mycroft    50:        @rm -f x.C
1.1       cgd        51: .endif
                     52:
1.38      jtc        53:
1.1       cgd        54: .if defined(PROG)
                     55: .if defined(SRCS)
1.22      mycroft    56: OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}
1.38      jtc        57: .else
                     58: OBJS+= ${PROG}.o
                     59: .endif
1.1       cgd        60:
1.4       nate       61: .if defined(LDONLY)
                     62:
1.26      mycroft    63: ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}
1.32      cgd        64:        ${LD} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${LIBCRT0} ${OBJS} ${LIBC} ${LDADD}
1.4       nate       65:
                     66: .else defined(LDONLY)
                     67:
1.26      mycroft    68: ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}
1.32      cgd        69:        ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}
1.1       cgd        70:
                     71: .endif
                     72:
                     73: .if    !defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \
                     74:        !defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \
1.10      mycroft    75:        !defined(MAN7) && !defined(MAN8)
1.1       cgd        76: MAN1=  ${PROG}.0
                     77: .endif
                     78: .endif
1.11      mycroft    79:
1.1       cgd        80: .MAIN: all
1.26      mycroft    81: all: ${PROG}
1.1       cgd        82:
                     83: .if !target(clean)
1.26      mycroft    84: clean:
1.36      mycroft    85:        rm -f a.out [Ee]rrs mklog core *.core ${PROG} ${OBJS} ${CLEANFILES}
1.1       cgd        86: .endif
                     87:
1.27      mycroft    88: cleandir: clean
                     89:
1.1       cgd        90: .if !target(install)
                     91: .if !target(beforeinstall)
                     92: beforeinstall:
                     93: .endif
                     94: .if !target(afterinstall)
                     95: afterinstall:
                     96: .endif
                     97:
1.14      mycroft    98: .if !target(realinstall)
1.26      mycroft    99: realinstall:
1.1       cgd       100: .if defined(PROG)
1.9       cgd       101:        install ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
1.1       cgd       102:            ${PROG} ${DESTDIR}${BINDIR}
                    103: .endif
                    104: .if defined(HIDEGAME)
                    105:        (cd ${DESTDIR}/usr/games; rm -f ${PROG}; ln -s dm ${PROG}; \
                    106:            chown games.bin ${PROG})
                    107: .endif
1.23      mycroft   108: .endif
                    109:
1.29      mycroft   110: install: maninstall _SUBDIRUSE
1.1       cgd       111: .if defined(LINKS) && !empty(LINKS)
                    112:        @set ${LINKS}; \
                    113:        while test $$# -ge 2; do \
                    114:                l=${DESTDIR}$$1; \
                    115:                shift; \
                    116:                t=${DESTDIR}$$1; \
                    117:                shift; \
                    118:                echo $$t -\> $$l; \
                    119:                rm -f $$t; \
                    120:                ln $$l $$t; \
                    121:        done; true
1.14      mycroft   122: .endif
1.1       cgd       123:
                    124: maninstall: afterinstall
                    125: afterinstall: realinstall
                    126: realinstall: beforeinstall
                    127: .endif
                    128:
                    129: .if !target(lint)
1.26      mycroft   130: lint: ${SRCS}
1.1       cgd       131: .if defined(PROG)
                    132:        @${LINT} ${LINTFLAGS} ${CFLAGS} ${.ALLSRC} | more 2>&1
                    133: .endif
                    134: .endif
                    135:
                    136: .if !defined(NOMAN)
                    137: .include <bsd.man.mk>
                    138: .endif
1.24      mycroft   139:
                    140: .include <bsd.obj.mk>
1.26      mycroft   141: .include <bsd.dep.mk>
1.28      mycroft   142: .include <bsd.subdir.mk>

CVSweb <webmaster@jp.NetBSD.org>