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

Annotation of src/sys/arch/i386/conf/Makefile.i386, Revision 1.72

1.72    ! jtk         1: #      $NetBSD: Makefile.i386,v 1.71 1996/08/12 00:51:40 mycroft Exp $
1.62      mycroft     2:
1.8       cgd         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.36      deraadt     8: #      /sys/arch/i386/conf/``machineid''
1.1       cgd         9: # after which you should do
1.62      mycroft    10: #      config machineid
                     11: # Machine generic makefile changes should be made in
1.36      deraadt    12: #      /sys/arch/i386/conf/Makefile.i386
1.42      mycroft    13: # after which config should be rerun for all machines of that type.
1.1       cgd        14: #
1.42      mycroft    15: # N.B.: NO DEPENDENCIES ON FOLLOWING FLAGS ARE VISIBLE TO MAKEFILE
1.1       cgd        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
1.42      mycroft    20:
1.62      mycroft    21: # DEBUG is set to -g if debugging.
                     22: # PROF is set to -pg if profiling.
                     23:
1.65      mycroft    24: CC?=   cc
                     25: LD?=   ld
1.68      mycroft    26: MKDEP?=        mkdep
1.65      mycroft    27: STRIP?=        strip -d
1.72    ! jtk        28: APMSTRIP?=     strip
1.65      mycroft    29: TOUCH?=        touch -f -c
1.1       cgd        30:
1.42      mycroft    31: # source tree is located via $S relative to the compilation directory
1.68      mycroft    32: S!=    cd ../../../..; pwd
                     33: I386=  $S/arch/i386
1.1       cgd        34:
1.69      mycroft    35: INCLUDES=      -I. -I$S/arch -I$S -nostdinc
1.71      mycroft    36: CPPFLAGS=      ${INCLUDES} ${IDENT} ${PARAM} -D_KERNEL \
                     37:                -Di386
1.68      mycroft    38: CWARNFLAGS=    -Werror -Wreturn-type
                     39: CFLAGS=                ${DEBUG} ${CWARNFLAGS} -O2
1.64      mycroft    40: AFLAGS=                -x assembler-with-cpp -traditional-cpp -D_LOCORE
1.62      mycroft    41: LINKFLAGS=     -z -Ttext F8100000 -e start
1.1       cgd        42:
1.33      cgd        43: ### find out what to use for libkern
                     44: .include "$S/lib/libkern/Makefile.inc"
                     45: .ifndef PROF
                     46: LIBKERN=       ${KERNLIB}
                     47: .else
                     48: LIBKERN=       ${KERNLIB_PROF}
                     49: .endif
                     50:
1.56      christos   51: ### find out what to use for libcompat
                     52: .include "$S/compat/common/Makefile.inc"
                     53: .ifndef PROF
                     54: LIBCOMPAT=     ${COMPATLIB}
                     55: .else
                     56: LIBCOMPAT=     ${COMPATLIB_PROF}
                     57: .endif
                     58:
1.71      mycroft    59: # compile rules: rules are named ${TYPE}_${SUFFIX} where TYPE is NORMAL or
                     60: # HOSTED}, and SUFFIX is the file suffix, capitalized (e.g. C for a .c file).
1.42      mycroft    61:
1.62      mycroft    62: NORMAL_C=      ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c $<
1.64      mycroft    63: NORMAL_S=      ${CC} ${AFLAGS} ${CPPFLAGS} -c $<
1.42      mycroft    64:
1.71      mycroft    65: HOSTED_C=      ${NORMAL_C:S/^-pg$//:S/^-p$//:S/^-nostdinc$//}
1.69      mycroft    66:
1.1       cgd        67: %OBJS
                     68:
                     69: %CFILES
                     70:
1.62      mycroft    71: %SFILES
                     72:
1.42      mycroft    73: # load lines for config "xxx" will be emitted as:
                     74: # xxx: ${SYSTEM_DEP} swapxxx.o
                     75: #      ${SYSTEM_LD_HEAD}
                     76: #      ${SYSTEM_LD} swapxxx.o
                     77: #      ${SYSTEM_LD_TAIL}
1.62      mycroft    78: SYSTEM_OBJ=    locore.o \
1.66      cgd        79:                param.o ioconf.o ${OBJS} ${LIBKERN} ${LIBCOMPAT}
1.42      mycroft    80: SYSTEM_DEP=    Makefile ${SYSTEM_OBJ}
                     81: SYSTEM_LD_HEAD=        rm -f $@
1.62      mycroft    82: SYSTEM_LD=     @echo ${LD} ${LINKFLAGS} -o $@ '$${SYSTEM_OBJ}' vers.o; \
                     83:                ${LD} ${LINKFLAGS} -o $@ ${SYSTEM_OBJ} vers.o
                     84: SYSTEM_LD_TAIL=        @size $@; chmod 755 $@
                     85:
                     86: DEBUG?=
                     87: .if ${DEBUG} == "-g"
                     88: LINKFLAGS+=    -X
                     89: SYSTEM_LD_TAIL+=; \
                     90:                echo cp $@ $@.gdb; rm -f $@.gdb; cp $@ $@.gdb; \
                     91:                echo ${STRIP} $@; ${STRIP} $@
                     92: .else
1.68      mycroft    93: LINKFLAGS+=    -S
1.62      mycroft    94: .endif
1.42      mycroft    95:
1.1       cgd        96: %LOAD
1.50      mycroft    97:
1.62      mycroft    98: assym.h: genassym
                     99:        ./genassym >assym.h
1.1       cgd       100:
1.62      mycroft   101: genassym: genassym.o
                    102:        ${CC} -o $@ genassym.o
1.42      mycroft   103:
1.62      mycroft   104: genassym.o: ${I386}/i386/genassym.c
1.71      mycroft   105:        ${HOSTED_C}
1.1       cgd       106:
1.62      mycroft   107: param.c: $S/conf/param.c
                    108:        rm -f param.c
                    109:        cp $S/conf/param.c .
1.1       cgd       110:
1.62      mycroft   111: param.o: param.c Makefile
1.71      mycroft   112:        ${NORMAL_C}
1.1       cgd       113:
1.62      mycroft   114: ioconf.o: ioconf.c
                    115:        ${NORMAL_C}
1.42      mycroft   116:
1.62      mycroft   117: newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP}
                    118:        sh $S/conf/newvers.sh
                    119:        ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c
