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