Makefile.booters revision 1.18
11.18Sjoerg# $NetBSD: Makefile.booters,v 1.18 2011/01/22 19:19:23 joerg Exp $
21.10Slukem
31.18Sjoerg.include <bsd.own.mk>
41.10Slukem.include <bsd.sys.mk>		# for HOST_SH
51.1Sthorpej
61.1Sthorpej# $S must correspond to the top of the 'sys' tree
71.1SthorpejS=	${.CURDIR}/../../../..
81.1Sthorpej
91.2SthorpejBINMODE?=	444
101.9Ssimonb
111.9Ssimonb# XXX SHOULD NOT NEED TO DEFINE THESE!
121.9SsimonbLIBCRT0=
131.9SsimonbLIBC=
141.9SsimonbLIBCRTBEGIN=
151.9SsimonbLIBCRTEND=
161.2Sthorpej
171.12Ssekiyarealall: ${PROG}
181.1Sthorpej
191.1Sthorpej.PATH:		${.CURDIR}/../common
201.7SthorpejAFLAGS+=	-D_LOCORE -D_KERNEL -mno-abicalls
211.1SthorpejCPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S}
221.1Sthorpej# compiler flags for smallest code size
231.11SsekiyaCFLAGS=		-ffreestanding -Os -Wall -Werror -mno-abicalls -msoft-float -G 1024
241.17Smatt.if ${MACHINE_ARCH} == "mips64eb"
251.17SmattCPUFLAGS+=	-mabi=n32
261.17SmattLDFLAGS+=	-mabi=n32
271.17Smatt.endif
281.17SmattCWARNFLAGS+=	-Wall -Werror
291.17SmattCWARNFLAGS+=	-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
301.17SmattCWARNFLAGS+=	-Wno-pointer-sign
311.1SthorpejLDBUG=		-T $S/arch/mips/conf/stand.ldscript
321.10SlukemNETBSD_VERS!=	${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh
331.1SthorpejCPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'
341.6Sthorpej
351.6SthorpejCPPFLAGS+=	-Dsgimips
361.1Sthorpej
371.1Sthorpej# PROG set by parent.
381.5StvNOMAN=		# defined
391.2Sthorpej
401.3Ssoren# We load the kernel at 420K in from the start of RAM to give the boot
411.2Sthorpej# loader plenty of breathing room.  Load the boot loader starting at
421.2Sthorpej# the second page of RAM.
431.8Spooka# A warm thank-you to SGI for making load addresses different :)
441.2SthorpejLOAD_ADDRESS?=		0x88002000
451.8SpookaLOAD_ADDRESS_IP32?=	0x80002000
461.2Sthorpej
471.2Sthorpej# if there is a 'version' file, add rule for vers.c and add it to SRCS
481.2Sthorpej# and CLEANFILES
491.2Sthorpej.if exists(version)
501.2Sthorpej.PHONY: vers.c
511.2Sthorpejvers.c: ${.CURDIR}/version
521.18Sjoerg	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
531.18Sjoerg	    ${.CURDIR}/version "sgimips"
541.2Sthorpej
551.1SthorpejSRCS+=	vers.c
561.1SthorpejCLEANFILES+= vers.c
571.2Sthorpej.endif
581.1Sthorpej
591.1Sthorpej### find out what to use for libkern
601.1SthorpejKERN_AS=	library
611.1Sthorpej.include "${S}/lib/libkern/Makefile.inc"
621.1SthorpejLIBKERN=	${KERNLIB}
631.1Sthorpej
641.1Sthorpej### find out what to use for libz
651.1SthorpejZ_AS=		library
661.1Sthorpej.include "${S}/lib/libz/Makefile.inc"
671.1SthorpejLIBZ=		${ZLIB}
681.1Sthorpej
691.1Sthorpej### find out what to use for libsa
701.1SthorpejSA_AS=		library
711.1SthorpejSAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
721.1Sthorpej# for now:
731.1SthorpejSAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
741.1Sthorpej.include "${S}/lib/libsa/Makefile.inc"
751.1SthorpejLIBSA=		${SALIB}
761.12Ssekiya
771.1Sthorpej
781.1SthorpejLIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
791.1Sthorpej
801.16Stsutsui.include <bsd.klinks.mk>
811.1Sthorpej.include <bsd.prog.mk>
82