#	$NetBSD$
#	$NecBSD: Makefile,v 1.4.2.3 1999/12/15 02:54:21 kmatsuda Exp $
#	$NetBSD/i386: Makefile,v 1.39 2002/02/17 20:03:08 thorpej Exp $

S=	${.CURDIR}/../../../../

BASE?= biosboot
PROG= ${BASE}.sym
NOMAN=	# defined
NEWVERSWHAT=	"BIOS Boot"
STARTFILE=	${BSSTART}
RELOC=		0x0

.if (${BASE} != "biosboot")
.PATH: ${.CURDIR}/../biosboot/
.endif

SRCS= main.c devopen.c conf.c exec.c

CPPFLAGS+= -DCOMPAT_OLDBOOT -DCOMPAT_386BSD_MBRPART

#Sample use of serial line debugger
# XXX: should -DSUPPORT_SERIAL=CONSDEV_AUTO
#CPPFLAGS+= -DSUPPORT_SERIAL
# If your machine has old I8251,
#CPPFLAGS+= -DDIRECT_SERIAL -DCONSPEED=38400
# If your machine has I8251AF,
#CPPFLAGS+= -DDIRECT_SERIAL -DCONSPEED=115200

#	.if (${BASE} == "biosboot_ser")
#	CPPFLAGS+= -DSUPPORT_SERIAL
#	# If your machine has old I8251,
#	CPPFLAGS+= -DDIRECT_SERIAL -DCONSPEED=38400
#	# If your machine has I8251AF,
#	#CPPFLAGS+= -DDIRECT_SERIAL -DCONSPEED=115200
#	.endif

CPPFLAGS+= -DPASS_BIOSGEOM
#uncomment if there are problems with memory detection
#CPPFLAGS+= -DCONSERVATIVE_MEMDETECT
#increase MAXFLENTRIES if "installboot" complains about
# "not enough fragment space in bootcode" (default: 10)
#CPPFLAGS+= -DMAXFLENTRIES=15
#set PRIM_LOADSZ to <=9 to make a 720k boot floppy (default: 15)
CPPFLAGS+= -DPRIM_LOADSZ=16

#CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop
CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main

SAMISCCPPFLAGS+= -DHEAP_START=0x20000 -DHEAP_LIMIT=0x50000
SAMISCMAKEFLAGS+= SA_USE_CREAD=yes	# Read compressed kernels
SAMISCMAKEFLAGS+= SA_INCLUDE_NET=no	# Netboot via TFTP, NFS

.if (${BASE} == "biosboot")
VERSIONFILE= ${.CURDIR}/version
.else
VERSIONFILE= ${.CURDIR}/../biosboot/version
.endif

.include "../Makefile.booters"
