1 1.8.2.1 skrll # $NetBSD: Makefile.booters,v 1.8.2.1 2004/08/03 10:40:15 skrll Exp $ 2 1.8.2.1 skrll 3 1.8.2.1 skrll .include <bsd.sys.mk> # for HOST_SH 4 1.1 thorpej 5 1.1 thorpej # $S must correspond to the top of the 'sys' tree 6 1.1 thorpej S= ${.CURDIR}/../../../.. 7 1.1 thorpej 8 1.2 thorpej BINMODE?= 444 9 1.2 thorpej 10 1.8.2.1 skrll # XXX SHOULD NOT NEED TO DEFINE THESE! 11 1.8.2.1 skrll LIBCRT0= 12 1.8.2.1 skrll LIBC= 13 1.8.2.1 skrll LIBCRTBEGIN= 14 1.8.2.1 skrll LIBCRTEND= 15 1.1 thorpej 16 1.8.2.1 skrll realall: ${PROG} 17 1.1 thorpej 18 1.1 thorpej .PATH: ${.CURDIR}/../common 19 1.7 thorpej AFLAGS+= -D_LOCORE -D_KERNEL -mno-abicalls 20 1.1 thorpej CPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S} 21 1.1 thorpej # compiler flags for smallest code size 22 1.8.2.1 skrll CFLAGS= -ffreestanding -Os -Wall -Werror -mno-abicalls -msoft-float -G 1024 23 1.1 thorpej LDBUG= -T $S/arch/mips/conf/stand.ldscript 24 1.8.2.1 skrll NETBSD_VERS!= ${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh 25 1.1 thorpej CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"' 26 1.6 thorpej 27 1.6 thorpej CPPFLAGS+= -Dsgimips 28 1.1 thorpej 29 1.1 thorpej # PROG set by parent. 30 1.5 tv NOMAN= # defined 31 1.2 thorpej 32 1.3 soren # We load the kernel at 420K in from the start of RAM to give the boot 33 1.2 thorpej # loader plenty of breathing room. Load the boot loader starting at 34 1.2 thorpej # the second page of RAM. 35 1.8 pooka # A warm thank-you to SGI for making load addresses different :) 36 1.2 thorpej LOAD_ADDRESS?= 0x88002000 37 1.8 pooka LOAD_ADDRESS_IP32?= 0x80002000 38 1.2 thorpej 39 1.2 thorpej # if there is a 'version' file, add rule for vers.c and add it to SRCS 40 1.2 thorpej # and CLEANFILES 41 1.2 thorpej .if exists(version) 42 1.2 thorpej .PHONY: vers.c 43 1.2 thorpej vers.c: ${.CURDIR}/version 44 1.8.2.1 skrll ${HOST_SH} ${S}/conf/newvers_stand.sh -N ${.CURDIR}/version "sgimips" 45 1.2 thorpej 46 1.1 thorpej SRCS+= vers.c 47 1.1 thorpej CLEANFILES+= vers.c 48 1.2 thorpej .endif 49 1.1 thorpej 50 1.1 thorpej ### find out what to use for libkern 51 1.1 thorpej KERN_AS= library 52 1.1 thorpej .include "${S}/lib/libkern/Makefile.inc" 53 1.1 thorpej LIBKERN= ${KERNLIB} 54 1.1 thorpej 55 1.1 thorpej ### find out what to use for libz 56 1.1 thorpej Z_AS= library 57 1.1 thorpej .include "${S}/lib/libz/Makefile.inc" 58 1.1 thorpej LIBZ= ${ZLIB} 59 1.1 thorpej 60 1.1 thorpej ### find out what to use for libsa 61 1.1 thorpej SA_AS= library 62 1.1 thorpej SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes 63 1.1 thorpej # for now: 64 1.1 thorpej SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no 65 1.1 thorpej .include "${S}/lib/libsa/Makefile.inc" 66 1.1 thorpej LIBSA= ${SALIB} 67 1.1 thorpej 68 1.8.2.1 skrll .if !make(obj) && !make(clean) && !make(cleandir) 69 1.8.2.1 skrll .BEGIN: 70 1.8.2.1 skrll @([ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine) 71 1.8.2.1 skrll @([ -h mips ] || ln -s ${S}/arch/mips/include mips) 72 1.8.2.1 skrll .NOPATH: machine mips 73 1.8.2.1 skrll .endif 74 1.8.2.1 skrll CLEANFILES+= machine mips 75 1.8.2.1 skrll 76 1.8.2.1 skrll 77 1.1 thorpej LIBS= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} 78 1.1 thorpej 79 1.1 thorpej .include <bsd.prog.mk> 80