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