Makefile.booters revision 1.21
11.21Ssimonb# $NetBSD: Makefile.booters,v 1.21 1999/04/01 06:05:04 simonb Exp $ 21.18Ssimonb# 31.18Ssimonb# NOTE: $S must correspond to the top of the 'sys' tree 41.1Sderaadt 51.18SsimonbBINDIR?=/usr/mdec 61.18SsimonbBINMODE?=444 71.1Sderaadt 81.18Ssimonb.BEGIN: ${.OBJDIR}/machine ${.OBJDIR}/mips 91.18Ssimonb${PROG} depend all: ${.OBJDIR}/machine ${.OBJDIR}/mips 101.18SsimonbCLEANFILES+= machine mips 111.5Smellon 121.18Ssimonb${.OBJDIR}/machine: 131.18Ssimonb -rm -f ${.TARGET} 141.18Ssimonb ln -s $S/arch/${MACHINE}/include ${.TARGET} 151.15Ssimonb 161.18Ssimonb${.OBJDIR}/mips: 171.18Ssimonb -rm -f ${.TARGET} 181.18Ssimonb ln -s $S/arch/mips/include mips 191.1Sderaadt 201.18Ssimonb# Tailor C compilation for standalone environment. 211.18SsimonbCOPTS= -Os # -Os gives smaller code 221.18Ssimonb 231.18SsimonbC_MACHDEP=-mmemcpy -mno-abicalls -G 128 # even smaller code 241.18Ssimonb 251.18SsimonbDEFS?= -DSMALL -D_STANDALONE -D_NO_PROM_DEFINES -DNO_ABICALLS \ 261.18Ssimonb ${BOOTDEFADD} 271.18SsimonbINCL?= -nostdinc -I${.OBJDIR} -I$S -I${PMAX_STAND_DIR}/lib -I$S/lib/libsa 281.18Ssimonb 291.18SsimonbCFLAGS+= ${CWARN} ${C_MACHDEP} 301.18SsimonbAFLAGS+= -D_LOCORE -D_KERNEL 311.18SsimonbCPPFLAGS+= ${DEFS} ${INCL} 321.18Ssimonb 331.18SsimonbLDBUG= -T $S/arch/mips/conf/stand.ldscript 341.18Ssimonb 351.18Ssimonb### find out what to use for libsa 361.18SsimonbSA_AS= library 371.18Ssimonb.include "${S}/lib/libsa/Makefile.inc" 381.18SsimonbLIBSA= ${SALIB} 391.21SsimonbSAMISCMAKEFLAGS= SA_INCLUDE_NET=yes 401.21Ssimonb 411.21Ssimonb# We don't need libkern/libz for the first stage bootblocks 421.21Ssimonb.if ${PROG} != "bootxx" 431.18Ssimonb 441.18Ssimonb### find out what to use for libz 451.18SsimonbZ_AS= library 461.18Ssimonb.include "${S}/lib/libz/Makefile.inc" 471.18SsimonbLIBZ= ${ZLIB} 481.21Ssimonb# and use compressed read in libsa 491.21SsimonbSAMISCMAKEFLAGS= SA_USE_CREAD=yes 501.18Ssimonb 511.18Ssimonb### find out what to use for libkern 521.18SsimonbKERN_AS= library 531.18Ssimonb.include "${S}/lib/libkern/Makefile.inc" 541.18SsimonbLIBKERN= ${KERNLIB} 551.18Ssimonb 561.18Ssimonb.endif # ${PROG} != "bootxx" 571.18Ssimonb 581.18SsimonbPMAX_STAND_DIR?= $S/arch/pmax/stand 591.18Ssimonb### find out what to use for libpmax 601.18SsimonbPMAXDIR= ${PMAX_STAND_DIR}/lib 611.18Ssimonb.include "${PMAXDIR}/Makefile.inc" 621.18SsimonbLIBPMAX= ${PMAXLIB} 631.18Ssimonb 641.19SsimonbLIBS= ${LIBPMAX} ${LIBKERN} ${LIBSA} ${LIBZ} ${LIBKERN} ${LIBPMAX} 651.18SsimonbVERS_O?=vers.o 661.18Ssimonb 671.20Ssimonb${PROG}: ${OBJS} ${LIBS} 681.20Ssimonb.if ${VERS_O} != "" 691.20Ssimonb sh ${PMAX_STAND_DIR}/lib/newvers.sh ${VERSIONFILE} ${NEWVERSWHAT} 701.18Ssimonb ${COMPILE.c} vers.c 711.20Ssimonb.endif 721.18Ssimonb ld -Map ${PROG}.map -N -x -Ttext ${RELOC} ${LDBUG} -e start \ 731.18Ssimonb ${OBJS} ${VERS_O} ${LIBS} -o ${PROG} 741.18Ssimonb 751.20SsimonbCLEANFILES+=${PROG}.map 761.20Ssimonb.if ${VERS_O} != "" 771.20SsimonbCLEANFILES+=vers.c vers.o 781.20Ssimonb.endif 791.20Ssimonb 801.20Ssimonbcleandir distclean: cleanlibdir 811.20Ssimonb 821.20Ssimonbcleanlibdir: 831.20Ssimonb rm -rf lib 841.18Ssimonb 851.18Ssimonb.include <bsd.prog.mk> 861.18Ssimonb 871.18Ssimonb# be sure to turn off any PIC flags for standalone library code. 881.18SsimonbCPICFLAGS= 891.18SsimonbCAPICFLAGS= 901.18SsimonbCPPPICFLAGS= 911.18SsimonbAPICFLAGS= 92