Makefile.buildboot revision 1.30 1 # $NetBSD: Makefile.buildboot,v 1.30 2016/02/27 19:25:08 joerg 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 #
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 CPPFLAGS+= -I${.CURDIR}/../../../../../common/include
38 CFLAGS= ${${ACTIVE_CC} == "clang":? -Oz -fomit-frame-pointer : -Os } -fno-unwind-tables
39 AFLAGS+= ${${ACTIVE_CC} == "clang":? -Oz :}
40 CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes -ffreestanding
41
42 ### find out what to use for libkern
43 KERN_AS= library
44 .include "${S}/lib/libkern/Makefile.inc"
45 LIBKERN= ${KERNLIB}
46
47 .ifdef INCLUDE_LIBZ
48 ### find out what to use for libz
49 Z_AS= library
50 .include "${S}/lib/libz/Makefile.inc"
51 LIBZ= ${ZLIB}
52 .endif
53
54 ### find out what to use for libsa
55 SA_AS= library
56 SAMISCMAKEFLAGS+="SA_USE_LOADFILE=yes"
57 .include "${S}/lib/libsa/Makefile.inc"
58 LIBSA= ${SALIB}
59
60 .include <bsd.klinks.mk>
61
62 cleandir distclean: .WAIT cleanlibdir
63
64 cleanlibdir:
65 -rm -rf lib
66