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

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

1.1     ! nbrk        1: #      $OpenBSD: Makefile.alpha,v 1.39 2007/07/30 16:23:33 thib Exp $
        !             2: #      $NetBSD: Makefile.alpha,v 1.27 1996/12/01 06:12:25 jonathan Exp $
        !             3:
        !             4: # Makefile for OpenBSD
        !             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/alpha/conf/``machineid''
        !            10: # after which you should do
        !            11: #      config machineid
        !            12: # Machine generic makefile changes should be made in
        !            13: #      /sys/arch/alpha/conf/Makefile.alpha
        !            14: # after which config should be rerun for all machines of that type.
        !            15: #
        !            16: # DEBUG is set to -g if debugging.
        !            17: # PROF is set to -pg if profiling.
        !            18:
        !            19: .include <bsd.own.mk>
        !            20:
        !            21: MKDEP?=        mkdep
        !            22: SIZE?= size
        !            23: STRIP?=        strip
        !            24:
        !            25: # source tree is located via $S relative to the compilation directory
        !            26: .ifndef S
        !            27: S!=    cd ../../../..; pwd
        !            28: .endif
        !            29: ALPHA= $S/arch/alpha
        !            30:
        !            31: INCLUDES=      -I. -I$S -I$S/arch -nostdinc
        !            32: CPPFLAGS=      ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -Dalpha
        !            33:
        !            34: CDIAGFLAGS?=   -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
        !            35:                -Wno-uninitialized -Wno-format -Wno-main \
        !            36:                -Wstack-larger-than-2047
        !            37:
        !            38: CMACHFLAGS=    -mno-fp-regs -fno-builtin-printf -fno-builtin-log \
        !            39:                -finhibit-size-directive -Wa,-mev56
        !            40: .if ${IDENT:M-DNO_PROPOLICE}
        !            41: CMACHFLAGS+=   -fno-stack-protector
        !            42: .endif
        !            43: COPTS?=        -O2
        !            44: CFLAGS=                ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
        !            45: AFLAGS=                -traditional -D_LOCORE
        !            46: LINKFLAGS=     -N -Ttext fffffc0000230000 -e __start -G 4
        !            47: STRIPFLAGS=    -g -X -x
        !            48:
        !            49: HOSTED_CC=     ${CC}
        !            50: HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
        !            51: HOSTED_CFLAGS= ${CFLAGS}
        !            52:
        !            53: ### find out what to use for libkern
        !            54: .include "$S/lib/libkern/Makefile.inc"
        !            55: .ifndef PROF
        !            56: LIBKERN=       ${KERNLIB}
        !            57: .else
        !            58: LIBKERN=       ${KERNLIB_PROF}
        !            59: .endif
        !            60:
        !            61: ### find out what to use for libcompat
        !            62: .include "$S/compat/common/Makefile.inc"
        !            63: .ifndef PROF
        !            64: LIBCOMPAT=     ${COMPATLIB}
        !            65: .else
        !            66: LIBCOMPAT=     ${COMPATLIB_PROF}
        !            67: .endif
        !            68:
        !            69: # compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
        !            70: # HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
        !            71:
        !            72: NORMAL_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
        !            73: NORMAL_S=      ${CC} -xassembler-with-cpp ${AFLAGS} ${CPPFLAGS} -c $<
        !            74:
        !            75: HOSTED_C=      ${HOSTED_CC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
        !            76:
        !            77: %OBJS
        !            78:
        !            79: %CFILES
        !            80:
        !            81: %SFILES
        !            82:
        !            83: # load lines for config "xxx" will be emitted as:
        !            84: # xxx: ${SYSTEM_DEP} swapxxx.o
        !            85: #      ${SYSTEM_LD_HEAD}
        !            86: #      ${SYSTEM_LD} swapxxx.o
        !            87: #      ${SYSTEM_LD_TAIL}
        !            88: SYSTEM_OBJ=    locore.o param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT}
        !            89: SYSTEM_DEP=    Makefile ${SYSTEM_OBJ}
        !            90: SYSTEM_LD_HEAD=        @rm -f $@
        !            91: SYSTEM_LD=     @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
        !            92:                ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
        !            93: SYSTEM_LD_TAIL=        @${SIZE} $@; chmod 755 $@
        !            94:
        !            95: DEBUG?=
        !            96: .if ${DEBUG} == "-g"
        !            97: LINKFLAGS+=    -X
        !            98: SYSTEM_LD_TAIL+=; \
        !            99:                echo mv $@ $@.gdb; rm -f $@.gdb; mv $@ $@.gdb; \
        !           100:                echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
        !           101:                ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
        !           102: .else
        !           103: LINKFLAGS+=    -S -x
        !           104: .endif
        !           105:
        !           106: %LOAD
        !           107:
        !           108: assym.h: $S/kern/genassym.sh ${ALPHA}/alpha/genassym.cf Makefile
        !           109:        sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
        !           110:            ${PARAM} < ${ALPHA}/alpha/genassym.cf > assym.h.tmp && \
        !           111:            mv -f assym.h.tmp assym.h
        !           112:
        !           113: param.c: $S/conf/param.c
        !           114:        rm -f param.c
        !           115:        cp $S/conf/param.c .
        !           116:
        !           117: param.o: param.c Makefile
        !           118:        ${NORMAL_C}
        !           119:
        !           120: ioconf.o: ioconf.c
        !           121:        ${NORMAL_C}
        !           122:
        !           123: newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
        !           124:        sh $S/conf/newvers.sh
        !           125:        ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
        !           126:
        !           127:
        !           128: clean::
        !           129:        rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
        !           130:            [Ee]rrs linterrs makelinks assym.h
        !           131:
        !           132: lint:
        !           133:        @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
        !           134:            ${CFILES} ioconf.c param.c | \
        !           135:            grep -v 'static function .* unused'
        !           136:
        !           137: tags:
        !           138:        @echo "see $S/kern/Makefile for tags"
        !           139:
        !           140: links:
        !           141:        egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
        !           142:          sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
        !           143:        echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
        !           144:          sort -u | comm -23 - dontlink | \
        !           145:          sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
        !           146:        sh makelinks && rm -f dontlink
        !           147:
        !           148: SRCS=  ${ALPHA}/alpha/locore.s param.c ioconf.c ${CFILES} ${SFILES}
        !           149: depend:: .depend
        !           150: .depend: ${SRCS} assym.h param.c ${ALPHA}/alpha/cpuconf.c
        !           151:        ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${ALPHA}/alpha/locore.s
        !           152:        ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} ${ALPHA}/alpha/cpuconf.c \
        !           153:            param.c ioconf.c ${CFILES}
        !           154:        ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
        !           155:        sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
        !           156:            ${CPPFLAGS} < ${ALPHA}/alpha/genassym.cf
        !           157:        @sed -e 's/.*\.o:.* /assym.h: /' < assym.dep >> .depend
        !           158:        @rm -f assym.dep
        !           159:
        !           160:
        !           161: # depend on root or device configuration
        !           162: autoconf.o conf.o: Makefile
        !           163:
        !           164: # depend on network or filesystem configuration
        !           165: uipc_proto.o vfs_conf.o: Makefile
        !           166:
        !           167: # depend on maxusers
        !           168: machdep.o: Makefile
        !           169:
        !           170: # depend on CPU configuration
        !           171: clock.o machdep.o apecs.o cia.o lca.o ioasic.o scc.o icasic.o: Makefile
        !           172:
        !           173:
        !           174: locore.o: ${ALPHA}/alpha/locore.s assym.h
        !           175:        ${NORMAL_S}
        !           176:
        !           177: # The install target can be redefined by putting a
        !           178: # install-kernel-${MACHINE_NAME} target into /etc/mk.conf
        !           179: MACHINE_NAME!=  uname -n
        !           180: install: install-kernel-${MACHINE_NAME}
        !           181: .if !target(install-kernel-${MACHINE_NAME}})
        !           182: install-kernel-${MACHINE_NAME}:
        !           183:        rm -f /obsd
        !           184:        ln /bsd /obsd
        !           185:        cp bsd /nbsd
        !           186:        mv /nbsd /bsd
        !           187: .endif
        !           188:
        !           189: %RULES

CVSweb