Makefile.booters revision 1.19
1# $NetBSD: Makefile.booters,v 1.19 2011/01/24 19:26:16 joerg Exp $ 2 3# PROG set by parent. 4NOMAN= # defined 5 6.include <bsd.own.mk> 7.include <bsd.sys.mk> # for HOST_SH 8 9# $S must correspond to the top of the 'sys' tree 10S= ${.CURDIR}/../../../.. 11 12BINMODE?= 444 13 14# XXX SHOULD NOT NEED TO DEFINE THESE! 15LIBCRT0= 16LIBC= 17LIBCRTBEGIN= 18LIBCRTEND= 19 20realall: ${PROG} 21 22.PATH: ${.CURDIR}/../common 23AFLAGS+= -D_LOCORE -D_KERNEL -mno-abicalls 24CPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S} 25# compiler flags for smallest code size 26CFLAGS= -ffreestanding -Os -Wall -Werror -mno-abicalls -msoft-float -G 1024 27.if ${MACHINE_ARCH} == "mips64eb" 28CPUFLAGS+= -mabi=n32 29LDFLAGS+= -mabi=n32 30.endif 31CWARNFLAGS+= -Wall -Werror 32CWARNFLAGS+= -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 33CWARNFLAGS+= -Wno-pointer-sign 34LDBUG= -T $S/arch/mips/conf/stand.ldscript 35NETBSD_VERS!= ${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh 36CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"' 37 38CPPFLAGS+= -Dsgimips 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