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