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