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

Annotation of sys/arch/hppa64/conf/Makefile.hppa64, Revision 1.1.1.1

1.1       nbrk        1: #      $OpenBSD: Makefile.hppa64,v 1.4 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/hppa64/conf/``machineid''
                      9: # after which you should do
                     10: #      config machineid
                     11: # Machine generic makefile changes should be made in
                     12: #      /sys/arch/hppa64/conf/Makefile.hppa64
                     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 if debugging.
                     22: # PROF is set to -pg if profiling.
                     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: HPPA=  $S/arch/hppa64
                     35:
                     36: INCLUDES=      -I. -I$S -I$S/arch -nostdinc
                     37: CPPFLAGS=      ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL \
                     38:                -Dhppa64
                     39: CWARNFLAGS=    -Werror -Wall -Wstrict-prototypes -Wno-uninitialized \
                     40:                -Wno-format -Wno-main \
                     41:                -Wstack-larger-than-2047
                     42: CMACHFLAGS=    -fno-stack-protector -fno-builtin-log -fno-builtin-printf \
                     43:                -fno-builtin-snprintf -fno-builtin-vsnprintf
                     44: COPTS?=                -Os -mpa-risc-2-0 -mno-space-regs -mdisable-fpregs
                     45: CFLAGS=                ${DEBUG} ${COPTS} ${CWARNFLAGS} ${CMACHFLAGS} ${PIPE}
                     46: AFLAGS=                -x assembler-with-cpp -traditional-cpp -D_LOCORE
                     47: LINKFLAGS=     -X -T ${HPPA}/conf/ld.script -Ttext 80000 --warn-common
                     48: STRIPFLAGS=    -g -x
                     49:
                     50: .if ${IDENT:M-DDDB} != ""
                     51: CFLAGS+=       -fno-omit-frame-pointer
                     52: .endif
                     53:
                     54: HOSTCC?=       ${CC}
                     55: HOSTED_CPPFLAGS=${CPPFLAGS:S/^-nostdinc$//}
                     56: HOSTED_CFLAGS= ${CFLAGS}
                     57:
                     58: # this line must be there because libkern needs assym.h generated early
                     59: depend:: .NOTMAIN .depend
                     60:
                     61: ### find out what to use for libkern
                     62: .include "$S/lib/libkern/Makefile.inc"
                     63: .ifndef PROF
                     64: LIBKERN=       ${KERNLIB}
                     65: .else
                     66: LIBKERN=       ${KERNLIB_PROF}
                     67: .endif
                     68:
                     69: ### find out what to use for libcompat
                     70: .include "$S/compat/common/Makefile.inc"
                     71: .ifndef PROF
                     72: LIBCOMPAT=     ${COMPATLIB}
                     73: .else
                     74: LIBCOMPAT=     ${COMPATLIB_PROF}
                     75: .endif
                     76:
                     77: # compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
                     78: # HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
                     79:
                     80: NORMAL_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
                     81: NORMAL_S=      ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
                     82:
                     83: HOSTED_C=      ${HOSTCC} ${HOSTED_CFLAGS} ${HOSTED_CPPFLAGS} -c $<
                     84:
                     85: %OBJS
                     86:
                     87: %CFILES
                     88:
                     89: %SFILES
                     90:
                     91: SYSTEM_OBJ=    locore.o param.o ioconf.o ${OBJS} \
                     92:                ${LIBKERN} ${LIBCOMPAT} ${LIBSPMATH}
                     93: SYSTEM_DEP=    Makefile ${SYSTEM_OBJ}
                     94: SYSTEM_LD_HEAD=        @rm -f $@
                     95: SYSTEM_LD=     @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
                     96:                ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
                     97: SYSTEM_LD_TAIL=        @${SIZE} $@; chmod 755 $@
                     98:
                     99: DEBUG?=
                    100: .if ${DEBUG} == "-g"
                    101: SYSTEM_LD_TAIL+=; \
                    102:                echo mv $@ $@.gdb; rm -f $@.gdb; mv $@ $@.gdb; \
                    103:                echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
                    104:                ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
                    105: .else
                    106: LINKFLAGS+=    -S
                    107: .endif
                    108:
                    109: %LOAD
                    110:
                    111: assym.h: $S/kern/genassym.sh ${HPPA}/hppa64/genassym.cf Makefile
                    112:        sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} \
                    113:            < ${HPPA}/hppa64/genassym.cf > assym.h.tmp && \
                    114:            mv -f assym.h.tmp assym.h
                    115:
                    116: param.c: $S/conf/param.c
                    117:        rm -f param.c
                    118:        cp $S/conf/param.c .
                    119:
                    120: param.o: param.c Makefile
                    121:        ${NORMAL_C}
                    122:
                    123: ioconf.o: ioconf.c
                    124:        ${NORMAL_C}
                    125:
                    126: newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
                    127:        sh $S/conf/newvers.sh
                    128:        ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
                    129:
                    130:
                    131: clean::
                    132:        rm -f eddep *bsd bsd.map bsd.gdb tags *.[io] [a-z]*.s \
                    133:            [Ee]rrs linterrs makelinks assym.h
                    134:
                    135: lint:
                    136:        @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
                    137:            ${CFILES} ioconf.c param.c | \
                    138:            grep -v 'static function .* unused'
                    139:
                    140: tags:
                    141:        @echo "see $S/kern/Makefile for tags"
                    142:
                    143: links:
                    144:        egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
                    145:          sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
                    146:        echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
                    147:          sort -u | comm -23 - dontlink | \
                    148:          sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
                    149:        sh makelinks && rm -f dontlink
                    150:
                    151: SRCS=  ${HPPA}/hppa64/locore.S \
                    152:        param.c ioconf.c ${CFILES} ${SFILES}
                    153: .depend: ${SRCS} assym.h param.c
                    154:        ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${HPPA}/hppa64/locore.S
                    155:        ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
                    156:        -if test -n "${SFILES}"; then \
                    157:                ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}; \
                    158:        fi
                    159:        sh $S/kern/genassym.sh ${MKDEP} -f assym.dep ${CFLAGS} \
                    160:            ${CPPFLAGS} < ${HPPA}/hppa64/genassym.cf
                    161:        @sed -e 's/.*\.o:.* /assym.h: /' < assym.dep >> .depend
                    162:        @rm -f assym.dep
                    163:
                    164: # depend on root or device configuration
                    165: autoconf.o conf.o: Makefile
                    166:
                    167: # depend on network or filesystem configuration
                    168: uipc_proto.o vfs_conf.o: Makefile
                    169:
                    170: # depend on maxusers
                    171: assym.h machdep.o: Makefile
                    172:
                    173: # depend on CPU configuration
                    174: locore.o machdep.o trap.o: Makefile
                    175:
                    176:
                    177: locore.o: ${HPPA}/hppa64/locore.S assym.h
                    178:        ${NORMAL_S}
                    179: fpemu.o: assym.h
                    180:
                    181: # The install target can be redefined by putting a
                    182: # install-kernel-${MACHINE_NAME} target into /etc/mk.conf
                    183: MACHINE_NAME!=  uname -n
                    184: install: install-kernel-${MACHINE_NAME}
                    185: .if !target(install-kernel-${MACHINE_NAME}})
                    186: install-kernel-${MACHINE_NAME}:
                    187:        rm -f /obsd
                    188:        ln /bsd /obsd
                    189:        cp bsd /nbsd
                    190:        mv /nbsd /bsd
                    191: .endif
                    192:
                    193: %RULES

CVSweb