1 # $NetBSD: Makefile,v 1.35 2023/11/06 07:02:17 rin Exp $ 2 3 S= ${.CURDIR}/../../../.. 4 5 BASE= dosboot 6 PROG= ${BASE}.com 7 NEWVERSWHAT= "DOS Boot" 8 STARTFILE= ${DOSSTART} 9 RELOC= 0x100 10 11 SRCS= main.c devopen.c exec.c exec_multiboot1.c exec_multiboot2.c 12 13 CPPFLAGS+= -DSLOW # for libz 14 CPPFLAGS+= -DCOMPAT_386BSD_MBRPART 15 CPPFLAGS+= -DXMS 16 CPPFLAGS+= -DLIBSA_ENABLE_LS_OP 17 CPPFLAGS+= -DNO_MULTIBOOT2 # keep the binary small 18 #uncomment if there are problems with memory detection 19 #CPPFLAGS+= -DCONSERVATIVE_MEMDETECT 20 21 #CFLAGS= -O2 -fomit-frame-pointer -fno-defer-pop 22 CFLAGS+= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wno-main 23 24 # XXX should go into library 25 SRCS+= getopt.c 26 .PATH: ${.CURDIR}/../libsa 27 28 # XXX these should depend on the size of the image 29 CPPFLAGS+= -DSTACK_START=0x10000 30 SAMISCCPPFLAGS+= -DHEAP_START=0x20000 -DHEAP_LIMIT=0x50000 31 SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_INCLUDE_NET=no SA_ENABLE_LS_OP=yes 32 I386MISCMAKEFLAGS= I386_INCLUDE_DOS=yes 33 34 # DOS command line arguments are located at 0x0000. 35 COPTS.doscommain.c+= -fno-delete-null-pointer-checks 36 37 # Do not page-align data segment. 38 LDFLAGS+= -Wl,-N 39 40 VERSIONFILE= ${.CURDIR}/version 41 42 .include <bsd.init.mk> 43 44 release: check_RELEASEDIR 45 ${HOST_INSTALL_FILE} -m ${BINMODE} dosboot.com \ 46 ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/misc 47 48 .include "../Makefile.booters" 49