Home | History | Annotate | Line # | Download | only in stand
Makefile.buildboot revision 1.29.6.1
      1 #	$NetBSD: Makefile.buildboot,v 1.29.6.1 2016/03/19 11:30:05 skrll Exp $
      2 #
      3 # This file is for the sparc `boot' and `bootxx' only; it does not
      4 # currently play well on a 64-bit system.
      5 
      6 S=	${.CURDIR}/../../../..
      7 
      8 .PATH: ${.CURDIR}/../common ${.CURDIR}/../../sparc
      9 
     10 COMMONSOURCE=	srt0.S promdev.c dvma.c promlib.c isfloppy.c
     11 
     12 SRCS=		${COMMONSOURCE} ${PROGSOURCE}
     13 NOMAN=		# defined
     14 BINMODE=	444
     15 
     16 .include <bsd.own.mk>
     17 
     18 #
     19 # The relocation address for `boot' must leave enough free memory below
     20 # it to load a kernel at address 0x4000. On the other hand, on some
     21 # machines, the PROM uses memory in the upper portion of the first 4MB
     22 # segment, depending on the actual memory bank configuration probably.
     23 # Our boot program must stear clear of that as well.
     24 #
     25 # Relocating `boot' at 0x388000 seems to provide a working compromise
     26 # on the machines tested so far.
     27 #
     28 RELOC_DEFAULT?=	388000
     29 RELOCS=		$(RELOC_DEFAULT)
     30 #RELOCS+=	200000 400000 700000		# additional link addresses
     31 
     32 # `bootxx' is linked at a different address to circumvent i-cache
     33 # flushing issues on Hypersparcs
     34 RELOC_BOOTXX=	300000
     35 
     36 CPPFLAGS+=	-D_STANDALONE -DSUN4 -DSUN4C -DSUN4M -DSUN4D -DHEAP_VARIABLE
     37 
     38 CPPFLAGS+=	-I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
     39 CPPFLAGS+=	-I${.CURDIR}/../../../../../common/include
     40 CFLAGS=		${${ACTIVE_CC} == "clang":? -Oz -fomit-frame-pointer : -Os } -fno-unwind-tables
     41 AFLAGS+=	${${ACTIVE_CC} == "clang":? -Oz :}
     42 CFLAGS+=	-Wall -Wstrict-prototypes -Wmissing-prototypes -ffreestanding
     43 
     44 ### find out what to use for libkern
     45 KERN_AS=	library
     46 .include "${S}/lib/libkern/Makefile.inc"
     47 LIBKERN=	${KERNLIB}
     48 
     49 .ifdef INCLUDE_LIBZ
     50 ### find out what to use for libz
     51 Z_AS=		library
     52 .include "${S}/lib/libz/Makefile.inc"
     53 LIBZ=		${ZLIB}
     54 .endif
     55 
     56 ### find out what to use for libsa
     57 SA_AS=		library
     58 SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
     59 .include "${S}/lib/libsa/Makefile.inc"
     60 LIBSA=		${SALIB}
     61 
     62 .include <bsd.klinks.mk>
     63 
     64 cleandir distclean: .WAIT cleanlibdir
     65 
     66 cleanlibdir:
     67 	-rm -rf lib
     68