Makefile.booters revision 1.32
11.32Ssimonb# $NetBSD: Makefile.booters,v 1.32 2001/10/05 05:03:30 simonb Exp $ 21.5Smellon 31.27Ssimonb# $S must correspond to the top of the 'sys' tree 41.27SsimonbS= ${.CURDIR}/../../../.. 51.27Ssimonb 61.28Smycroft.BEGIN: machine pmax mips 71.28Smycroft${PROG} realdepend realall: machine pmax mips 81.27SsimonbCLEANFILES+= machine pmax mips 91.28Smycroftmachine: 101.18Ssimonb -rm -f ${.TARGET} 111.18Ssimonb ln -s $S/arch/${MACHINE}/include ${.TARGET} 121.28Smycroftpmax: 131.27Ssimonb -rm -f ${.TARGET} 141.27Ssimonb ln -s $S/arch/${MACHINE}/include ${.TARGET} 151.28Smycroftmips: 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.32SsimonbCPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -D_NO_PROM_DEFINES \ 251.32Ssimonb -I${.OBJDIR} -I${S} 261.27Ssimonb# compiler flags for smallest code size 271.27SsimonbCFLAGS= -Os -g -mmemcpy -mno-abicalls -G 128 281.32SsimonbOFORMAT= --oformat elf32-littlemips 291.32SsimonbLDBUG= -T $S/arch/mips/conf/stand.ldscript 301.27Ssimonb 311.27SsimonbNETBSD_VERS!= sh ${.CURDIR}/../../../../conf/osrelease.sh 321.27SsimonbCPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"' 331.27Ssimonb 341.27SsimonbPRIMARY_LOAD_ADDRESS?= 0x80700000 351.27SsimonbSECONDARY_LOAD_ADDRESS?=0x80710000 361.27Ssimonb 371.27Ssimonb.if defined(PRIMARY_PROG) 381.27SsimonbPROG= ${PRIMARY_PROG} 391.27SsimonbSRCS = start.S bootxx.c callvec.c 401.27SsimonbSRCS+= devopen.c conf.c rz.c 411.27SsimonbSRCS+= bootinit.S bootread.S clear_cache.S printf.S 421.27Ssimonb 431.27SsimonbLOAD_ADDRESS= ${PRIMARY_LOAD_ADDRESS} 441.27Ssimonb# Pick a number, any number... 451.27SsimonbPRIMARY_MAX_TOTAL!= expr 16 \* 1024 461.27Ssimonb 471.27SsimonbCPPFLAGS+= -DPRIMARY_BOOTBLOCK \ 481.27Ssimonb -DPRIMARY_LOAD_ADDRESS="${PRIMARY_LOAD_ADDRESS}" \ 491.27Ssimonb -DNO_GETCHAR \ 501.27Ssimonb -DLIBSA_NO_FS_SYMLINK -DLIBSA_NO_FS_WRITE \ 511.27Ssimonb -DLIBSA_NO_FS_CLOSE \ 521.27Ssimonb -DLIBSA_NO_DEV_CLOSE \ 531.27Ssimonb -DLIBSA_SINGLE_DEVICE=rz \ 541.27Ssimonb -D"rzioctl(x,y,z)=EINVAL" -D"rzclose(f)=0" \ 551.27Ssimonb -DLIBSA_NO_TWIDDLE \ 561.27Ssimonb -DLIBSA_NO_FD_CHECKING \ 571.27Ssimonb -DLIBSA_NO_RAW_ACCESS \ 581.27Ssimonb -DLIBSA_NO_DISKLABEL_MSGS \ 591.27Ssimonb -DALLOC_FIRST_FIT \ 601.27Ssimonb -DLIBSA_USE_MEMCPY -DLIBSA_USE_MEMSET 611.27Ssimonb 621.27SsimonbCHECKSIZE_CMD?= SIZE=${SIZE} sh ${.CURDIR}/../common/checksize.sh 631.27Ssimonb 641.27Ssimonb.elif defined(SECONDARY_PROG) 651.27SsimonbPROG= ${SECONDARY_PROG} 661.27SsimonbLOAD_ADDRESS= ${SECONDARY_LOAD_ADDRESS} 671.27SsimonbCPPFLAGS+= -DSECONDARY_BOOTBLOCK 681.30SjdolecekSRCS+= vers.c 691.30SjdolecekCLEANFILES+= vers.c 701.27Ssimonb.else 711.27Ssimonb# XXX ? 721.27Ssimonb.endif 731.18Ssimonb 741.27Ssimonb### find out what to use for libkern 751.27SsimonbKERN_AS= library 761.27Ssimonb.include "${S}/lib/libkern/Makefile.inc" 771.27SsimonbLIBKERN= ${KERNLIB} 781.18Ssimonb 791.18Ssimonb### find out what to use for libz 801.27Ssimonb.if defined(PRIMARY_PROG) 811.27SsimonbLIBZ= 821.27Ssimonb.else 831.18SsimonbZ_AS= library 841.18Ssimonb.include "${S}/lib/libz/Makefile.inc" 851.18SsimonbLIBZ= ${ZLIB} 861.27Ssimonb.endif 871.18Ssimonb 881.27Ssimonb### find out what to use for libsa 891.27SsimonbSA_AS= library 901.27Ssimonb.if defined(PRIMARY_PROG) 911.27SsimonbSAMISCMAKEFLAGS+=SA_INCLUDE_NET=no 921.27Ssimonb.endif 931.27Ssimonb.if defined(SECONDARY_PROG) 941.27SsimonbSAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes 951.27Ssimonb# for now: 961.27SsimonbSAMISCMAKEFLAGS+=SA_INCLUDE_NET=no 971.22Ssimonb.endif 981.27Ssimonb.include "${S}/lib/libsa/Makefile.inc" 991.27SsimonbLIBSA= ${SALIB} 1001.18Ssimonb 1011.27SsimonbLIBS= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} 1021.18Ssimonb 1031.30Sjdolecek.PHONY: vers.c 1041.30Sjdolecekvers.c: ${.CURDIR}/version 1051.30Sjdolecek sh ${S}/conf/newvers_stand.sh -N ${.CURDIR}/version "pmax" 1061.18Ssimonb 1071.30Sjdolecek${PROG}: machine mips pmax ${OBJS} ${LIBS} 1081.32Ssimonb ${LD} ${OFORMAT} -Map ${PROG}.map -N -x -Ttext ${LOAD_ADDRESS} \ 1091.32Ssimonb ${LDBUG} -e start -o ${PROG} ${OBJS} ${LIBS} 1101.27Ssimonb @${SIZE} ${PROG} 1111.27Ssimonb.if defined(CHECKSIZE_CMD) 1121.27Ssimonb @${CHECKSIZE_CMD} ${PROG} ${PRIMARY_MAX_LOAD} ${PRIMARY_MAX_TOTAL} || \ 1131.27Ssimonb (rm -f ${PROG} ; false) 1141.27Ssimonb.endif 1151.18Ssimonb 1161.31Stsutsui.include <bsd.prog.mk> 1171.31Stsutsui 1181.27SsimonbCLEANFILES+= ${PROG}.map 1191.20Ssimonb 1201.20Ssimonbcleandir distclean: cleanlibdir 1211.20Ssimonb 1221.20Ssimonbcleanlibdir: 1231.20Ssimonb rm -rf lib 124