[BACK]Return to Makefile.hp300 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / sys / arch / hp300 / conf

Annotation of src/sys/arch/hp300/conf/Makefile.hp300, Revision 1.81

1.81    ! lukem       1: #      $NetBSD: Makefile.hp300,v 1.80 2001/10/26 06:45:36 jmc Exp $
1.20      cgd         2:
1.12      brezak      3: # Makefile for NetBSD
1.1       cgd         4: #
                      5: # This makefile is constructed from a machine description:
                      6: #      config machineid
                      7: # Most changes should be made in the machine description
1.14      mycroft     8: #      /sys/arch/hp300/conf/``machineid''
1.1       cgd         9: # after which you should do
1.31      mycroft    10: #      config machineid
1.1       cgd        11: # Machine generic makefile changes should be made in
1.14      mycroft    12: #      /sys/arch/hp300/conf/Makefile.hp300
1.1       cgd        13: # after which config should be rerun for all machines of that type.
1.79      thorpej    14:
                     15: MACHINE_ARCH=m68k
1.80      jmc        16: USETOOLS?=     no
                     17:
                     18: .include <bsd.own.mk>
1.1       cgd        19:
1.31      mycroft    20: # DEBUG is set to -g if debugging.
                     21: # PROF is set to -pg if profiling.
1.1       cgd        22:
1.61      thorpej    23: AR?=   ar
                     24: AS?=   as
1.36      mycroft    25: CC?=   cc
1.61      thorpej    26: CPP?=  cpp
1.36      mycroft    27: LD?=   ld
1.60      thorpej    28: LORDER?=lorder
1.40      mycroft    29: MKDEP?=        mkdep
1.60      thorpej    30: NM?=   nm
1.61      thorpej    31: RANLIB?=ranlib
1.59      lukem      32: SIZE?= size
1.74      tsutsui    33: STRIP?=        strip
1.60      thorpej    34: TSORT?=        tsort -q
1.61      thorpej    35:
1.59      lukem      36: COPTS?=        -O2
1.1       cgd        37:
                     38: # source tree is located via $S relative to the compilation directory
1.43      mycroft    39: .ifndef S
1.40      mycroft    40: S!=    cd ../../../..; pwd
1.43      mycroft    41: .endif
1.40      mycroft    42: HP300= $S/arch/hp300
1.1       cgd        43:
1.81    ! lukem      44: HAVE_EGCS!=    ${CC} --version | egrep "^(2\.[89]|egcs)" ; echo
1.41      mycroft    45: INCLUDES=      -I. -I$S/arch -I$S -nostdinc
1.78      mrg        46: CPPFLAGS=      ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL -D_KERNEL_OPT -Dhp300
1.66      augustss   47: CWARNFLAGS?=   -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes \
                     48:                -Wpointer-arith
1.75      thorpej    49: # XXX Delete -Wuninitialized for now, since the compiler doesn't
1.81    ! lukem      50: # XXX always get it right.  --thorpej
1.75      thorpej    51: CWARNFLAGS+=   -Wno-uninitialized
                     52: .if (${HAVE_EGCS} != "")
1.62      tv         53: CWARNFLAGS+=   -Wno-main
                     54: .endif
1.45      jonathan   55: CFLAGS=                ${DEBUG} ${COPTS} ${CWARNFLAGS} -msoft-float
1.35      mycroft    56: AFLAGS=                -x assembler-with-cpp -traditional-cpp -D_LOCORE
1.31      mycroft    57: LINKFLAGS=     -n -Ttext 0 -e start
1.71      tsutsui    58: STRIPFLAGS=    -g
1.69      mrg        59:
                     60: %INCLUDES
1.44      mycroft    61:
                     62: HOSTED_CC=     ${CC}
                     63: HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
                     64: HOSTED_CFLAGS= ${CFLAGS}
1.1       cgd        65:
1.9       cgd        66: ### find out what to use for libkern
1.65      drochner   67: KERN_AS=       obj
1.9       cgd        68: .include "$S/lib/libkern/Makefile.inc"
                     69: .ifndef PROF
                     70: LIBKERN=       ${KERNLIB}
                     71: .else
                     72: LIBKERN=       ${KERNLIB_PROF}
                     73: .endif
                     74:
1.23      christos   75: ### find out what to use for libcompat
                     76: .include "$S/compat/common/Makefile.inc"
                     77: .ifndef PROF
                     78: LIBCOMPAT=     ${COMPATLIB}
                     79: .else
                     80: LIBCOMPAT=     ${COMPATLIB_PROF}
                     81: .endif
                     82:
1.17      mycroft    83: ### for the Motorola 68040 Floating Point Software Product
                     84: .include "$S/arch/m68k/fpsp/Makefile.inc"
                     85:
1.42      mycroft    86: # compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
                     87: # HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
