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