Home | History | Annotate | Line # | Download | only in stand
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
      7 S=	${.CURDIR}/../../../..
      8 
      9 BINMODE?=	444
     10 
     11 # XXX SHOULD NOT NEED TO DEFINE THESE!
     12 LIBCRT0=
     13 LIBC=
     14 LIBCRTBEGIN=
     15 LIBCRTEND=
     16 
     17 realall: ${PROG}
     18 
     19 .PATH:		${.CURDIR}/../common
     20 AFLAGS+=	-D_LOCORE -D_KERNEL -mno-abicalls
     21 CPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S}
     22 # compiler flags for smallest code size
     23 CFLAGS=		-ffreestanding -Os -Wall -Werror -mno-abicalls -msoft-float -G 1024
     24 .if ${MACHINE_ARCH} == "mips64eb"
     25 CPUFLAGS+=	-mabi=n32
     26 LDFLAGS+=	-mabi=n32
     27 .endif
     28 CWARNFLAGS+=	-Wall -Werror
     29 CWARNFLAGS+=	-Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
     30 CWARNFLAGS+=	-Wno-pointer-sign
     31 LDBUG=		-T $S/arch/mips/conf/stand.ldscript
     32 NETBSD_VERS!=	${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh
     33 CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'
     34 
     35 CPPFLAGS+=	-Dsgimips
     36 
     37 # PROG set by parent.
     38 NOMAN=		# 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 :)
     44 LOAD_ADDRESS?=		0x88002000
     45 LOAD_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
     51 vers.c: ${.CURDIR}/version
     52 	${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
     53 	    ${.CURDIR}/version "sgimips"
     54 
     55 SRCS+=	vers.c
     56 CLEANFILES+= vers.c
     57 .endif
     58 
     59 ### find out what to use for libkern
     60 KERN_AS=	library
     61 .include "${S}/lib/libkern/Makefile.inc"
     62 LIBKERN=	${KERNLIB}
     63 
     64 ### find out what to use for libz
     65 Z_AS=		library
     66 .include "${S}/lib/libz/Makefile.inc"
     67 LIBZ=		${ZLIB}
     68 
     69 ### find out what to use for libsa
     70 SA_AS=		library
     71 SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
     72 # for now:
     73 SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
     74 .include "${S}/lib/libsa/Makefile.inc"
     75 LIBSA=		${SALIB}
     76 
     77 
     78 LIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
     79 
     80 .include <bsd.klinks.mk>
     81 .include <bsd.prog.mk>
     82