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

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

1.1     ! nbrk        1: #      $OpenBSD: Makefile.aviion,v 1.3 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/aviion/conf/``machineid''
        !             9: # after which you should do
        !            10: #       config machineid
        !            11: # Machine generic makefile changes should be made in
        !            12: #      /sys/arch/aviion/conf/Makefile.aviion
        !            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: AVIION=        $S/arch/aviion
        !            35: M88K=  $S/arch/m88k
        !            36:
        !            37: INCLUDES=      -nostdinc -I. -I$S -I$S/arch
        !            38: CPPFLAGS=      ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -Daviion -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 0x1000 -e start
        !            51: LINKFLAGS=     -Ttext 0x1000 -e start
        !            52: STRIPFLAGS=    -d
        !            53:
        !            54: HOSTCC?=       ${CC}
        !            55: HOSTED_CPPFLAGS?=${CPPFLAGS:S/^-nostdinc$//}
        !            56: HOSTED_CFLAGS?=        ${CFLAGS}
        !            57:
        !            58: ### CPU configuration
        !            59:
        !            60: ### find out what to use for libkern
        !            61: .include "$S/lib/libkern/Makefile.inc"
        !            62: .ifndef PROF
        !            63: LIBKERN=       ${KERNLIB}
        !            64: .else
        !            65: LIBKERN=       ${KERNLIB_PROF}
        !            66: .endif
        !            67:
        !            68: ### find out what to use for libcompat
        !            69: .include "$S/compat/common/Makefile.inc"
        !            70: .ifndef PROF
        !            71: LIBCOMPAT=     ${COMPATLIB}
        !            72: .else
        !            73: LIBCOMPAT=     ${COMPATLIB_PROF}
        !            74: .endif
        !            75:
        !            76: # compile rules: rules are named ${TYPE}_${SUFFIX}${CONFIG_DEP}
        !            77: # where TYPE is NORMAL, DRIVER, or PROFILE}; SUFFIX is the file suffix,
        !            78: # capitalized (e.g. C for a .c file), and CONFIG_DEP is _C if the file
        !            79: # is marked as config-dependent.
        !            80:
        !            81: NORMAL_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
        !            82: NORMAL_S=      ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
        !            83:
        !            84: HOSTED_C=      ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
        !            85:
        !            86: PROFILE_C=     ${CC} -S -c ${CFLAGS} ${CPPFLAGS} $<; \
        !            87:                sed -e s/_mcount/mcount/ -e s/subrmcount/subr_mcount/ <$*.s | \
        !            88:                ${AS} -o $@; \
        !            89:                rm -f $*.s
        !            90:
        !            91: %OBJS
        !            92:
        !            93: %CFILES
        !            94:
        !            95: %SFILES
        !            96:
        !            97: # load lines for config "xxx" will be emitted as:
        !            98: # xxx: ${SYSTEM_DEP} swapxxx.o
        !            99: #      ${SYSTEM_LD_HEAD}
        !           100: #      ${SYSTEM_LD} swapxxx.o
        !           101: #      ${SYSTEM_LD_TAIL}
        !           102: # Kernel is linked as a ZMAGIC executable, with start at 10020
        !           103: SYSTEM_OBJ=    locore.o \
        !           104:                param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT}
        !           105: SYSTEM_DEP=    Makefile ${SYSTEM_OBJ}
        !           106: SYSTEM_LD_HEAD=        @rm -f $@
        !           107: SYSTEM_LD=     @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
        !           108:                ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
        !           109: SYSTEM_LD_TAIL=        @${SIZE} $@; chmod 755 $@;
        !           110:
        !           111: DEBUG?=
        !           112: .if ${DEBUG} == "-g"
        !           113: LINKFLAGS+=    -X
        !           114: SYSTEM_LD_TAIL+=; \
        !           115:                echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \
        !           116:                echo ${STRIP} ${STRIPFLAGS} $@; ${STRIP} ${STRIPFLAGS} $@
        !           117: .else
        !           118: LINKFLAGS+=    -x
        !           119: .endif
        !           120:
        !           121: %LOAD
        !           122:
        !           123: assym.h: $S/kern/genassym.sh ${M88K}/m88k/genassym.cf Makefile
        !           124:        sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
        !           125:            ${PARAM} < ${M88K}/m88k/genassym.cf > assym.h.tmp && \
        !           126:            mv -f assym.h.tmp assym.h
        !           127:
        !           128: param.c: $S/conf/param.c
        !           129:        rm -f param.c
        !           130:        cp $S/conf/param.c .
        !           131:
        !           132: param.o: param.c Makefile
        !           133:        ${NORMAL_C}
        !           134:
        !           135: ioconf.o: ioconf.c
        !           136:        ${NORMAL_C}
        !           137:
        !           138: newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
        !           139:        sh $S/conf/newvers.sh
        !           140:        ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
        !           141:
        !           142: clean::
        !           143:        rm -f eddep *bsd bsd.gdb tags *.[io] [a-z]*.s \
        !           144:                [Ee]rrs linterrs makelinks assym.h
        !           145:
        !           146: lint:
        !           147:        @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} ${PARAM} -UKGDB \
        !           148:            ${CFILES} ioconf.c param.c | \
        !           149:            grep -v 'struct/union .* never defined' | \
        !           150:            grep -v 'possible pointer alignment problem'
        !           151:
        !           152: tags:
        !           153:        @echo "see $S/kern/Makefile for tags"
        !           154:
        !           155: links:
        !           156:        egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
        !           157:          sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
        !           158:        echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
        !           159:          sort -u | comm -23 - dontlink | \
        !           160:          sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
        !           161:        sh makelinks && rm -f dontlink
        !           162:
        !           163: SRCS=  param.c ioconf.c ${CFILES} ${SFILES}
        !           164:
        !           165: depend:: .depend
        !           166: .depend: ${SRCS} assym.h param.c
        !           167:        ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
        !           168: .if !empty(SFILES)
        !           169:        ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
        !           170: .endif
        !           171:        sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
        !           172:            ${CPPFLAGS} < ${M88K}/m88k/genassym.cf
        !           173:        @sed -e 's/.*\.o:.* /assym.h: /' < assym.dep >> .depend
        !           174:        @rm -f assym.dep
        !           175:
        !           176: # depend on root or device configuration
        !           177: autoconf.o conf.o: Makefile
        !           178:
        !           179: # depend on network or filesystem configuration
        !           180: uipc_domain.o uipc_proto.o vfs_conf.o: Makefile
        !           181: if_tun.o if_loop.o if_ethersubr.o: Makefile
        !           182: in_proto.o: Makefile
        !           183:
        !           184: # depend on maxusers
        !           185: assym.h machdep.o: Makefile
        !           186:
        !           187: # depend on CPU configuration
        !           188: locore.o machdep.o: Makefile
        !           189:
        !           190: locore.o: ${AVIION}/aviion/locore.S assym.h
        !           191:        ${NORMAL_S}
        !           192:
        !           193: # The install target can be redefined by putting a
        !           194: # install-kernel-${MACHINE_NAME} target into /etc/mk.conf
        !           195: MACHINE_NAME!=  uname -n
        !           196: install: install-kernel-${MACHINE_NAME}
        !           197: .if !target(install-kernel-${MACHINE_NAME}})
        !           198: install-kernel-${MACHINE_NAME}:
        !           199:        rm -f /obsd
        !           200:        ln /bsd /obsd
        !           201:        cp bsd /nbsd
        !           202:        mv /nbsd /bsd
        !           203: .endif
        !           204:
        !           205: %RULES

CVSweb