Home | History | Annotate | Line # | Download | only in stand
Makefile.booters revision 1.13.50.1
      1 # Makefile.booters,v 1.13 2005/12/11 12:18:58 christos 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 realall: ${PROG}
     17 
     18 .PATH:		${.CURDIR}/../common
     19 AFLAGS+=	-D_LOCORE -D_KERNEL -mno-abicalls
     20 CPPFLAGS+=	-nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S}
     21 # compiler flags for smallest code size
     22 CFLAGS=		-ffreestanding -Os -Wall -Werror -mno-abicalls -msoft-float -G 1024
     23 LDBUG=		-T $S/arch/mips/conf/stand.ldscript
     24 NETBSD_VERS!=	${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh
     25 CPPFLAGS+=	-DNETBSD_VERS='"${NETBSD_VERS}"'
     26 
     27 CPPFLAGS+=	-Dsgimips
     28 
     29 # PROG set by parent.
     30 NOMAN=		# defined
     31 
     32 # We load the kernel at 420K in from the start of RAM to give the boot
     33 # loader plenty of breathing room.  Load the boot loader starting at
     34 # the second page of RAM.
     35 # A warm thank-you to SGI for making load addresses different :)
     36 LOAD_ADDRESS?=		0x88002000
     37 LOAD_ADDRESS_IP32?=	0x80002000
     38 
     39 # if there is a 'version' file, add rule for vers.c and add it to SRCS
     40 # and CLEANFILES
     41 .if exists(version)
     42 .PHONY: vers.c
     43 vers.c: ${.CURDIR}/version
     44 	${HOST_SH} ${S}/conf/newvers_stand.sh ${.CURDIR}/version "sgimips"
     45 
     46 SRCS+=	vers.c
     47 CLEANFILES+= vers.c
     48 .endif
     49 
     50 ### find out what to use for libkern
     51 KERN_AS=	library
     52 .include "${S}/lib/libkern/Makefile.inc"
     53 LIBKERN=	${KERNLIB}
     54 
     55 ### find out what to use for libz
     56 Z_AS=		library
     57 .include "${S}/lib/libz/Makefile.inc"
     58 LIBZ=		${ZLIB}
     59 
     60 ### find out what to use for libsa
     61 SA_AS=		library
     62 SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
     63 # for now:
     64 SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
     65 .include "${S}/lib/libsa/Makefile.inc"
     66 LIBSA=		${SALIB}
     67 
     68 .if !make(obj) && !make(clean) && !make(cleandir)
     69 .BEGIN:
     70 	@([ -h machine ] || ln -s ${S}/arch/${MACHINE}/include machine)
     71 	@([ -h mips ] || ln -s ${S}/arch/mips/include mips)
     72 .NOPATH: machine mips
     73 .endif
     74 CLEANFILES+= machine mips
     75 
     76 
     77 LIBS=		${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
     78 
     79 .include <bsd.prog.mk>
     80