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