Makefile.booters revision 1.2 1 # $NetBSD: Makefile.booters,v 1.2 2001/11/22 00:58:07 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
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= -Os -g -mmemcpy -mno-abicalls -G 128
27 LDBUG= -T $S/arch/mips/conf/stand.ldscript
28
29 NETBSD_VERS!= sh ${.CURDIR}/../../../../conf/osrelease.sh
30 CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"'
31
32 # PROG set by parent.
33 MKMAN= no
34
35 # We load the kernel at 512K in from the start of RAM to give the boot
36 # loader plenty of breathing room. Load the boot loader starting at
37 # the second page of RAM.
38 LOAD_ADDRESS?= 0x88002000
39
40 # if there is a 'version' file, add rule for vers.c and add it to SRCS
41 # and CLEANFILES
42 .if exists(version)
43 .PHONY: vers.c
44 vers.c: ${.CURDIR}/version
45 sh ${S}/conf/newvers_stand.sh -N ${.CURDIR}/version "sgimips"
46
47 SRCS+= vers.c
48 CLEANFILES+= vers.c
49 .endif
50
51 ### find out what to use for libkern
52 KERN_AS= library
53 .include "${S}/lib/libkern/Makefile.inc"
54 LIBKERN= ${KERNLIB}
55
56 ### find out what to use for libz
57 Z_AS= library
58 .include "${S}/lib/libz/Makefile.inc"
59 LIBZ= ${ZLIB}
60
61 ### find out what to use for libsa
62 SA_AS= library
63 SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
64 # for now:
65 SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
66 .include "${S}/lib/libsa/Makefile.inc"
67 LIBSA= ${SALIB}
68
69 LIBS= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
70
71 cleandir distclean: cleanlibdir
72
73 cleanlibdir:
74 rm -rf lib
75
76 .include <bsd.prog.mk>
77