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