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