Makefile.booters revision 1.27
11.27Ssimonb# $NetBSD: Makefile.booters,v 1.27 1999/11/27 23:55:23 simonb Exp $ 21.5Smellon 31.27Ssimonb# $S must correspond to the top of the 'sys' tree 41.27SsimonbS= ${.CURDIR}/../../../.. 51.27Ssimonb 61.27Ssimonb.BEGIN: ${.OBJDIR}/machine ${.OBJDIR}/pmax ${.OBJDIR}/mips 71.27Ssimonb${PROG} depend beforedepend all: ${.OBJDIR}/machine ${.OBJDIR}/pmax ${.OBJDIR}/mips 81.27SsimonbCLEANFILES+= machine pmax mips 91.18Ssimonb${.OBJDIR}/machine: 101.18Ssimonb -rm -f ${.TARGET} 111.18Ssimonb ln -s $S/arch/${MACHINE}/include ${.TARGET} 121.27Ssimonb${.OBJDIR}/pmax: 131.27Ssimonb -rm -f ${.TARGET} 141.27Ssimonb ln -s $S/arch/${MACHINE}/include ${.TARGET} 151.18Ssimonb${.OBJDIR}/mips: 161.18Ssimonb -rm -f ${.TARGET} 171.18Ssimonb ln -s $S/arch/mips/include mips 181.1Sderaadt 191.27SsimonbBINMODE?= 444 201.18Ssimonb 211.27Ssimonb.PATH: ${.CURDIR}/../common 221.18SsimonbAFLAGS+= -D_LOCORE -D_KERNEL 231.27Ssimonb# -I${.CURDIR}/../.. done by Makefile.inc 241.27SsimonbCPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -D_NO_PROM_DEFINES -I${.OBJDIR} -I${S} 251.27Ssimonb# compiler flags for smallest code size 261.27SsimonbCFLAGS= -Os -g -mmemcpy -mno-abicalls -G 128 271.27SsimonbLDBUG= -T $S/arch/mips/conf/stand.ldscript 281.27Ssimonb 291.27SsimonbNETBSD_VERS!= sh ${.CURDIR}/../../../../conf/osrelease.sh 301.27SsimonbCPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"' 311.27Ssimonb 321.27SsimonbPRIMARY_LOAD_ADDRESS?= 0x80700000 331.27SsimonbSECONDARY_LOAD_ADDRESS?=0x80710000 341.27Ssimonb 351.27Ssimonb.if defined(PRIMARY_PROG) 361.27SsimonbPROG= ${PRIMARY_PROG} 371.27SsimonbSRCS = start.S bootxx.c callvec.c 381.27SsimonbSRCS+= devopen.c conf.c rz.c 391.27SsimonbSRCS+= bootinit.S bootread.S clear_cache.S printf.S 401.27Ssimonb 411.27SsimonbLOAD_ADDRESS= ${PRIMARY_LOAD_ADDRESS} 421.27Ssimonb# Pick a number, any number... 431.27SsimonbPRIMARY_MAX_TOTAL!= expr 16 \* 1024 441.27Ssimonb 451.27SsimonbCPPFLAGS+= -DPRIMARY_BOOTBLOCK \ 461.27Ssimonb -DPRIMARY_LOAD_ADDRESS="${PRIMARY_LOAD_ADDRESS}" \ 471.27Ssimonb -DNO_GETCHAR \ 481.27Ssimonb -DLIBSA_NO_FS_SYMLINK -DLIBSA_NO_FS_WRITE \ 491.27Ssimonb -DLIBSA_NO_FS_CLOSE \ 501.27Ssimonb -DLIBSA_NO_DEV_CLOSE \ 511.27Ssimonb -DLIBSA_SINGLE_DEVICE=rz \ 521.27Ssimonb -D"rzioctl(x,y,z)=EINVAL" -D"rzclose(f)=0" \ 531.27Ssimonb -DLIBSA_NO_TWIDDLE \ 541.27Ssimonb -DLIBSA_NO_FD_CHECKING \ 551.27Ssimonb -DLIBSA_NO_RAW_ACCESS \ 561.27Ssimonb -DLIBSA_NO_DISKLABEL_MSGS \ 571.27Ssimonb -DALLOC_FIRST_FIT \ 581.27Ssimonb -DLIBSA_USE_MEMCPY -DLIBSA_USE_MEMSET 591.27Ssimonb 601.27SsimonbCHECKSIZE_CMD?= SIZE=${SIZE} sh ${.CURDIR}/../common/checksize.sh 611.27Ssimonb 621.27Ssimonb.elif defined(SECONDARY_PROG) 631.27SsimonbPROG= ${SECONDARY_PROG} 641.27SsimonbLOAD_ADDRESS= ${SECONDARY_LOAD_ADDRESS} 651.27SsimonbCPPFLAGS+= -DSECONDARY_BOOTBLOCK 661.27SsimonbVERS_O?= vers.o 671.27Ssimonb.else 681.27Ssimonb# XXX ? 691.27Ssimonb.endif 701.18Ssimonb 711.27Ssimonb### find out what to use for libkern 721.27SsimonbKERN_AS= library 731.27Ssimonb.include "${S}/lib/libkern/Makefile.inc" 741.27SsimonbLIBKERN= ${KERNLIB} 751.18Ssimonb 761.18Ssimonb### find out what to use for libz 771.27Ssimonb.if defined(PRIMARY_PROG) 781.27SsimonbLIBZ= 791.27Ssimonb.else 801.18SsimonbZ_AS= library 811.18Ssimonb.include "${S}/lib/libz/Makefile.inc" 821.18SsimonbLIBZ= ${ZLIB} 831.27Ssimonb.endif 841.18Ssimonb 851.27Ssimonb### find out what to use for libsa 861.27SsimonbSA_AS= library 871.27Ssimonb.if defined(PRIMARY_PROG) 881.27SsimonbSAMISCMAKEFLAGS+=SA_INCLUDE_NET=no 891.27Ssimonb.endif 901.27Ssimonb.if defined(SECONDARY_PROG) 911.27SsimonbSAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes 921.27Ssimonb# for now: 931.27SsimonbSAMISCMAKEFLAGS+=SA_INCLUDE_NET=no 941.22Ssimonb.endif 951.27Ssimonb.include "${S}/lib/libsa/Makefile.inc" 961.27SsimonbLIBSA= ${SALIB} 971.18Ssimonb 981.27SsimonbLIBS= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} 991.18Ssimonb 1001.18Ssimonb 1011.20Ssimonb${PROG}: ${OBJS} ${LIBS} 1021.27Ssimonb.if defined(VERS_O) 1031.27Ssimonb sh ${.CURDIR}/../common/newvers.sh ${.CURDIR}/version 1041.18Ssimonb ${COMPILE.c} vers.c 1051.20Ssimonb.endif 1061.27Ssimonb ${LD} -Map ${PROG}.map -N -x -Ttext ${LOAD_ADDRESS} ${LDBUG} \ 1071.27Ssimonb -e start -o ${PROG} ${OBJS} ${VERS_O} ${LIBS} 1081.27Ssimonb @${SIZE} ${PROG} 1091.27Ssimonb.if defined(CHECKSIZE_CMD) 1101.27Ssimonb @${CHECKSIZE_CMD} ${PROG} ${PRIMARY_MAX_LOAD} ${PRIMARY_MAX_TOTAL} || \ 1111.27Ssimonb (rm -f ${PROG} ; false) 1121.27Ssimonb.endif 1131.18Ssimonb 1141.27SsimonbCLEANFILES+= ${PROG}.map 1151.27Ssimonb.if defined(VERS_O) 1161.20SsimonbCLEANFILES+=vers.c vers.o 1171.20Ssimonb.endif 1181.20Ssimonb 1191.20Ssimonbcleandir distclean: cleanlibdir 1201.20Ssimonb 1211.20Ssimonbcleanlibdir: 1221.20Ssimonb rm -rf lib 1231.18Ssimonb 1241.18Ssimonb.include <bsd.prog.mk> 125