Makefile.booters revision 1.23
11.23Schristos# $NetBSD: Makefile.booters,v 1.23 2016/09/08 14:43:48 christos Exp $
21.19Sjoerg
31.19Sjoerg# PROG set by parent.
41.19SjoergNOMAN=		# defined
51.23SchristosNOPIE=		# defined
61.10Slukem
71.23Schristos.include <bsd.init.mk>
81.10Slukem.include <bsd.sys.mk>		# for HOST_SH
91.1Sthorpej
101.1Sthorpej# $S must correspond to the top of the 'sys' tree
111.1SthorpejS=	${.CURDIR}/../../../..
121.1Sthorpej
131.2SthorpejBINMODE?=	444
141.9Ssimonb
151.9Ssimonb# XXX SHOULD NOT NEED TO DEFINE THESE!
161.9SsimonbLIBCRT0=
171.22StsutsuiLIBCRTI=
181.9SsimonbLIBC=
191.9SsimonbLIBCRTBEGIN=
201.9SsimonbLIBCRTEND=
211.2Sthorpej
221.12Ssekiyarealall: ${PROG}
231.1Sthorpej
241.1Sthorpej.PATH:		${.CURDIR}/../common
251.20Smatt.PATH.S:	${S}/dev/arcbios
261.7SthorpejAFLAGS+=	-D_LOCORE -D_KERNEL -mno-abicalls
271.1SthorpejCPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S}
281.1Sthorpej# compiler flags for smallest code size
291.11SsekiyaCFLAGS=		-ffreestanding -Os -Wall -Werror -mno-abicalls -msoft-float -G 1024
301.17Smatt.if ${MACHINE_ARCH} == "mips64eb"
311.21SmattAFLAGS+=	-mips3 -mabi=32
321.21SmattCFLAGS+=	-mips3 -mabi=32
331.17Smatt.endif
341.17SmattCWARNFLAGS+=	-Wall -Werror
351.17SmattCWARNFLAGS+=	-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
361.17SmattCWARNFLAGS+=	-Wno-pointer-sign
371.1SthorpejLDBUG=		-T $S/arch/mips/conf/stand.ldscript
381.10SlukemNETBSD_VERS!=	${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh
391.1SthorpejCPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'
401.6Sthorpej
411.6SthorpejCPPFLAGS+=	-Dsgimips
421.1Sthorpej
431.20Smatt.include "${S}/dev/arcbios/Makefile.inc"
441.20Smatt
451.3Ssoren# We load the kernel at 420K in from the start of RAM to give the boot
461.2Sthorpej# loader plenty of breathing room.  Load the boot loader starting at
471.2Sthorpej# the second page of RAM.
481.8Spooka# A warm thank-you to SGI for making load addresses different :)
491.2SthorpejLOAD_ADDRESS?=		0x88002000
501.8SpookaLOAD_ADDRESS_IP32?=	0x80002000
511.2Sthorpej
521.2Sthorpej# if there is a 'version' file, add rule for vers.c and add it to SRCS
531.2Sthorpej# and CLEANFILES
541.2Sthorpej.if exists(version)
551.2Sthorpej.PHONY: vers.c
561.2Sthorpejvers.c: ${.CURDIR}/version
571.18Sjoerg	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
581.18Sjoerg	    ${.CURDIR}/version "sgimips"
591.2Sthorpej
601.1SthorpejSRCS+=	vers.c
611.1SthorpejCLEANFILES+= vers.c
621.2Sthorpej.endif
631.1Sthorpej
641.1Sthorpej### find out what to use for libkern
651.1SthorpejKERN_AS=	library
661.1Sthorpej.include "${S}/lib/libkern/Makefile.inc"
671.1SthorpejLIBKERN=	${KERNLIB}
681.1Sthorpej
691.1Sthorpej### find out what to use for libz
701.1SthorpejZ_AS=		library
711.1Sthorpej.include "${S}/lib/libz/Makefile.inc"
721.1SthorpejLIBZ=		${ZLIB}
731.1Sthorpej
741.1Sthorpej### find out what to use for libsa
751.1SthorpejSA_AS=		library
761.1SthorpejSAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
771.1Sthorpej# for now:
781.1SthorpejSAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
791.1Sthorpej.include "${S}/lib/libsa/Makefile.inc"
801.1SthorpejLIBSA=		${SALIB}
811.12Ssekiya
821.1Sthorpej
831.1SthorpejLIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
841.1Sthorpej
851.16Stsutsui.include <bsd.klinks.mk>
861.1Sthorpej.include <bsd.prog.mk>
87