Makefile.booters revision 1.23
1# $NetBSD: Makefile.booters,v 1.23 2016/09/08 14:43:48 christos Exp $ 2 3# PROG set by parent. 4NOMAN= # defined 5NOPIE= # defined 6 7.include <bsd.init.mk> 8.include <bsd.sys.mk> # for HOST_SH 9 10# $S must correspond to the top of the 'sys' tree 11S= ${.CURDIR}/../../../.. 12 13BINMODE?= 444 14 15# XXX SHOULD NOT NEED TO DEFINE THESE! 16LIBCRT0= 17LIBCRTI= 18LIBC= 19LIBCRTBEGIN= 20LIBCRTEND= 21 22realall: ${PROG} 23 24.PATH: ${.CURDIR}/../common 25.PATH.S: ${S}/dev/arcbios 26AFLAGS+= -D_LOCORE -D_KERNEL -mno-abicalls 27CPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S} 28# compiler flags for smallest code size 29CFLAGS= -ffreestanding -Os -Wall -Werror -mno-abicalls -msoft-float -G 1024 30.if ${MACHINE_ARCH} == "mips64eb" 31AFLAGS+= -mips3 -mabi=32 32CFLAGS+= -mips3 -mabi=32 33.endif 34CWARNFLAGS+= -Wall -Werror 35CWARNFLAGS+= -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 36CWARNFLAGS+= -Wno-pointer-sign 37LDBUG= -T $S/arch/mips/conf/stand.ldscript 38NETBSD_VERS!= ${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh 39CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"' 40 41CPPFLAGS+= -Dsgimips 42 43.include "${S}/dev/arcbios/Makefile.inc" 44 45# We load the kernel at 420K in from the start of RAM to give the boot 46# loader plenty of breathing room. Load the boot loader starting at 47# the second page of RAM. 48# A warm thank-you to SGI for making load addresses different :) 49LOAD_ADDRESS?= 0x88002000 50LOAD_ADDRESS_IP32?= 0x80002000 51 52# if there is a 'version' file, add rule for vers.c and add it to SRCS 53# and CLEANFILES 54.if exists(version) 55.PHONY: vers.c 56vers.c: ${.CURDIR}/version 57 ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ 58 ${.CURDIR}/version "sgimips" 59 60SRCS+= vers.c 61CLEANFILES+= vers.c 62.endif 63 64### find out what to use for libkern 65KERN_AS= library 66.include "${S}/lib/libkern/Makefile.inc" 67LIBKERN= ${KERNLIB} 68 69### find out what to use for libz 70Z_AS= library 71.include "${S}/lib/libz/Makefile.inc" 72LIBZ= ${ZLIB} 73 74### find out what to use for libsa 75SA_AS= library 76SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes 77# for now: 78SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no 79.include "${S}/lib/libsa/Makefile.inc" 80LIBSA= ${SALIB} 81 82 83LIBS= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} 84 85.include <bsd.klinks.mk> 86.include <bsd.prog.mk> 87