1 1.37 christos # $NetBSD: Makefile,v 1.37 2021/12/15 12:52:36 christos Exp $ 2 1.10 lukem 3 1.10 lukem NOMAN= # defined 4 1.3 minoura 5 1.3 minoura .include <bsd.own.mk> 6 1.1 minoura 7 1.1 minoura BOOT= boot_ufs 8 1.6 minoura VERSIONFILE= ${.CURDIR}/version 9 1.22 apb VERSION!= ${TOOL_AWK} -F: '$$1 ~ /^[0-9.]*$$/ { it = $$1; } \ 10 1.22 apb END { print it }' ${VERSIONFILE} 11 1.6 minoura NEWVERSWHAT= "${BOOT}" 12 1.1 minoura 13 1.33 isaki # text and bss addresses 14 1.34 isaki TEXT= 0x003000 # Primary (me) 15 1.33 isaki BOOT_TEXT= 0x006000 # Secondary (/boot) 16 1.1 minoura 17 1.5 minoura PROG= xx$(BOOT) 18 1.5 minoura LINKS= ${BINDIR}/xx$(BOOT) ${BINDIR}/sd$(BOOT) 19 1.8 minoura LINKS+= ${BINDIR}/xx$(BOOT) ${BINDIR}/fd$(BOOT) 20 1.1 minoura BINDIR= /usr/mdec 21 1.1 minoura STRIPFLAG= 22 1.1 minoura BINMODE= 444 23 1.1 minoura 24 1.6 minoura S= ${.CURDIR}/../../../.. 25 1.6 minoura M= $S/arch/${MACHINE} 26 1.6 minoura LIBKERN= $S/lib/libkern/arch/${MACHINE_ARCH} 27 1.6 minoura COMMONDIR= $M/stand/common 28 1.6 minoura LIBIOCS= $M/stand/libiocs 29 1.1 minoura .PATH: ${LIBKERN} ${COMMONDIR} 30 1.11 minoura SRCS= boot.S bootmain.c readufs.c readufs_ffs.c readufs_lfs.c 31 1.1 minoura SRCS+= exec_image.S memset.S strcmp.S 32 1.6 minoura 33 1.30 christos .include "${S}/conf/newvers_stand.mk" 34 1.1 minoura 35 1.29 joerg CFLAGS= -Os -fomit-frame-pointer -fno-unwind-tables 36 1.28 christos CFLAGS+= -m68020-60 37 1.37 christos CFLAGS+= -Wall -Wstrict-prototypes -Wmissing-prototypes 38 1.33 isaki CPPFLAGS+= -DTEXTADDR="$(TEXT)" -DBOOT_TEXTADDR="$(BOOT_TEXT)" 39 1.1 minoura CPPFLAGS+= -DBOOT=\"$(BOOT)\" -DBOOT_VERS=\"$(VERSION)\" 40 1.1 minoura CPPFLAGS+= -DSCSI_ADHOC_BOOTPART 41 1.1 minoura #CPPFLAGS+= -DBOOT_DEBUG 42 1.26 tsutsui CPPFLAGS+= -DUSE_FFS -DUSE_LFS -DUSE_UFS1 -DUSE_UFS2 43 1.16 itohy CPPFLAGS+= -I${COMMONDIR} -I${LIBIOCS} -I${S} -I. -D_STANDALONE 44 1.1 minoura AFLAGS= ${CFLAGS:M-[ID]*} 45 1.35 isaki LINKFLAGS= -n -Bstatic -T ${.CURDIR}/${BOOT}.ldscript 46 1.33 isaki LINKFLAGS+= --defsym=TEXTADDR=$(TEXT) 47 1.36 isaki LINKFLAGS+= --defsym=BOOT_TEXTADDR=$(BOOT_TEXT) 48 1.15 he 49 1.15 he .include "${.CURDIR}/../Makefile.booters" 50 1.18 he .include "${S}/../common/lib/libc/Makefile.inc" 51 1.1 minoura 52 1.1 minoura 53 1.5 minoura $(PROG): $(OBJS) 54 1.20 lukem ${_MKTARGET_LINK} 55 1.35 isaki $(LD) $(LINKFLAGS) -o $(PROG) $(OBJS) $(LDADD) 56 1.1 minoura 57 1.1 minoura .include <bsd.prog.mk> 58