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