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

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

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

CVSweb