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