Makefile.booters revision 1.7 1 # $NetBSD: Makefile.booters,v 1.7 2002/11/10 17:12:58 thorpej Exp $
2
3 # $S must correspond to the top of the 'sys' tree
4 S= ${.CURDIR}/../../../..
5
6 BINMODE?= 444
7
8 .PHONY: machine-links
9 beforedepend: machine-links
10 # ${MACHINE} then ${MACHINE_ARCH}
11 machine-links:
12 -rm -f machine && \
13 ln -s $S/arch/${MACHINE}/include machine
14 -rm -f mips && \
15 ln -s $S/arch/mips/include mips
16 CLEANFILES+= machine mips
17
18 realall: machine-links ${PROG}
19
20 .PATH: ${.CURDIR}/../common
21 AFLAGS+= -D_LOCORE -D_KERNEL -mno-abicalls
22 # -I${.CURDIR}/../.. done by Makefile.inc
23 #CPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -DHEAP_VARIABLE -I${.OBJDIR} -I${S}
24 CPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S}
25 # compiler flags for smallest code size
26 CFLAGS= -ffreestanding -Os -g -mmemcpy -mno-abicalls -msoft-float -G 128
27 LDBUG= -T $S/arch/mips/conf/stand.ldscript
28 NETBSD_VERS!= sh ${.CURDIR}/../../../../conf/osrelease.sh
29 CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"'
30
31 CPPFLAGS+= -Dsgimips
32
33 # PROG set by parent.
34 NOMAN= # defined
35
36 # We load the kernel at 420K in from the start of RAM to give the boot
37 # loader plenty of breathing room. Load the boot loader starting at
38 # the second page of RAM.
39 LOAD_ADDRESS?= 0x88002000
40
41 # if there is a 'version' file, add rule for vers.c and add it to SRCS
42 # and CLEANFILES
43 .if exists(version)
44 .PHONY: vers.c
45 vers.c: ${.CURDIR}/version
46 sh ${S}/conf/newvers_stand.sh -N ${.CURDIR}/version "sgimips"
47
48 SRCS+= vers.c
49 CLEANFILES+= vers.c
50 .endif
51
52 ### find out what to use for libkern
53 KERN_AS= library
54 .include "${S}/lib/libkern/Makefile.inc"
55 LIBKERN= ${KERNLIB}
56
57 ### find out what to use for libz
58 Z_AS= library
59 .include "${S}/lib/libz/Makefile.inc"
60 LIBZ= ${ZLIB}
61
62 ### find out what to use for libsa
63 SA_AS= library
64 SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
65 # for now:
66 SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
67 .include "${S}/lib/libsa/Makefile.inc"
68 LIBSA= ${SALIB}
69
70 LIBS= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
71
72 .include <bsd.prog.mk>
73