1# $FreeBSD: releng/10.2/sys/boot/sparc64/boot1/Makefile 276486 2014-12-31 23:25:37Z ngie $ 2 3PROG= boot1.elf 4INTERNALPROG= 5MAN= 6FILES?= boot1 7SRCS= _start.s boot1.c 8CLEANFILES=${FILES} boot1.aout 9 10BOOTBLOCKBASE= 0x4000 11 12CFLAGS.clang+=-mcmodel=small 13CFLAGS.gcc+=-mcmodel=medlow 14CFLAGS+=-Os -I${.CURDIR}/../../common 15LDFLAGS=-Ttext ${BOOTBLOCKBASE} -Wl,-N 16 17# Construct boot1. sunlabel expects it to contain zeroed-out space for the 18# label, and to be of the correct size. 19${FILES}: boot1.aout 20 @set -- `ls -l boot1.aout`; x=$$((7680-$$5)); \ 21 echo "$$x bytes available"; test $$x -ge 0 22 dd if=/dev/zero of=${.TARGET} bs=512 count=16 23 dd if=boot1.aout of=${.TARGET} bs=512 oseek=1 conv=notrunc 24 25boot1.aout: boot1.elf 26 elf2aout -o ${.TARGET} ${.ALLSRC} 27 28boot1.o: ${.CURDIR}/../../common/ufsread.c 29 30.include <bsd.prog.mk> 31