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

Annotation of sys/arch/mvme68k/conf/Makefile.mvme68k, Revision 1.1.1.1

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

CVSweb