1.1       cgd       120:
                    121:
1.62      mycroft   122: clean::
1.66      cgd       123:        rm -f eddep *netbsd netbsd.gdb tags *.[io] [a-z]*.s \
1.62      mycroft   124:            [Ee]rrs linterrs makelinks genassym genassym.o assym.h
1.1       cgd       125:
1.62      mycroft   126: lint:
1.71      mycroft   127:        @lint -hbxncez -DGENERIC -Dvolatile= ${CPPFLAGS} -UKGDB \
1.62      mycroft   128:            ${I386}/i386/Locore.c ${CFILES} ${I386}/i386/swapgeneric.c \
                    129:            ioconf.c param.c | \
                    130:            grep -v 'static function .* unused'
1.1       cgd       131:
1.62      mycroft   132: tags:
                    133:        @echo "see $S/kern/Makefile for tags"
1.1       cgd       134:
                    135: links:
                    136:        egrep '#if' ${CFILES} | sed -f $S/conf/defines | \
                    137:          sed -e 's/:.*//' -e 's/\.c/.o/' | sort -u > dontlink
                    138:        echo ${CFILES} | tr -s ' ' '\12' | sed 's/\.c/.o/' | \
                    139:          sort -u | comm -23 - dontlink | \
1.62      mycroft   140:          sed 's,../.*/\(.*.o\),rm -f \1; ln -s ../GENERIC/\1 \1,' > makelinks
1.1       cgd       141:        sh makelinks && rm -f dontlink
                    142:
1.72    ! jtk       143: # depend on APM
        !           144: .include "${I386}/apm_init/Makefile.inc"
        !           145: locore.o: ${APMINC}
        !           146:
1.62      mycroft   147: SRCS=  ${I386}/i386/locore.s \
1.66      cgd       148:        param.c ioconf.c ${CFILES} ${SFILES}
1.67      mycroft   149: depend:: .depend
1.72    ! jtk       150: .depend: ${SRCS} assym.h param.c ${APMINC}
1.68      mycroft   151:        ${MKDEP} ${AFLAGS} ${CPPFLAGS} ${I386}/i386/locore.s
                    152:        ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} param.c ioconf.c ${CFILES}
                    153:        ${MKDEP} -a ${AFLAGS} ${CPPFLAGS} ${SFILES}
1.71      mycroft   154:        ${MKDEP} -a ${CFLAGS} ${CPPFLAGS} ${I386}/i386/genassym.c
1.62      mycroft   155:
                    156:
                    157: # depend on root or device configuration
                    158: autoconf.o conf.o: Makefile
                    159:
                    160: # depend on network or filesystem configuration
                    161: uipc_proto.o vfs_conf.o: Makefile
1.1       cgd       162:
1.62      mycroft   163: # depend on maxusers
                    164: genassym.o machdep.o: Makefile
1.1       cgd       165:
1.62      mycroft   166: # depend on CPU configuration
                    167: locore.o machdep.o: Makefile
1.1       cgd       168:
1.2       cgd       169:
1.62      mycroft   170: locore.o: ${I386}/i386/locore.s assym.h
                    171:        ${NORMAL_S}
1.1       cgd       172:
                    173: %RULES

CVSweb <webmaster@jp.NetBSD.org>