Makefile.booters revision 1.9
11.9Ssimonb# $NetBSD: Makefile.booters,v 1.9 2003/10/08 01:40:23 simonb Exp $
21.1Sthorpej
31.1Sthorpej# $S must correspond to the top of the 'sys' tree
41.1SthorpejS=	${.CURDIR}/../../../..
51.1Sthorpej
61.2SthorpejBINMODE?=	444
71.9Ssimonb
81.9Ssimonb# XXX SHOULD NOT NEED TO DEFINE THESE!
91.9SsimonbLIBCRT0=
101.9SsimonbLIBC=
111.9SsimonbLIBCRTBEGIN=
121.9SsimonbLIBCRTEND=
131.2Sthorpej
141.2Sthorpej.PHONY: machine-links
151.2Sthorpejbeforedepend: machine-links
161.2Sthorpej# ${MACHINE} then ${MACHINE_ARCH}
171.2Sthorpejmachine-links:
181.2Sthorpej	-rm -f machine && \
191.2Sthorpej	    ln -s $S/arch/${MACHINE}/include machine
201.2Sthorpej	-rm -f mips && \
211.2Sthorpej	    ln -s $S/arch/mips/include mips
221.2SthorpejCLEANFILES+= machine mips
231.1Sthorpej
241.2Sthorpejrealall: machine-links ${PROG}
251.1Sthorpej
261.1Sthorpej.PATH:		${.CURDIR}/../common
271.7SthorpejAFLAGS+=	-D_LOCORE -D_KERNEL -mno-abicalls
281.1Sthorpej# -I${.CURDIR}/../.. done by Makefile.inc
291.1Sthorpej#CPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -DHEAP_VARIABLE -I${.OBJDIR} -I${S}
301.1SthorpejCPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S}
311.1Sthorpej# compiler flags for smallest code size
321.7SthorpejCFLAGS=		-ffreestanding -Os -g -mmemcpy -mno-abicalls -msoft-float -G 128
331.1SthorpejLDBUG=		-T $S/arch/mips/conf/stand.ldscript
341.1SthorpejNETBSD_VERS!=	sh ${.CURDIR}/../../../../conf/osrelease.sh
351.1SthorpejCPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'
361.6Sthorpej
371.6SthorpejCPPFLAGS+=	-Dsgimips
381.1Sthorpej
391.1Sthorpej# PROG set by parent.
401.5StvNOMAN=		# defined
411.2Sthorpej
421.3Ssoren# We load the kernel at 420K in from the start of RAM to give the boot
431.2Sthorpej# loader plenty of breathing room.  Load the boot loader starting at
441.2Sthorpej# the second page of RAM.
451.8Spooka# A warm thank-you to SGI for making load addresses different :)
461.2SthorpejLOAD_ADDRESS?=		0x88002000
471.8SpookaLOAD_ADDRESS_IP32?=	0x80002000
481.2Sthorpej
491.2Sthorpej# if there is a 'version' file, add rule for vers.c and add it to SRCS
501.2Sthorpej# and CLEANFILES
511.2Sthorpej.if exists(version)
521.2Sthorpej.PHONY: vers.c
531.2Sthorpejvers.c: ${.CURDIR}/version
541.2Sthorpej	sh ${S}/conf/newvers_stand.sh -N ${.CURDIR}/version "sgimips"
551.2Sthorpej
561.1SthorpejSRCS+=	vers.c
571.1SthorpejCLEANFILES+= vers.c
581.2Sthorpej.endif
591.1Sthorpej
601.1Sthorpej### find out what to use for libkern
611.1SthorpejKERN_AS=	library
621.1Sthorpej.include "${S}/lib/libkern/Makefile.inc"
631.1SthorpejLIBKERN=	${KERNLIB}
641.1Sthorpej
651.1Sthorpej### find out what to use for libz
661.1SthorpejZ_AS=		library
671.1Sthorpej.include "${S}/lib/libz/Makefile.inc"
681.1SthorpejLIBZ=		${ZLIB}
691.1Sthorpej
701.1Sthorpej### find out what to use for libsa
711.1SthorpejSA_AS=		library
721.1SthorpejSAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
731.1Sthorpej# for now:
741.1SthorpejSAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
751.1Sthorpej.include "${S}/lib/libsa/Makefile.inc"
761.1SthorpejLIBSA=		${SALIB}
771.1Sthorpej
781.1SthorpejLIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
791.1Sthorpej
801.1Sthorpej.include <bsd.prog.mk>
81