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

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

1.1     ! nbrk        1: #      $OpenBSD: Makefile.sparc,v 1.39 2007/07/30 16:23:33 thib Exp $
        !             2: #      $NetBSD: Makefile.sparc,v 1.32.4.1 1996/06/12 20:26:32 pk 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/sparc/conf/``machineid''
        !            10: # after which you should do
        !            11: #      config machineid
        !            12: # Machine generic makefile changes should be made in
        !            13: #      /sys/arch/sparc/conf/Makefile.sparc
        !            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: MKDEP?=        mkdep
        !            28: SIZE?= size
        !            29: STRIP?=        strip
        !            30:
        !            31: # source tree is located via $S relative to the compilation directory
        !            32: .ifndef S
        !            33: S!=    cd ../../../..; pwd
        !            34: .endif
        !            35: SPARC= $S/arch/sparc
        !            36:
        !            37: INCLUDES=      -nostdinc -I. -I$S -I$S/arch
        !            38: CPPFLAGS=      ${INCLUDES} ${IDENT} -D_KERNEL -Dsparc
        !            39:
        !            40: CDIAGFLAGS=    -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
        !            41:                -Wno-uninitialized -Wno-format -Wno-main \
        !            42:                -Wstack-larger-than-2047
        !            43:
        !            44: .if ${IDENT:M-DSUN*} == ${IDENT:M-DSUN4M}
        !            45: CMACHFLAGS=    -mcpu=supersparc
        !            46: .else
        !            47: CMACHFLAGS=
        !            48: .endif
        !            49: .if ${IDENT:M-DNO_PROPOLICE}
        !            50: CMACHFLAGS+=   -fno-stack-protector
        !            51: .endif
        !            52: CMACHFLAGS+=   -fno-builtin-printf -fno-builtin-log
        !            53:
        !            54: CFLAGS=                ${DEBUG} -O2 ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
        !            55: # add `-mno-fpu' to work around gcc (last noticed in v2.7.2) bug
        !            56: CFLAGS+=       -mno-fpu
        !            57: AFLAGS=                -x assembler-with-cpp -traditional-cpp -D_LOCORE
        !            58: LINKFLAGS=     -N -e start -Ttext F8004000
        !            59: STRIPFLAGS=    -g -X -x
        !            60:
        !            61: HOSTCC=        ${CC}
        !            62: HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
        !            63: HOSTED_CFLAGS= ${CFLAGS}
        !            64:
        !            65: ### find out what to use for libkern
        !            66: .include "$S/lib/libkern/Makefile.inc"
        !            67: .ifndef PROF
        !            68: LIBKERN=       ${KERNLIB}
        !            69: .else
        !            70: LIBKERN=       ${KERNLIB_PROF}
        !            71: .endif
        !            72:
        !            73: ### find out what to use for libcompat
        !            74: .include "$S/compat/common/Makefile.inc"
        !            75: .ifndef PROF
        !            76: LIBCOMPAT=     ${COMPATLIB}
        !            77: .else
        !            78: LIBCOMPAT=     ${COMPATLIB_PROF}
        !            79: .endif
        !            80:
        !            81: # compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
        !            82: # where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix,
        !            83: # capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
        !            84: # is marked as config-dependent.
        !            85:
        !            86: NORMAL_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
        !            87: NORMAL_C_C=    ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
        !            88:
        !            89: DRIVER_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
        !            90: DRIVER_C_C=    ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
        !            91:
        !            92: NORMAL_S=      ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
        !            93: NORMAL_S_C=    ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
        !            94:
        !            95: HOSTED_C=      ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
        !            96:
        !            97: %OBJS
        !            98:
        !            99: %CFILES
        !           100:
        !           101: %SFILES
        !           102:
        !           103: # load lines for config "xxx" will be emitted as:
        !           104: # xxx: ${SYSTEM_DEP} swapxxx.o
        !           105: #      ${SYSTEM_LD_HEAD}
        !           106: #      ${SYSTEM_LD} swapxxx.o
        !           107: #      ${SYSTEM_LD_TAIL}
        !           108: SYSTEM_OBJ=    locore.o \
        !           109:                param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT}
        !           110: SYSTEM_DEP=    Makefile ${SYSTEM_OBJ}
        !           111: SYSTEM_LD_HEAD=        @rm -f $@
        !           112: SYSTEM_LD=     @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
        !           113:                ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
        !           114: SYSTEM_LD_TAIL=        @${SIZE} $@; chmod 755 $@
        !           115:
        !           116: DEBUG?=
        !           117: .if ${DEBUG} == "-g"
        !           118: LINKFLAGS+=    -X
        !           119: SYSTEM_LD_TAIL+=; \
        !           120:                echo mv $@ $@.gdb; rm -f $@.gdb; mv $@ $@.gdb; \
        !           121:                echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
        !           122:                ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
        !           123: .else
        !           124: LINKFLAGS+=    -S -x
        !           125: .endif
        !           126:
        !           127: %LOAD
        !           128:
        !           129: assym.h: $S/kern/genassym.sh ${SPARC}/sparc/genassym.cf Makefile
        !           130:        sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
        !           131:            ${PARAM} < ${SPARC}/sparc/genassym.cf > assym.h.tmp && \
        !           132:            mv -f assym.h.tmp assym.h
        !           133:
        !           134: param.c: $S/conf/param.c
        !           135:        rm -f param.c
        !           136:        cp $S/conf/param.c .
        !           137:
        !           138: param.o: param.c Makefile
        !           139:        ${NORMAL_C_C}
        !           140:
        !           141: ioconf.o: ioconf.c
        !           142:        ${NORMAL_C}
        !           143:
        !           144: newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
        !           145:        sh $S/conf/newvers.sh
        !           146:        ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
        !           147:
        !           148:
        !           149: clean::
        !           150:        rm -f eddep *bsd *bsd.gdb tags *.[io] [a-z]*.s \
        !           151:            [Ee]rrs linterrs makelinks genassym genassym.o assym.h
        !           152:
        !           153: lint:
        !           154:        @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
        !           155:            ${CFILES} ioconf.c param.c | \
        !           156:            grep -v 'static function .* unused'
        !           157:
        !           158: tags:
        !           159:        @echo "see $S/kern/Makefile for tags"
        !           160:
        !           161: links:
        !           162:        egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
        !           163:          sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
        !           164:        echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
        !           165:          sort -u | comm -23 - dontlink | \
        !           166:          sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
        !           167:        sh makelinks && rm -f dontlink
        !           168:
        !           169: SRCS=  ${SPARC}/sparc/locore.s \
        !           170:        param.c ioconf.c ${CFILES} ${SFILES}
        !           171: depend:: .depend
        !           172: .depend: ${SRCS} assym.h param.c
        !           173:        ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${SPARC}/sparc/locore.s
        !           174:        ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
        !           175: .if !empty(SFILES)
        !           176:        ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
        !           177: .endif
        !           178:        sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
        !           179:            ${CPPFLAGS} < ${SPARC}/sparc/genassym.cf
        !           180:        @sed -e 's/.*\.o:.* /assym.h: /' < assym.dep >> .depend
        !           181:        @rm -f assym.dep
        !           182:
        !           183:
        !           184: # depend on root or device configuration
        !           185: autoconf.o conf.o: Makefile
        !           186:
        !           187: # depend on network or filesystem configuration
        !           188: uipc_proto.o vfs_conf.o: Makefile
        !           189:
        !           190: # depend on maxusers
        !           191: machdep.o: Makefile
        !           192:
        !           193: # depend on CPU configuration
        !           194: bwtwo.o cgsix.o cgthree.o cgtwo.o cons.o dma.o esp.o fb.o if_ie.o: Makefile
        !           195: ms.c obio.o zs.c autoconf.o clock.o cpu.o disksubr.o locore.o: Makefile
        !           196: machdep.o mem.o openprom.o pmap.o vm_machdep.o: Makefile
        !           197:
        !           198:
        !           199: locore.o: ${SPARC}/sparc/locore.s assym.h
        !           200:        ${NORMAL_S}
        !           201:
        !           202: # The install target can be redefined by putting a
        !           203: # install-kernel-${MACHINE_NAME} target into /etc/mk.conf
        !           204: MACHINE_NAME!=  uname -n
        !           205: install: install-kernel-${MACHINE_NAME}
        !           206: .if !target(install-kernel-${MACHINE_NAME}})
        !           207: install-kernel-${MACHINE_NAME}:
        !           208:        rm -f /obsd
        !           209:        ln /bsd /obsd
        !           210:        cp bsd /nbsd
        !           211:        mv /nbsd /bsd
        !           212: .endif
        !           213:
        !           214: %RULES

CVSweb