aabfa72384
- Build an ECOFF version of the bootloader as "boot". As a temporary measure (due to a bug in libbfd which has not yet been fixed, but for which a work-around exists as a patch), install and ELF version of the bootload as well as "boot.elf". "boot.elf" will go away once the toolchain issue is resolved.
77 lines
1.9 KiB
Makefile
77 lines
1.9 KiB
Makefile
# $NetBSD: Makefile.booters,v 1.2 2001/11/22 00:58:07 thorpej Exp $
|
|
|
|
# $S must correspond to the top of the 'sys' tree
|
|
S= ${.CURDIR}/../../../..
|
|
|
|
BINMODE?= 444
|
|
|
|
.PHONY: machine-links
|
|
beforedepend: machine-links
|
|
# ${MACHINE} then ${MACHINE_ARCH}
|
|
machine-links:
|
|
-rm -f machine && \
|
|
ln -s $S/arch/${MACHINE}/include machine
|
|
-rm -f mips && \
|
|
ln -s $S/arch/mips/include mips
|
|
CLEANFILES+= machine mips
|
|
|
|
realall: machine-links ${PROG}
|
|
|
|
.PATH: ${.CURDIR}/../common
|
|
AFLAGS+= -D_LOCORE -D_KERNEL
|
|
# -I${.CURDIR}/../.. done by Makefile.inc
|
|
#CPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -DHEAP_VARIABLE -I${.OBJDIR} -I${S}
|
|
CPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S}
|
|
# compiler flags for smallest code size
|
|
CFLAGS= -Os -g -mmemcpy -mno-abicalls -G 128
|
|
LDBUG= -T $S/arch/mips/conf/stand.ldscript
|
|
|
|
NETBSD_VERS!= sh ${.CURDIR}/../../../../conf/osrelease.sh
|
|
CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"'
|
|
|
|
# PROG set by parent.
|
|
MKMAN= no
|
|
|
|
# We load the kernel at 512K in from the start of RAM to give the boot
|
|
# loader plenty of breathing room. Load the boot loader starting at
|
|
# the second page of RAM.
|
|
LOAD_ADDRESS?= 0x88002000
|
|
|
|
# if there is a 'version' file, add rule for vers.c and add it to SRCS
|
|
# and CLEANFILES
|
|
.if exists(version)
|
|
.PHONY: vers.c
|
|
vers.c: ${.CURDIR}/version
|
|
sh ${S}/conf/newvers_stand.sh -N ${.CURDIR}/version "sgimips"
|
|
|
|
SRCS+= vers.c
|
|
CLEANFILES+= vers.c
|
|
.endif
|
|
|
|
### find out what to use for libkern
|
|
KERN_AS= library
|
|
.include "${S}/lib/libkern/Makefile.inc"
|
|
LIBKERN= ${KERNLIB}
|
|
|
|
### find out what to use for libz
|
|
Z_AS= library
|
|
.include "${S}/lib/libz/Makefile.inc"
|
|
LIBZ= ${ZLIB}
|
|
|
|
### find out what to use for libsa
|
|
SA_AS= library
|
|
SAMISCMAKEFLAGS+=SA_USE_LOADFILE=yes SA_USE_CREAD=yes
|
|
# for now:
|
|
SAMISCMAKEFLAGS+=SA_INCLUDE_NET=no
|
|
.include "${S}/lib/libsa/Makefile.inc"
|
|
LIBSA= ${SALIB}
|
|
|
|
LIBS= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN}
|
|
|
|
cleandir distclean: cleanlibdir
|
|
|
|
cleanlibdir:
|
|
rm -rf lib
|
|
|
|
.include <bsd.prog.mk>
|