Home | History | Annotate | Line # | Download | only in stand
Makefile.buildboot revision 1.21
      1 #	$NetBSD: Makefile.buildboot,v 1.21 2003/07/30 15:58:38 mrg 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
     11 
     12 SRCS=		${COMMONSOURCE} ${PROGSOURCE}
     13 NOMAN=		# defined
     14 BINMODE=	444
     15 
     16 #
     17 # The relocation address for `boot' must leave enough free memory below
     18 # it to load a kernel at address 0x4000. On the other hand, on some
     19 # machines, the PROM uses memory in the upper portion of the first 4MB
     20 # segment, depending on the actual memory bank configuration probably.
     21 # Our boot program must stear clear of that as well.
     22 #
     23 # Relocating `boot' at 0x388000 seems to provide a working compromise
     24 # on the machines tested so far.
     25 #
     26 RELOC_DEFAULT?=	388000
     27 RELOCS=		$(RELOC_DEFAULT)
     28 #RELOCS+=	200000 400000 700000		# additional link addresses
     29 
     30 # `bootxx' is linked at a different address to circumvent i-cache
     31 # flushing issues on Hypersparcs
     32 RELOC_BOOTXX=	300000
     33 
     34 CPPFLAGS+=	-D_STANDALONE -DSUN4 -DSUN4C -DSUN4M -DSUN4D -DHEAP_VARIABLE
     35 
     36 CPPFLAGS+=	-I. -I${.CURDIR}/../../.. -I${.CURDIR}/../../../..
     37 CFLAGS=		-O2
     38 CFLAGS+=	-Wall -Wstrict-prototypes -Wmissing-prototypes -ffreestanding
     39 
     40 ### find out what to use for libkern
     41 KERN_AS=	library
     42 .include "${S}/lib/libkern/Makefile.inc"
     43 LIBKERN=	${KERNLIB}
     44 
     45 .ifdef INCLUDE_LIBZ
     46 ### find out what to use for libz
     47 Z_AS=		library
     48 .include "${S}/lib/libz/Makefile.inc"
     49 LIBZ=		${ZLIB}
     50 .endif
     51 
     52 ### find out what to use for libsa
     53 SA_AS=		library
     54 SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
     55 .include "${S}/lib/libsa/Makefile.inc"
     56 LIBSA=		${SALIB}
     57 
     58 .if !make(obj) && !make(clean) && !make(cleandir)
     59 .BEGIN:
     60 	@([ -h machine ] || ln -s ${S}/arch/sparc/include machine)
     61 	@([ -h sparc ] || ln -s ${S}/arch/sparc/include sparc)
     62 .NOPATH: machine sparc
     63 .endif
     64 CLEANFILES+= machine sparc
     65 
     66 cleandir distclean: cleanlibdir
     67 
     68 cleanlibdir:
     69 	rm -rf lib
     70