Makefile.booters revision 1.23.2.1 1 # $NetBSD: Makefile.booters,v 1.23.2.1 2017/04/21 16:53:35 bouyer Exp $
2
3 # PROG set by parent.
4 NOMAN= # defined
5 NOPIE= # defined
6
7 .include <bsd.init.mk>
8 .include <bsd.sys.mk> # for HOST_SH
9
10 # $S must correspond to the top of the 'sys' tree
11 S= ${.CURDIR}/../../../..
12
13 BINMODE?= 444
14
15 # XXX SHOULD NOT NEED TO DEFINE THESE!
16 LIBCRT0=
17 LIBCRTI=
18 LIBC=
19 LIBCRTBEGIN=
20 LIBCRTEND=
21
22 realall: ${PROG}
23
24 .PATH: ${.CURDIR}/../common
25 .PATH.S: ${S}/dev/arcbios
26 AFLAGS+= -D_LOCORE -D_KERNEL -mno-abicalls
27 CPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S}
28 # compiler flags for smallest code size
29 CFLAGS= -ffreestanding -Os -Wall -Werror -mno-abicalls -msoft-float -G 1024
30 .if ${MACHINE_ARCH} == "mips64eb"
31 AFLAGS+= -mips3 -mabi=32
32 CFLAGS+= -mips3 -mabi=32
33 .endif
34 CWARNFLAGS+= -Wall -Werror
35 CWARNFLAGS+= -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
36 CWARNFLAGS+= -Wno-pointer-sign
37 LDBUG= -T $S/arch/mips/conf/stand.ldscript
38 NETBSD_VERS!= ${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh
39 CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"'
40
41 CPPFLAGS+= -Dsgimips
42
43 .include "${S}/dev/arcbios/Makefile.inc"
44
45 # We load the kernel at 420K in from the start of RAM to give the boot
46 # loader plenty of breathing room. Load the boot loader starting at
47 # the second page of RAM.
48 # A warm thank-you to SGI for making load addresses different :)
49 LOAD_ADDRESS?= 0x88002000
50 LOAD_ADDRESS_IP32?= 0x80002000
51
52 .include "${S}/conf/newvers_stand.mk"
53
54 ### find out what to use for libkern
55 KERN_AS= library
56 .include "${S}/lib/libkern/Makefile.inc"
57 LIBKERN= ${KERNLIB}
58
59 ### find out what to use for libz
60 Z_AS= library
61 .include "${S}/lib/libz/Makefile.inc"
62 LIBZ= ${ZLIB}
63
64 ### find out what to use for libsa
65 SA_AS= library
66 SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
67 # for now:
68 SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
69 .include "${S}/lib/libsa/Makefile.inc"
70 LIBSA= ${SALIB}
71
72
73 LIBS= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
74
75 .include <bsd.klinks.mk>
76 .include <bsd.prog.mk>
77