[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.76

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

CVSweb <webmaster@jp.NetBSD.org>