[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.38

1.25      mycroft     1: #      from: @(#)bsd.prog.mk   5.26 (Berkeley) 6/25/91
1.38    ! jtc         2: #      $Id: bsd.prog.mk,v 1.37 1994/04/06 06:37:38 chopps 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.31      cgd        29: LIBTERMCAP?=   /usr/lib/libtermcap.a
1.1       cgd        30: LIBUTIL?=      /usr/lib/libutil.a
                     31:
                     32: .if defined(SHAREDSTRINGS)
                     33: CLEANFILES+=strings
                     34: .c.o:
                     35:        ${CC} -E ${CFLAGS} ${.IMPSRC} | xstr -c -
                     36:        @${CC} ${CFLAGS} -c x.c -o ${.TARGET}
                     37:        @rm -f x.c
1.18      mycroft    38:
                     39: .cc.o:
                     40:        ${CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c -
                     41:        @mv -f x.c x.cc
                     42:        @${CXX} ${CXXFLAGS} -c x.cc -o ${.TARGET}
1.26      mycroft    43:        @rm -f x.cc
1.18      mycroft    44:
                     45: .C.o:
                     46:        ${CXX} -E ${CXXFLAGS} ${.IMPSRC} | xstr -c -
                     47:        @mv -f x.c x.C
                     48:        @${CXX} ${CXXFLAGS} -c x.C -o ${.TARGET}
1.26      mycroft    49:        @rm -f x.C
1.1       cgd        50: .endif
                     51:
1.38    ! jtc        52:
1.1       cgd        53: .if defined(PROG)
                     54: .if defined(SRCS)
1.22      mycroft    55: OBJS+=  ${SRCS:N*.h:R:S/$/.o/g}
1.38    ! jtc        56: .else
        !            57: OBJS+= ${PROG}.o
        !            58: .endif
1.1       cgd        59:
1.4       nate       60: .if defined(LDONLY)
                     61:
1.26      mycroft    62: ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}
1.32      cgd        63:        ${LD} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${LIBCRT0} ${OBJS} ${LIBC} ${LDADD}
1.4       nate       64:
                     65: .else defined(LDONLY)
                     66:
1.26      mycroft    67: ${PROG}: ${LIBCRT0} ${OBJS} ${LIBC} ${DPADD}
1.32      cgd        68:        ${CC} ${LDFLAGS} ${LDSTATIC} -o ${.TARGET} ${OBJS} ${LDADD}
1.1       cgd        69:
                     70: .endif
                     71:
                     72: .if    !defined(MAN1) && !defined(MAN2) && !defined(MAN3) && \
                     73:        !defined(MAN4) && !defined(MAN5) && !defined(MAN6) && \
1.10      mycroft    74:        !defined(MAN7) && !defined(MAN8)
1.1       cgd        75: MAN1=  ${PROG}.0
                     76: .endif
                     77: .endif
1.11      mycroft    78:
1.1       cgd        79: .MAIN: all
1.26      mycroft    80: all: ${PROG}
1.1       cgd        81:
                     82: .if !target(clean)
1.26      mycroft    83: clean:
1.36      mycroft    84:        rm -f a.out [Ee]rrs mklog core *.core ${PROG} ${OBJS} ${CLEANFILES}
1.1       cgd        85: .endif
                     86:
1.27      mycroft    87: cleandir: clean
                     88:
1.1       cgd        89: .if !target(install)
                     90: .if !target(beforeinstall)
                     91: beforeinstall:
                     92: .endif
                     93: .if !target(afterinstall)
                     94: afterinstall:
                     95: .endif
                     96:
1.14      mycroft    97: .if !target(realinstall)
1.26      mycroft    98: realinstall:
1.1       cgd        99: .if defined(PROG)
1.9       cgd       100:        install ${COPY} ${STRIP} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
1.1       cgd       101:            ${PROG} ${DESTDIR}${BINDIR}
                    102: .endif
                    103: .if defined(HIDEGAME)
                    104:        (cd ${DESTDIR}/usr/games; rm -f ${PROG}; ln -s dm ${PROG}; \
                    105:            chown games.bin ${PROG})
                    106: .endif
1.23      mycroft   107: .endif
                    108:
1.29      mycroft   109: install: maninstall _SUBDIRUSE
1.1       cgd       110: .if defined(LINKS) && !empty(LINKS)
                    111:        @set ${LINKS}; \
                    112:        while test $$# -ge 2; do \
                    113:                l=${DESTDIR}$$1; \
                    114:                shift; \
                    115:                t=${DESTDIR}$$1; \
                    116:                shift; \
                    117:                echo $$t -\> $$l; \
                    118:                rm -f $$t; \
                    119:                ln $$l $$t; \
                    120:        done; true
1.14      mycroft   121: .endif
1.1       cgd       122:
                    123: maninstall: afterinstall
                    124: afterinstall: realinstall
                    125: realinstall: beforeinstall
                    126: .endif
                    127:
                    128: .if !target(lint)
1.26      mycroft   129: lint: ${SRCS}
1.1       cgd       130: .if defined(PROG)
                    131:        @${LINT} ${LINTFLAGS} ${CFLAGS} ${.ALLSRC} | more 2>&1
                    132: .endif
                    133: .endif
                    134:
                    135: .if !defined(NOMAN)
                    136: .include <bsd.man.mk>
                    137: .endif
1.24      mycroft   138:
                    139: .include <bsd.obj.mk>
1.26      mycroft   140: .include <bsd.dep.mk>
1.28      mycroft   141: .include <bsd.subdir.mk>

CVSweb <webmaster@jp.NetBSD.org>