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

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

1.1     ! nbrk        1: # Makefile for OpenBSD
        !             2:
        !             3: .include <bsd.own.mk>
        !             4:
        !             5: MKDEP?=        mkdep
        !             6: SIZE?= size
        !             7: STRIP?=        strip
        !             8:
        !             9: # source tree is located via $S relative to the compilation directory
        !            10: .ifndef S
        !            11: S!=    cd ../../../..; pwd
        !            12: .endif
        !            13: SPARC64=       $S/arch/sparc64
        !            14:
        !            15: INCLUDES=      -nostdinc -I. -I$S -I$S/arch
        !            16: CPPFLAGS=      ${INCLUDES} ${IDENT} -D_KERNEL
        !            17:
        !            18: CDIAGFLAGS=    -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
        !            19:                -Wno-uninitialized -Wno-format -Wno-main \
        !            20:                -Wstack-larger-than-2047
        !            21:
        !            22: CMACHFLAGS=    -Wa,-Av9a, -mno-fpu -fno-builtin-printf -fno-builtin-log
        !            23: .if ${IDENT:M-DNO_PROPOLICE}
        !            24: CMACHFLAGS+=   -fno-stack-protector
        !            25: .endif
        !            26:
        !            27: CFLAGS=                ${DEBUG} -O2 ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
        !            28: AFLAGS=                -x assembler-with-cpp -traditional-cpp -D_LOCORE -Wa,-Av9a
        !            29: LINKFLAGS=     -n -Ttext 01000000 -Tdata 01800000 -e start -N
        !            30: STRIPFLAGS=    -g -X -x
        !            31:
        !            32: HOSTCC=        ${CC}
        !            33: HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
        !            34: HOSTED_CFLAGS= ${CFLAGS}
        !            35:
        !            36: ### find out what to use for libkern
        !            37: .include "$S/lib/libkern/Makefile.inc"
        !            38: .ifndef PROF
        !            39: LIBKERN=       ${KERNLIB}
        !            40: .else
        !            41: LIBKERN=       ${KERNLIB_PROF}
        !            42: .endif
        !            43:
        !            44: ### find out what to use for libcompat
        !            45: .include "$S/compat/common/Makefile.inc"
        !            46: .ifndef PROF
        !            47: LIBCOMPAT=     ${COMPATLIB}
        !            48: .else
        !            49: LIBCOMPAT=     ${COMPATLIB_PROF}
        !            50: .endif
        !            51:
        !            52: # compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
        !            53: # where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix,
        !            54: # capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
        !            55: # is marked as config-dependent.
        !            56:
        !            57: NORMAL_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
        !            58: NORMAL_C_C=    ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
        !            59:
        !            60: DRIVER_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
        !            61: DRIVER_C_C=    ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
        !            62:
        !            63: NORMAL_S=      ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
        !            64: NORMAL_S_C=    ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
        !            65:
        !            66: HOSTED_C=      ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
        !            67:
        !            68: %OBJS
        !            69:
        !            70: %CFILES
        !            71:
        !            72: %SFILES
        !            73:
        !            74: # load lines for config "xxx" will be emitted as:
        !            75: # xxx: ${SYSTEM_DEP} swapxxx.o
        !            76: #      ${SYSTEM_LD_HEAD}
        !            77: #      ${SYSTEM_LD} swapxxx.o
        !            78: #      ${SYSTEM_LD_TAIL}
        !            79: SYSTEM_OBJ=    locore.o \
        !            80:                param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT}
        !            81: SYSTEM_DEP=    Makefile ${SYSTEM_OBJ}
        !            82: SYSTEM_LD_HEAD=        @rm -f $@
        !            83: SYSTEM_LD=     @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
        !            84:                ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
        !            85: SYSTEM_LD_TAIL=        @${SIZE} $@; chmod 755 $@
        !            86:
        !            87: DEBUG?=
        !            88: .if ${DEBUG} == "-g"
        !            89: LINKFLAGS+=    -X
        !            90: SYSTEM_LD_TAIL+=; \
        !            91:                echo mv $@ $@.gdb; rm -f $@.gdb; mv $@ $@.gdb; \
        !            92:                echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
        !            93:                ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
        !            94: .else
        !            95: LINKFLAGS+=    -S -x
        !            96: .endif
        !            97:
        !            98: %LOAD
        !            99:
        !           100: assym.h: $S/kern/genassym.sh ${SPARC64}/sparc64/genassym.cf Makefile
        !           101:        sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
        !           102:            ${PARAM} < ${SPARC64}/sparc64/genassym.cf > assym.h.tmp && \
        !           103:            mv -f assym.h.tmp assym.h
        !           104:
        !           105: param.c: $S/conf/param.c
        !           106:        rm -f param.c
        !           107:        cp $S/conf/param.c .
        !           108:
        !           109: param.o: param.c Makefile
        !           110:        ${NORMAL_C_C}
        !           111:
        !           112: ioconf.o: ioconf.c
        !           113:        ${NORMAL_C}
        !           114:
        !           115: newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
        !           116:        sh $S/conf/newvers.sh
        !           117:        ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
        !           118:
        !           119:
        !           120: clean::
        !           121:        rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
        !           122:            [Ee]rrs linterrs makelinks genassym genassym.o assym.h
        !           123:
        !           124: lint:
        !           125:        @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
        !           126:            ${CFILES} ioconf.c param.c | \
        !           127:            grep -v 'static function .* unused'
        !           128:
        !           129: tags:
        !           130:        @echo "see $S/kern/Makefile for tags"
        !           131:
        !           132: links:
        !           133:        egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
        !           134:          sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
        !           135:        echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
        !           136:          sort -u | comm -23 - dontlink | \
        !           137:          sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
        !           138:        sh makelinks && rm -f dontlink
        !           139:
        !           140: SRCS=  ${SPARC64}/sparc64/locore.s \
        !           141:        param.c ioconf.c ${CFILES} ${SFILES}
        !           142: depend:: .depend
        !           143: .depend: ${SRCS} assym.h param.c
        !           144:        ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${SPARC64}/sparc64/locore.s
        !           145:        ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
        !           146: .if !empty(SFILES)
        !           147:        ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
        !           148: .endif
        !           149:        sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
        !           150:            ${CPPFLAGS} < ${SPARC64}/sparc64/genassym.cf
        !           151:        @sed -e 's/.*\.o:.* /assym.h: /' < assym.dep >> .depend
        !           152:        @rm -f assym.dep
        !           153:
        !           154: locore.o: ${SPARC64}/sparc64/locore.s assym.h
        !           155:        ${NORMAL_S}
        !           156: in_cksum.o: assym.h
        !           157:
        !           158: # The install target can be redefined by putting a
        !           159: # install-kernel-${MACHINE_NAME} target into /etc/mk.conf
        !           160: MACHINE_NAME!=  uname -n
        !           161: install: install-kernel-${MACHINE_NAME}
        !           162: .if !target(install-kernel-${MACHINE_NAME}})
        !           163: install-kernel-${MACHINE_NAME}:
        !           164:        rm -f /obsd
        !           165:        ln /bsd /obsd
        !           166:        cp bsd /nbsd
        !           167:        mv /nbsd /bsd
        !           168: .endif
        !           169:
        !           170: %RULES

CVSweb