[BACK]Return to Makefile.vax CVS log [TXT][DIR] Up to [local] / sys / arch / vax / conf

Annotation of sys/arch/vax/conf/Makefile.vax, Revision 1.1

1.1     ! nbrk        1: #      $OpenBSD: Makefile.vax,v 1.28 2007/07/30 16:23:33 thib Exp $
        !             2: #      $NetBSD: Makefile.vax,v 1.49 1999/07/26 05:20:49 cgd Exp $
        !             3:
        !             4: # Makefile for OpenBSD/vax
        !             5: #
        !             6: # This makefile is constructed from a machine description:
        !             7: #      config machineid
        !             8: # Most changes should be made in the machine description
        !             9: #      /sys/arch/vax/conf/``machineid''
        !            10: # after which you should do
        !            11: #      config machineid
        !            12: # Machine generic makefile changes should be made in
        !            13: #      /sys/arch/vax/conf/Makefile.vax
        !            14: # after which config should be rerun for all machines of that type.
        !            15: #
        !            16: # N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE
        !            17: #      IF YOU CHANGE THE DEFINITION OF ANY OF THESE RECOMPILE EVERYTHING
        !            18: #
        !            19: # -DTRACE      compile in kernel tracing hooks
        !            20: # -DQUOTA      compile in file system quotas
        !            21:
        !            22: # DEBUG is set to -g if debugging.
        !            23: # PROF is set to -pg if profiling.
        !            24:
        !            25: .include <bsd.own.mk>
        !            26:
        !            27: %OBJS
        !            28:
        !            29: %CFILES
        !            30:
        !            31: %SFILES
        !            32:
        !            33: MKDEP?=        mkdep
        !            34:
        !            35: # check for cross-compilation
        !            36: .if ${MACHINE} != "vax"
        !            37: CROSSDIR?=  /usr/cross/vax
        !            38:
        !            39: CBIN=${CROSSDIR}/usr/bin
        !            40: MACHINE=vax
        !            41: MACHINE_ARCH=vax
        !            42: AS=${CBIN}/as
        !            43: CC=${CBIN}/cc
        !            44: CPP=${CBIN}/cpp
        !            45: HOSTCC=cc
        !            46: LD=${CBIN}/ld
        !            47: STRIP=${CBIN}/strip
        !            48: SIZE=${CBIN}/size
        !            49:
        !            50: .else
        !            51:
        !            52: STRIP?=        strip
        !            53: SIZE?= size
        !            54:
        !            55: .endif
        !            56:
        !            57: COPTS?= -O2
        !            58:
        !            59: # source tree is located via $S relative to the compilation directory
        !            60: .ifndef S
        !            61: S!=    cd ../../../..; pwd
        !            62: .endif
        !            63: VAX=   $S/arch/vax
        !            64:
        !            65: INCLUDES=      -I. -I$S -I$S/arch -nostdinc
        !            66: CPPFLAGS=      ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL \
        !            67:                -D_VAX_INLINE_
        !            68: CWARNFLAGS?=   -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes \
        !            69:                -Wno-main -Wno-format -Wno-uninitialized \
        !            70:                -Wstack-larger-than-2047
        !            71: .if ${IDENT:M-DNO_PROPOLICE}
        !            72: CMACHFLAGS+=   -fno-stack-protector
        !            73: .endif
        !            74: CMACHFLAGS+=   -fno-builtin-printf -fno-builtin-log
        !            75: CFLAGS=                ${DEBUG} ${COPTS} ${CWARNFLAGS} ${CMACHFLAGS} ${PIPE}
        !            76: AFLAGS=                -x assembler-with-cpp -traditional-cpp -D_LOCORE
        !            77: LINKFLAGS=     -N -Ttext 80000000 -e start
        !            78: STRIPFLAGS=    -d
        !            79:
        !            80: HOSTED_CC=     ${CC}
        !            81: HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
        !            82: HOSTED_CFLAGS= ${CFLAGS}
        !            83:
        !            84: ### find out what to use for libkern
        !            85: KERN_AS=       obj
        !            86: .include "$S/lib/libkern/Makefile.inc"
        !            87: .ifndef PROF
        !            88: LIBKERN=       ${KERNLIB}
        !            89: .else
        !            90: LIBKERN=        ${KERNLIB_PROF}
        !            91: .endif
        !            92:
        !            93: ### find out what to use for libcompat
        !            94: .include "$S/compat/common/Makefile.inc"
        !            95: .ifndef PROF
        !            96: LIBCOMPAT=      ${COMPATLIB}
        !            97: .else
        !            98: LIBCOMPAT=      ${COMPATLIB_PROF}
        !            99: .endif
        !           100:
        !           101: # compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
        !           102: # HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
        !           103:
        !           104: NORMAL_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
        !           105: NOPROF_C=      ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
        !           106: NORMAL_S=      ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
        !           107:
        !           108: HOSTED_C=      ${HOSTED_CC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
        !           109:
        !           110: # load lines for config "xxx" will be emitted as:
        !           111: # xxx: ${SYSTEM_DEP} swapxxx.o
        !           112: #      ${SYSTEM_LD_HEAD}
        !           113: #      ${SYSTEM_LD} swapxxx.o
        !           114: #      ${SYSTEM_LD_TAIL}
        !           115: SYSTEM_OBJ=    intvec.o subr.o \
        !           116:                param.o ioconf.o ${OBJS} ${LIBCOMPAT} ${LIBKERN}
        !           117: SYSTEM_DEP=    Makefile ${SYSTEM_OBJ}
        !           118: SYSTEM_LD_HEAD=        @rm -f $@
        !           119: SYSTEM_LD=     @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
        !           120:                ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
        !           121: SYSTEM_LD_TAIL=        @${SIZE} $@; chmod 755 $@
        !           122:
        !           123: DEBUG?=
        !           124: .if ${DEBUG} == "-g"
        !           125: LINKFLAGS+=    -X
        !           126: SYSTEM_LD_TAIL+=; \
        !           127:                echo mv -f $@ $@.gdb; mv -f $@ $@.gdb; \
        !           128:                echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
        !           129:                ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
        !           130: .else
        !           131: LINKFLAGS+=    -S
        !           132: .endif
        !           133:
        !           134: %LOAD
        !           135:
        !           136: assym.h: $S/kern/genassym.sh ${VAX}/vax/genassym.cf Makefile
        !           137:        sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
        !           138:            < ${VAX}/vax/genassym.cf > assym.h.tmp && \
        !           139:            mv -f assym.h.tmp assym.h
        !           140:
        !           141: param.c: $S/conf/param.c
        !           142:        rm -f param.c
        !           143:        cp $S/conf/param.c .
        !           144:
        !           145: param.o: param.c Makefile
        !           146:        ${NORMAL_C}
        !           147:
        !           148: ioconf.o: ioconf.c
        !           149:        ${NORMAL_C}
        !           150:
        !           151: newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
        !           152:        sh $S/conf/newvers.sh
        !           153:        ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
        !           154:
        !           155: clean::        cleankernel
        !           156: cleankernel:
        !           157:        rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
        !           158:                [Ee]rrs linterrs makelinks assym.h
        !           159:
        !           160: lint:
        !           161:        @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
        !           162:            ${VAX}/vax/Locore.c ${CFILES} \
        !           163:            ioconf.c param.c | \
        !           164:            grep -v 'static function .* unused'
        !           165:
        !           166: tags:
        !           167:        @echo "see $S/kern/Makefile for tags"
        !           168:
        !           169: links:
        !           170:        egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
        !           171:          sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
        !           172:        echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
        !           173:          sort -u | comm -23 - dontlink | \
        !           174:          sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
        !           175:        sh makelinks && rm -f dontlink
        !           176:
        !           177: SRCS=  ${VAX}/vax/intvec.s ${VAX}/vax/subr.s \
        !           178:        param.c ioconf.c ${CFILES} ${SFILES}
        !           179:
        !           180: depend:: .depend
        !           181: .depend: ${SRCS} assym.h param.c
        !           182:        ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${VAX}/vax/intvec.s ${VAX}/vax/subr.s
        !           183:        ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
        !           184:        ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
        !           185:        sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
        !           186:            ${CPPFLAGS} < ${VAX}/vax/genassym.cf
        !           187:        @sed -e 's/.*\.o:.* /assym.h: /' < assym.dep >> .depend
        !           188:        @rm -f assym.dep
        !           189:
        !           190:
        !           191: # depend on root or device configuration
        !           192: autoconf.o conf.o: Makefile
        !           193:
        !           194: # depend on network or filesystem configuration
        !           195: uipc_proto.o vfs_conf.o: Makefile
        !           196:
        !           197: # depend on maxusers
        !           198: machdep.o: Makefile
        !           199:
        !           200: # depend on CPU configuration
        !           201: tmscp.o ts.o uba.o uda.o autoconf.o clock.o conf.o emulate.o intvec.o: Makefile
        !           202: machdep.o sbi.o subr.o: Makefile
        !           203:
        !           204:
        !           205: intvec.o: ${VAX}/vax/intvec.s assym.h
        !           206:        ${NORMAL_S}
        !           207:
        !           208: subr.o: ${VAX}/vax/subr.s assym.h
        !           209:        ${NORMAL_S}
        !           210:
        !           211: # The install target can be redefined by putting a
        !           212: # install-kernel-${MACHINE_NAME} target into /etc/mk.conf
        !           213: MACHINE_NAME!=  uname -n
        !           214: install: install-kernel-${MACHINE_NAME}
        !           215: .if !target(install-kernel-${MACHINE_NAME}})
        !           216: install-kernel-${MACHINE_NAME}:
        !           217:        rm -f /obsd
        !           218:        ln /bsd /obsd
        !           219:        cp bsd /nbsd
        !           220:        mv /nbsd /bsd
        !           221: .endif
        !           222:
        !           223: %RULES

CVSweb