85 lines
2.1 KiB
Makefile
85 lines
2.1 KiB
Makefile
# $NetBSD: Makefile.booters,v 1.21 2011/02/26 16:26:58 matt Exp $
|
|
|
|
# PROG set by parent.
|
|
NOMAN= # defined
|
|
|
|
.include <bsd.own.mk>
|
|
.include <bsd.sys.mk> # for HOST_SH
|
|
|
|
# $S must correspond to the top of the 'sys' tree
|
|
S= ${.CURDIR}/../../../..
|
|
|
|
BINMODE?= 444
|
|
|
|
# XXX SHOULD NOT NEED TO DEFINE THESE!
|
|
LIBCRT0=
|
|
LIBC=
|
|
LIBCRTBEGIN=
|
|
LIBCRTEND=
|
|
|
|
realall: ${PROG}
|
|
|
|
.PATH: ${.CURDIR}/../common
|
|
.PATH.S: ${S}/dev/arcbios
|
|
AFLAGS+= -D_LOCORE -D_KERNEL -mno-abicalls
|
|
CPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -I${.OBJDIR} -I${S}
|
|
# compiler flags for smallest code size
|
|
CFLAGS= -ffreestanding -Os -Wall -Werror -mno-abicalls -msoft-float -G 1024
|
|
.if ${MACHINE_ARCH} == "mips64eb"
|
|
AFLAGS+= -mips3 -mabi=32
|
|
CFLAGS+= -mips3 -mabi=32
|
|
.endif
|
|
CWARNFLAGS+= -Wall -Werror
|
|
CWARNFLAGS+= -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith
|
|
CWARNFLAGS+= -Wno-pointer-sign
|
|
LDBUG= -T $S/arch/mips/conf/stand.ldscript
|
|
NETBSD_VERS!= ${HOST_SH} ${.CURDIR}/../../../../conf/osrelease.sh
|
|
CPPFLAGS+= -DNETBSD_VERS='"${NETBSD_VERS}"'
|
|
|
|
CPPFLAGS+= -Dsgimips
|
|
|
|
.include "${S}/dev/arcbios/Makefile.inc"
|
|
|
|
# We load the kernel at 420K 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.
|
|
# A warm thank-you to SGI for making load addresses different :)
|
|
LOAD_ADDRESS?= 0x88002000
|
|
LOAD_ADDRESS_IP32?= 0x80002000
|
|
|
|
# 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
|
|
${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \
|
|
${.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}
|
|
|
|
.include <bsd.klinks.mk>
|
|
.include <bsd.prog.mk>
|