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

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

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

CVSweb