1.1       cgd        88:
1.31      mycroft    89: NORMAL_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
1.63      thorpej    90: NOPROF_C=      ${CC} ${CFLAGS} ${CPPFLAGS} -c $<
1.35      mycroft    91: NORMAL_S=      ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
1.1       cgd        92:
1.44      mycroft    93: HOSTED_C=      ${HOSTED_CC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
1.41      mycroft    94:
1.1       cgd        95: %OBJS
                     96:
                     97: %CFILES
                     98:
1.32      mycroft    99: #%SFILES
1.31      mycroft   100:
1.1       cgd       101: # load lines for config "xxx" will be emitted as:
                    102: # xxx: ${SYSTEM_DEP} swapxxx.o
                    103: #      ${SYSTEM_LD_HEAD}
                    104: #      ${SYSTEM_LD} swapxxx.o
                    105: #      ${SYSTEM_LD_TAIL}
1.31      mycroft   106: SYSTEM_OBJ=    locore.o ${FPSP} \
1.65      drochner  107:                param.o ioconf.o ${OBJS} ${LIBCOMPAT} ${LIBKERN}
1.1       cgd       108: SYSTEM_DEP=    Makefile ${SYSTEM_OBJ}
1.31      mycroft   109: SYSTEM_LD_HEAD=        @rm -f $@
                    110: SYSTEM_LD=     @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
                    111:                ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
1.59      lukem     112: SYSTEM_LD_TAIL=        @${SIZE} $@; chmod 755 $@
1.31      mycroft   113:
                    114: DEBUG?=
                    115: .if ${DEBUG} == "-g"
                    116: LINKFLAGS+=    -X
                    117: SYSTEM_LD_TAIL+=; \
1.70      cgd       118:                echo mv -f $@ $@.gdb; mv -f $@ $@.gdb; \
1.74      tsutsui   119:                echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
                    120:                ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
1.31      mycroft   121: .else
1.40      mycroft   122: LINKFLAGS+=    -S
1.31      mycroft   123: .endif
1.1       cgd       124:
                    125: %LOAD
                    126:
1.51      thorpej   127: assym.h: $S/kern/genassym.sh ${HP300}/hp300/genassym.cf
                    128:        sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
1.52      mycroft   129:            < ${HP300}/hp300/genassym.cf > assym.h.tmp && \
                    130:        mv -f assym.h.tmp assym.h
1.31      mycroft   131:
                    132: param.c: $S/conf/param.c
                    133:        rm -f param.c
                    134:        cp $S/conf/param.c .
                    135:
                    136: param.o: param.c Makefile
1.42      mycroft   137:        ${NORMAL_C}
1.31      mycroft   138:
                    139: ioconf.o: ioconf.c
                    140:        ${NORMAL_C}
                    141:
1.46      thorpej   142: newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
1.11      mycroft   143:        sh $S/conf/newvers.sh
1.31      mycroft   144:        ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
                    145:
1.58      christos  146: __CLEANKERNEL: .USE
                    147:        @echo "${.TARGET}ing the kernel objects"
1.37      cgd       148:        rm -f eddep *netbsd netbsd.gdb tags *.[io] [a-z]*.s \
1.52      mycroft   149:            [Ee]rrs linterrs makelinks assym.h.tmp assym.h
1.58      christos  150:
                    151: __CLEANDEPEND: .USE
                    152:        rm -f .depend
                    153:
                    154: clean: __CLEANKERNEL
                    155:
1.64      lukem     156: cleandir distclean: __CLEANKERNEL __CLEANDEPEND
1.1       cgd       157:
1.31      mycroft   158: lint:
1.49      perry     159:        @lint -hbxncez -Dvolatile= ${CPPFLAGS} -UKGDB \
1.56      mycroft   160:            ${CFILES} ioconf.c param.c | \
1.31      mycroft   161:            grep -v 'static function .* unused'
1.1       cgd       162:
1.31      mycroft   163: tags:
                    164:        @echo "see $S/kern/Makefile for tags"
1.1       cgd       165:
                    166: links:
                    167:        egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
                    168:          sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
                    169:        echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
                    170:          sort -u | comm -23 - dontlink | \
1.31      mycroft   171:          sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
1.1       cgd       172:        sh makelinks && rm -f dontlink
                    173:
1.31      mycroft   174: SRCS=  ${HP300}/hp300/locore.s \
1.37      cgd       175:        param.c ioconf.c ${CFILES} ${SFILES}
1.47      hpeyerl   176: depend: .depend
1.37      cgd       177: .depend: ${SRCS} assym.h param.c
1.40      mycroft   178:        ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${HP300}/hp300/locore.s
                    179:        ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
1.38      scottr    180:        -if test -n "${SFILES}"; then \
1.40      mycroft   181:                ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}; \
1.38      scottr    182:        fi
1.55      leo       183:        sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
                    184:          ${CPPFLAGS} < ${HP300}/hp300/genassym.cf
                    185:        @sed -e 's/.*\.o:.*\.c/assym.h:/' < assym.dep >> .depend
                    186:        @rm -f assym.dep
1.73      tron      187:
                    188: dependall: depend all
1.31      mycroft   189:
                    190:
                    191: # depend on root or device configuration
                    192: autoconf.o conf.o: Makefile
1.81    ! lukem     193:
        !           194: # depend on network or filesystem configuration
        !           195: uipc_proto.o vfs_conf.o: Makefile
1.1       cgd       196:
1.31      mycroft   197: # depend on maxusers
1.52      mycroft   198: machdep.o: Makefile
1.1       cgd       199:
1.81    ! lukem     200: # depend on CPU configuration
1.52      mycroft   201: dma.o hpux_machdep.o locore.o machdep.o pmap.o pmap_boostrap.o sys_machdep.o trap.o: Makefile
1.1       cgd       202:
1.14      mycroft   203:
1.31      mycroft   204: locore.o: ${HP300}/hp300/locore.s assym.h
                    205:        ${NORMAL_S}
1.76      hubertf   206:
                    207: # The install target can be redefined by putting a
                    208: # install-kernel-${MACHINE_NAME} target into /etc/mk.conf
                    209: MACHINE_NAME!=  uname -n
                    210: install: install-kernel-${MACHINE_NAME}
                    211: .if !target(install-kernel-${MACHINE_NAME}})
                    212: install-kernel-${MACHINE_NAME}:
                    213:        rm -f /onetbsd
                    214:        ln /netbsd /onetbsd
                    215:        cp netbsd /nnetbsd
                    216:        mv /nnetbsd /netbsd
                    217: .endif
1.1       cgd       218:
                    219: %RULES

CVSweb <webmaster@jp.NetBSD.org>