Home | History | Annotate | Line # | Download | only in stand
Makefile.booters revision 1.17
      1 # $NetBSD: Makefile.booters,v 1.17 2009/12/14 00:46:14 matt 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 .if ${MACHINE_ARCH} == "mips64eb"
     24 CPUFLAGS+=	-mabi=n32
     25 LDFLAGS+=	-mabi=n32
     26 .endif
     27 CWARNFLAGS+=	-Wall -Werror
     28 CWARNFLAGS+=	-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
     29 CWARNFLAGS+=	-Wno-pointer-sign
     30 LDBUG=		-T $S/arch/mips/conf/stand.ldscript
     31 NETBSD_VERS!=	${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh
     32 CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'
     33 
     34 CPPFLAGS+=	-Dsgimips
     35 
     36 # PROG set by parent.
     37 NOMAN=		# defined
     38 
     39 # We load the kernel at 420K in from the start of RAM to give the boot
     40 # loader plenty of breathing room.  Load the boot loader starting at
     41 # the second page of RAM.
     42 # A warm thank-you to SGI for making load addresses different :)
     43 LOAD_ADDRESS?=		0x88002000
     44 LOAD_ADDRESS_IP32?=	0x80002000
     45 
     46 # if there is a 'version' file, add rule for vers.c and add it to SRCS
     47 # and CLEANFILES
     48 .if exists(version)
     49 .PHONY: vers.c
     50 vers.c: ${.CURDIR}/version
     51 	${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "sgimips"
     52 
     53 SRCS+=	vers.c
     54 CLEANFILES+= vers.c
     55 .endif
     56 
     57 ### find out what to use for libkern
     58 KERN_AS=	library
     59 .include "${S}/lib/libkern/Makefile.inc"
     60 LIBKERN=	${KERNLIB}
     61 
     62 ### find out what to use for libz
     63 Z_AS=		library
     64 .include "${S}/lib/libz/Makefile.inc"
     65 LIBZ=		${ZLIB}
     66 
     67 ### find out what to use for libsa
     68 SA_AS=		library
     69 SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
     70 # for now:
     71 SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
     72 .include "${S}/lib/libsa/Makefile.inc"
     73 LIBSA=		${SALIB}
     74 
     75 
     76 LIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
     77 
     78 .include <bsd.klinks.mk>
     79 .include <bsd.prog.mk>
     80