Home | History | Annotate | Line # | Download | only in stand
Makefile.booters revision 1.6.2.2
      1 # $NetBSD: Makefile.booters,v 1.6.2.2 2002/01/10 19:48:33 thorpej 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
     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=		-Os -g -mmemcpy -mno-abicalls -G 128
     27 LDBUG=		-T $S/arch/mips/conf/stand.ldscript
     28 
     29 NETBSD_VERS!=	sh ${.CURDIR}/../../../../conf/osrelease.sh
     30 CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'
     31 
     32 CPPFLAGS+=	-Dsgimips
     33 
     34 # PROG set by parent.
     35 NOMAN=		# defined
     36 
     37 # We load the kernel at 420K in from the start of RAM to give the boot
     38 # loader plenty of breathing room.  Load the boot loader starting at
     39 # the second page of RAM.
     40 LOAD_ADDRESS?=		0x88002000
     41 
     42 # if there is a 'version' file, add rule for vers.c and add it to SRCS
     43 # and CLEANFILES
     44 .if exists(version)
     45 .PHONY: vers.c
     46 vers.c: ${.CURDIR}/version
     47 	sh ${S}/conf/newvers_stand.sh -N ${.CURDIR}/version "sgimips"
     48 
     49 SRCS+=	vers.c
     50 CLEANFILES+= vers.c
     51 .endif
     52 
     53 ### find out what to use for libkern
     54 KERN_AS=	library
     55 .include "${S}/lib/libkern/Makefile.inc"
     56 LIBKERN=	${KERNLIB}
     57 
     58 ### find out what to use for libz
     59 Z_AS=		library
     60 .include "${S}/lib/libz/Makefile.inc"
     61 LIBZ=		${ZLIB}
     62 
     63 ### find out what to use for libsa
     64 SA_AS=		library
     65 SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
     66 # for now:
     67 SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
     68 .include "${S}/lib/libsa/Makefile.inc"
     69 LIBSA=		${SALIB}
     70 
     71 LIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
     72 
     73 .include <bsd.prog.mk>
     74