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