Makefile.booters revision 1.31
11.31Stsutsui# $NetBSD: Makefile.booters,v 1.31 2001/09/22 05:19:39 tsutsui 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.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.29SsorenLDBUG= -T $S/arch/mips/conf/stand.ldscript.le 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.30SjdolecekSRCS+= vers.c 671.30SjdolecekCLEANFILES+= vers.c 681.27Ssimonb.else 691.27Ssimonb# XXX ? 701.27Ssimonb.endif 711.18Ssimonb 721.27Ssimonb### find out what to use for libkern 731.27SsimonbKERN_AS= library 741.27Ssimonb.include "${S}/lib/libkern/Makefile.inc" 751.27SsimonbLIBKERN= ${KERNLIB} 761.18Ssimonb 771.18Ssimonb### find out what to use for libz 781.27Ssimonb.if defined(PRIMARY_PROG) 791.27SsimonbLIBZ= 801.27Ssimonb.else 811.18SsimonbZ_AS= library 821.18Ssimonb.include "${S}/lib/libz/Makefile.inc" 831.18SsimonbLIBZ= ${ZLIB} 841.27Ssimonb.endif 851.18Ssimonb 861.27Ssimonb### find out what to use for libsa 871.27SsimonbSA_AS= library 881.27Ssimonb.if defined(PRIMARY_PROG) 891.27SsimonbSAMISCMAKEFLAGS+=SA_INCLUDE_NET=no 901.27Ssimonb.endif 911.27Ssimonb.if defined(SECONDARY_PROG) 921.27SsimonbSAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes 931.27Ssimonb# for now: 941.27SsimonbSAMISCMAKEFLAGS+=SA_INCLUDE_NET=no 951.22Ssimonb.endif 961.27Ssimonb.include "${S}/lib/libsa/Makefile.inc" 971.27SsimonbLIBSA= ${SALIB} 981.18Ssimonb 991.27SsimonbLIBS= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} 1001.18Ssimonb 1011.30Sjdolecek.PHONY: vers.c 1021.30Sjdolecekvers.c: ${.CURDIR}/version 1031.30Sjdolecek sh ${S}/conf/newvers_stand.sh -N ${.CURDIR}/version "pmax" 1041.18Ssimonb 1051.30Sjdolecek${PROG}: machine mips pmax ${OBJS} ${LIBS} 1061.27Ssimonb ${LD} -Map ${PROG}.map -N -x -Ttext ${LOAD_ADDRESS} ${LDBUG} \ 1071.30Sjdolecek -e start -o ${PROG} ${OBJS} ${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.31Stsutsui.include <bsd.prog.mk> 1151.31Stsutsui 1161.27SsimonbCLEANFILES+= ${PROG}.map 1171.20Ssimonb 1181.20Ssimonbcleandir distclean: cleanlibdir 1191.20Ssimonb 1201.20Ssimonbcleanlibdir: 1211.20Ssimonb rm -rf lib 122