Makefile.booters revision 1.17
11.17Smatt# $NetBSD: Makefile.booters,v 1.17 2009/12/14 00:46:14 matt Exp $
21.10Slukem
31.10Slukem.include <bsd.sys.mk>		# for HOST_SH
41.1Sthorpej
51.1Sthorpej# $S must correspond to the top of the 'sys' tree
61.1SthorpejS=	${.CURDIR}/../../../..
71.1Sthorpej
81.2SthorpejBINMODE?=	444
91.9Ssimonb
101.9Ssimonb# XXX SHOULD NOT NEED TO DEFINE THESE!
111.9SsimonbLIBCRT0=
121.9SsimonbLIBC=
131.9SsimonbLIBCRTBEGIN=
141.9SsimonbLIBCRTEND=
151.2Sthorpej
161.12Ssekiyarealall: ${PROG}
171.1Sthorpej
181.1Sthorpej.PATH:		${.CURDIR}/../common
191.7SthorpejAFLAGS+=	-D_LOCORE -D_KERNEL -mno-abicalls
201.1SthorpejCPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S}
211.1Sthorpej# compiler flags for smallest code size
221.11SsekiyaCFLAGS=		-ffreestanding -Os -Wall -Werror -mno-abicalls -msoft-float -G 1024
231.17Smatt.if ${MACHINE_ARCH} == "mips64eb"
241.17SmattCPUFLAGS+=	-mabi=n32
251.17SmattLDFLAGS+=	-mabi=n32
261.17Smatt.endif
271.17SmattCWARNFLAGS+=	-Wall -Werror
281.17SmattCWARNFLAGS+=	-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
291.17SmattCWARNFLAGS+=	-Wno-pointer-sign
301.1SthorpejLDBUG=		-T $S/arch/mips/conf/stand.ldscript
311.10SlukemNETBSD_VERS!=	${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh
321.1SthorpejCPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'
331.6Sthorpej
341.6SthorpejCPPFLAGS+=	-Dsgimips
351.1Sthorpej
361.1Sthorpej# PROG set by parent.
371.5StvNOMAN=		# defined
381.2Sthorpej
391.3Ssoren# We load the kernel at 420K in from the start of RAM to give the boot
401.2Sthorpej# loader plenty of breathing room.  Load the boot loader starting at
411.2Sthorpej# the second page of RAM.
421.8Spooka# A warm thank-you to SGI for making load addresses different :)
431.2SthorpejLOAD_ADDRESS?=		0x88002000
441.8SpookaLOAD_ADDRESS_IP32?=	0x80002000
451.2Sthorpej
461.2Sthorpej# if there is a 'version' file, add rule for vers.c and add it to SRCS
471.2Sthorpej# and CLEANFILES
481.2Sthorpej.if exists(version)
491.2Sthorpej.PHONY: vers.c
501.2Sthorpejvers.c: ${.CURDIR}/version
511.14Stsutsui	${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "sgimips"
521.2Sthorpej
531.1SthorpejSRCS+=	vers.c
541.1SthorpejCLEANFILES+= vers.c
551.2Sthorpej.endif
561.1Sthorpej
571.1Sthorpej### find out what to use for libkern
581.1SthorpejKERN_AS=	library
591.1Sthorpej.include "${S}/lib/libkern/Makefile.inc"
601.1SthorpejLIBKERN=	${KERNLIB}
611.1Sthorpej
621.1Sthorpej### find out what to use for libz
631.1SthorpejZ_AS=		library
641.1Sthorpej.include "${S}/lib/libz/Makefile.inc"
651.1SthorpejLIBZ=		${ZLIB}
661.1Sthorpej
671.1Sthorpej### find out what to use for libsa
681.1SthorpejSA_AS=		library
691.1SthorpejSAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
701.1Sthorpej# for now:
711.1SthorpejSAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
721.1Sthorpej.include "${S}/lib/libsa/Makefile.inc"
731.1SthorpejLIBSA=		${SALIB}
741.12Ssekiya
751.1Sthorpej
761.1SthorpejLIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
771.1Sthorpej
781.16Stsutsui.include <bsd.klinks.mk>
791.1Sthorpej.include <bsd.prog.mk>
80