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

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

1.1       nbrk        1: #      $OpenBSD: Makefile.sgi,v 1.16 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/sgi/conf/``machineid''
                      9: # after which you should do
                     10: #       config ``machineid''
                     11: # Machine generic makefile changes should be made in
                     12: #      /sys/arch/sgi/conf/Makefile.``machinetype''
                     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:
                     22: # DEBUG is set to -g if debugging
                     23: # PROF is set to -pg if profiling
                     24:
                     25: .include <bsd.own.mk>
                     26:
                     27: AS?=   as
                     28: CC?=   cc
                     29: MKDEP?=        mkdep
                     30: SIZE?= size
                     31: CPP?=  cpp
                     32: LD?=   ld ${ENDIAN}
                     33: STRIP?=        strip
                     34: TOUCH?=        touch
                     35:
                     36: CPP+=${ENDIAN}
                     37: CC+=${ENDIAN}
                     38: AS+=${ENDIAN}
                     39: LD+=${ENDIAN}
                     40:
                     41: # source tree is located via $S relative to the compilation directory
                     42: .ifndef S
                     43: S!=    cd ../../../..; pwd
                     44: .endif
                     45: SGI=$S/arch/sgi
                     46: MIPS64=        $S/arch/mips64
                     47:
                     48: INCLUDES=      -I. -I$S -I$S/arch -nostdinc
                     49: CPPFLAGS=      ${INCLUDES} ${IDENT} -D_KERNEL -D__sgi__
                     50: CDIAGFLAGS=    -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes \
                     51:                -Wno-uninitialized -Wno-format -Wno-main \
                     52:                -Wstack-larger-than-2047
                     53: CMACHFLAGS+=   -mno-abicalls ${ABI} -msoft-float \
                     54:                -fno-builtin-printf -fno-builtin-log
                     55: .if ${IDENT:M-DNO_PROPOLICE}
                     56: CMACHFLAGS+=   -fno-stack-protector
                     57: .endif
                     58: COPTS?=                -O2
                     59: CFLAGS=                ${DEBUG} ${CDIAGFLAGS} ${CMACHFLAGS} ${COPTS} ${PIPE}
                     60: AFLAGS=                -x assembler-with-cpp -traditional-cpp \
                     61:                -mno-abicalls ${ABI} -D_LOCORE
                     62: STRIPFLAGS=    -g -X -x
                     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: NORMAL_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
                     81: NORMAL_C_C=    ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} ${PARAM} -c $<
                     82: NORMAL_S=      ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
                     83: NORMAL_S_C=    ${AS}  ${COPTS} ${PARAM} $< -o $@
                     84:
                     85: %OBJS
                     86:
                     87: %CFILES
                     88:
                     89: %SFILES
                     90:
                     91: # load lines for config "xxx" will be emitted as:
                     92: # xxx: ${SYSTEM_DEP} swapxxx.o
                     93: #      ${SYSTEM_LD_HEAD}
                     94: #      ${SYSTEM_LD} swapxxx.o
                     95: #      ${SYSTEM_LD_TAIL}
                     96:
                     97: SYSTEM_OBJ=    locore.o ${OBJS} param.o ioconf.o \
                     98:                ${LIBKERN} ${LIBCOMPAT}
                     99: #
                    100: SYSTEM_DEP=    Makefile ${SYSTEM_OBJ}
                    101: SYSTEM_LD_HEAD=        rm -f $@
                    102: SYSTEM_LD=     @if [ X${DEBUG} = X-g ]; \
                    103:                then strip=-X; \
                    104:                else strip=-x; \
                    105:                fi; \
                    106:                echo ${LD} $$strip -o $@ -e start -T ${SGI}/conf/ld.script \
                    107:                        -Ttext=${LINK_ADDRESS} '$${SYSTEM_OBJ}' vers.o; \
                    108:                ${LD} $$strip -o $@ -e start -T ${SGI}/conf/ld.script \
                    109:                        -Ttext=${LINK_ADDRESS} ${SYSTEM_OBJ} vers.o
                    110: #
                    111: SYSTEM_LD_TAIL=        chmod 755 $@; \
                    112:                ${SIZE} $@
                    113:
                    114: DEBUG?=
                    115: .if ${DEBUG} == "-g"
                    116: SYSTEM_LD_TAIL+=; \
                    117:                echo mv $@ $@.gdb; rm -f $@.gdb; mv $@ $@.gdb; \
                    118:                echo ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb; \
                    119:                ${STRIP} ${STRIPFLAGS} -o $@ $@.gdb
                    120: .endif
                    121:
                    122: %LOAD
                    123:
                    124: newvers:
                    125:        sh $S/conf/newvers.sh
                    126:        ${CC} $(CFLAGS) -c vers.c
                    127:
                    128: clean::
                    129:        rm -f eddep bsd bsd.gdb bsd.ecoff tags *.o locore.i [a-z]*.s \
                    130:            Errs errs linterrs makelinks
                    131:
                    132: lint: /tmp param.c
                    133:        @lint -hbxn -DGENERIC -Dvolatile= ${COPTS} ${PARAM} -UKGDB \
                    134:            ${CFILES} ioconf.c param.c
                    135:
                    136: symbols.sort: ${SGI}/sgi/symbols.raw
                    137:        grep -v '^#' ${SGI}/sgi/symbols.raw \
                    138:            | sed 's/^  //' | sort -u > symbols.sort
                    139:
                    140: locore.o: ${SGI}/sgi/locore.S assym.h
                    141:        ${NORMAL_S}
                    142:
                    143: # the following are necessary because the files depend on the types of
                    144: # cpu's included in the system configuration
                    145: clock.o machdep.o autoconf.o conf.o locore.o: Makefile
                    146:
                    147: # depend on network configuration
                    148: uipc_domain.o uipc_proto.o vfs_conf.o: Makefile
                    149: if_tun.o if_loop.o if_ethersubr.o: Makefile
                    150: if_arp.o if_ether.o: Makefile
                    151: ip_input.o ip_output.o in_pcb.o in_proto.o: Makefile
                    152: tcp_subr.o tcp_timer.o tcp_output.o: Makefile
                    153:
                    154: assym.h: $S/kern/genassym.sh ${SGI}/sgi/genassym.cf Makefile
                    155:        sh $S/kern/genassym.sh ${CC} ${CFLAGS} ${CPPFLAGS} \
                    156:            ${PARAM} < ${SGI}/sgi/genassym.cf > assym.h.tmp && \
                    157:            mv -f assym.h.tmp assym.h
                    158:
                    159: links:
                    160:        egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
                    161:          sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
                    162:        echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
                    163:          sort -u | comm -23 - dontlink | \
                    164:          sed 's,../.*/\(.*.o\),rm -f \1;ln -s ../GENERIC/\1 \1,' > makelinks
                    165:        sh makelinks && rm -f dontlink
                    166:
                    167: tags:
                    168:        @echo "see $S/kern/Makefile for tags"
                    169:
                    170: ioconf.o: ioconf.c
                    171:        ${NORMAL_C}
                    172:
                    173: param.c: $S/conf/param.c
                    174:        rm -f param.c
                    175:        cp $S/conf/param.c .
                    176:
                    177: param.o: param.c Makefile
                    178:        ${NORMAL_C_C}
                    179:
                    180: newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
                    181:        sh $S/conf/newvers.sh
                    182:        ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
                    183:
                    184: depend:: .depend
                    185: .depend: ${SRCS} assym.h param.c
                    186:        ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${SGI}/sgi/locore.S
                    187:        ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
                    188: #      ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
                    189:
                    190: # The install target can be redefined by putting a
                    191: # install-kernel-${MACHINE_NAME} target into /etc/mk.conf
                    192: MACHINE_NAME!=  uname -n
                    193: install: install-kernel-${MACHINE_NAME}
                    194: .if !target(install-kernel-${MACHINE_NAME}})
                    195: install-kernel-${MACHINE_NAME}:
                    196:        rm -f /obsd
                    197:        ln /bsd /obsd
                    198:        cp bsd /nbsd
                    199:        mv /nbsd /bsd
                    200: .endif
                    201:
                    202: %RULES

CVSweb