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

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

1.1     ! nbrk        1: #      $OpenBSD: Makefile.mac68k,v 1.36 2007/07/30 16:23:33 thib Exp $
        !             2: #      $NetBSD: Makefile.mac68k,v 1.53 1997/04/15 06:11:38 scottr 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/mac68k/conf/``machineid''
        !            10: # after which you should do
        !            11: #      config machineid
        !            12: # Machine generic makefile changes should be made in
        !            13: #      /sys/arch/mac68k/conf/Makefile.mac68k
        !            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: MAC68K=        $S/arch/mac68k
        !            36: M68K=  $S/arch/m68k
        !            37:
        !            38: INCLUDES=      -I. -I$S -I$S/arch -nostdinc
        !            39: CPPFLAGS=      ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL \
        !            40:                -Dmc68020 -Dmac68k
        !            41: CWARNFLAGS=    -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
        !            42:                -Wno-uninitialized -Wno-format -Wno-main \
        !            43:                -Wstack-larger-than-2047
        !            44: CMACHFLAGS=    -msoft-float -fno-builtin-printf -fno-builtin-log
        !            45: .if ${IDENT:M-DNO_PROPOLICE}
        !            46: CMACHFLAGS+=   -fno-stack-protector
        !            47: .endif
        !            48: COPTS?=        -O2
        !            49: CFLAGS=                ${DEBUG} ${COPTS} ${CWARNFLAGS} ${CMACHFLAGS} ${PIPE}
        !            50: AFLAGS=                -x assembler-with-cpp -traditional-cpp -D_LOCORE
        !            51: LINKFLAGS=     -n -Ttext 0 -e start
        !            52: STRIPFLAGS=    -d
        !            53:
        !            54: HOSTCC?=       ${CC}
        !            55: HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
        !            56: HOSTED_CFLAGS= ${CFLAGS}
        !            57:
        !            58: ### Find out what to use for libkern.
        !            59: .include "$S/lib/libkern/Makefile.inc"
        !            60: .ifndef PROF
        !            61: LIBKERN=${KERNLIB}
        !            62: .else
        !            63: LIBKERN=${KERNLIB_PROF}
        !            64: .endif
        !            65:
        !            66: ### Find out what to use for libcompat.
        !            67: .include "$S/compat/common/Makefile.inc"
        !            68: .ifndef PROF
        !            69: LIBCOMPAT=${COMPATLIB}
        !            70: .else
        !            71: LIBCOMPAT=${COMPATLIB_PROF}
        !            72: .endif
        !            73:
        !            74: ### for the Motorola 68040 Floating Point Software Product
        !            75: .include "${M68K}/fpsp/Makefile.inc"
        !            76:
        !            77: # compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
        !            78: # where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix,
        !            79: # capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
        !            80: # is marked as config-dependent.
        !            81:
        !            82: NORMAL_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
        !            83: NORMAL_C_C=    ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
        !            84:
        !            85: HOSTED_C=      ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
        !            86:
        !            87: DRIVER_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
        !            88: DRIVER_C_C=    ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
        !            89:
        !            90: NORMAL_S=      ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
        !            91: NORMAL_S_C=    ${CC} ${AFLAGS} ${CPPFLAGS} ${PARAM} -c $<
        !            92:
        !            93: %OBJS
        !            94:
        !            95: %CFILES
        !            96:
        !            97: %SFILES
        !            98:
        !            99: # load lines for config "xxx" will be emitted as:
        !           100: # xxx: ${SYSTEM_DEP} swapxxx.o
        !           101: #      ${SYSTEM_LD_HEAD}
        !           102: #      ${SYSTEM_LD} swapxxx.o
        !           103: #      ${SYSTEM_LD_TAIL}
        !           104: SYSTEM_OBJ=    locore.o ${FPSP} \
        !           105:                param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT}
        !           106: SYSTEM_DEP=    Makefile ${SYSTEM_OBJ}
        !           107: SYSTEM_LD_HEAD=        @rm -f $@
        !           108: SYSTEM_LD=     @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
        !           109:                ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
        !           110: SYSTEM_LD_TAIL=        @${SIZE} $@; chmod 755 $@
        !           111:
        !           112: DEBUG?=
        !           113: .if ${DEBUG} == "-g"
        !           114: LINKFLAGS+=    -X
        !           115: SYSTEM_LD_TAIL+=; \
        !           116:                echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \
        !           117:                echo ${STRIP} $@; ${STRIP} $@
        !           118: .else
        !           119: LINKFLAGS+=    -S
        !           120: .endif
        !           121:
        !           122: %LOAD
        !           123:
        !           124: assym.h: $S/kern/genassym.sh \
        !           125:         ${M68K}/m68k/genassym.cf ${MAC68K}/mac68k/genassym.cf Makefile
        !           126:        cat ${M68K}/m68k/genassym.cf ${MAC68K}/mac68k/genassym.cf | \
        !           127:            sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
        !           128:            > assym.h.tmp && \
        !           129:        mv -f assym.h.tmp assym.h
        !           130:
        !           131: param.c: $S/conf/param.c
        !           132:        rm -f param.c
        !           133:        cp $S/conf/param.c .
        !           134:
        !           135: param.o: param.c Makefile
        !           136:        ${NORMAL_C_C}
        !           137:
        !           138: ioconf.o: ioconf.c
        !           139:        ${NORMAL_C}
        !           140:
        !           141: newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
        !           142:        sh $S/conf/newvers.sh
        !           143:        ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
        !           144:
        !           145:
        !           146: clean::
        !           147:        rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
        !           148:            [Ee]rrs linterrs makelinks assym.h.tmp assym.h genassym.o \
        !           149:            genassym
        !           150:
        !           151: lint:
        !           152:        @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
        !           153:            ${CFILES} ioconf.c param.c | \
        !           154:            grep -v 'static function .* unused'
        !           155:
        !           156: tags:
        !           157:        @echo "see $S/kern/Makefile for tags"
        !           158:
        !           159: links:
        !           160:        egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
        !           161:          sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
        !           162:        echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
        !           163:          sort -u | comm -23 - dontlink | \
        !           164:          sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
        !           165:        sh makelinks && rm -f dontlink
        !           166:
        !           167: SRCS=  ${MAC68K}/mac68k/locore.s \
        !           168:        param.c ioconf.c ${CFILES} ${SFILES}
        !           169: depend:: .depend
        !           170: .depend: ${SRCS} assym.h param.c
        !           171:        ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${MAC68K}/mac68k/locore.s
        !           172:        ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
        !           173:        ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
        !           174:        -if test -n "${SFILES}"; then \
        !           175:                ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}; \
        !           176:        fi
        !           177:        sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
        !           178:            ${CPPFLAGS} < ${MAC68K}/mac68k/genassym.cf
        !           179:        @sed -e 's/.*\.o:.* /assym.h: /' < assym.dep >> .depend
        !           180:        @rm -f assym.dep
        !           181:
        !           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: assym.h machdep.o: Makefile
        !           192:
        !           193: # depend on CPU configuration
        !           194: locore.o pmap.o trap.o: Makefile
        !           195:
        !           196:
        !           197: locore.o: ${MAC68K}/mac68k/locore.s assym.h
        !           198:        ${NORMAL_S}
        !           199:
        !           200: # The install target can be redefined by putting a
        !           201: # install-kernel-${MACHINE_NAME} target into /etc/mk.conf
        !           202: MACHINE_NAME!=  uname -n
        !           203: install: install-kernel-${MACHINE_NAME}
        !           204: .if !target(install-kernel-${MACHINE_NAME}})
        !           205: install-kernel-${MACHINE_NAME}:
        !           206:        rm -f /obsd
        !           207:        ln /bsd /obsd
        !           208:        cp bsd /nbsd
        !           209:        mv /nbsd /bsd
        !           210: .endif
        !           211:
        !           212: %RULES

CVSweb