Home | History | Annotate | Line # | Download | only in stand
Makefile.booters revision 1.11
      1 # $NetBSD: Makefile.booters,v 1.11 2003/11/11 06:47:00 sekiya Exp $
      2 
      3 .include <bsd.sys.mk>		# for HOST_SH
      4 
      5 # $S must correspond to the top of the 'sys' tree
      6 S=	${.CURDIR}/../../../..
      7 
      8 BINMODE?=	444
      9 
     10 # XXX SHOULD NOT NEED TO DEFINE THESE!
     11 LIBCRT0=
     12 LIBC=
     13 LIBCRTBEGIN=
     14 LIBCRTEND=
     15 
     16 .PHONY: machine-links
     17 beforedepend: machine-links
     18 # ${MACHINE} then ${MACHINE_ARCH}
     19 machine-links:
     20 	-rm -f machine && \
     21 	    ln -s $S/arch/${MACHINE}/include machine
     22 	-rm -f mips && \
     23 	    ln -s $S/arch/mips/include mips
     24 CLEANFILES+= machine mips
     25 
     26 realall: machine-links ${PROG}
     27 
     28 .PATH:		${.CURDIR}/../common
     29 AFLAGS+=	-D_LOCORE -D_KERNEL -mno-abicalls
     30 CPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S}
     31 # compiler flags for smallest code size
     32 CFLAGS=		-ffreestanding -Os -Wall -Werror -mno-abicalls -msoft-float -G 1024
     33 LDBUG=		-T $S/arch/mips/conf/stand.ldscript
     34 NETBSD_VERS!=	${HOST_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 	${HOST_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