Changeset View
Changeset View
Standalone View
Standalone View
sys/boot/sparc64/boot1/Makefile
# $FreeBSD$ | # $FreeBSD$ | ||||
PROG= boot1.elf | PROG= boot1.elf | ||||
INTERNALPROG= | INTERNALPROG= | ||||
MAN= | MAN= | ||||
FILES?= boot1 | FILES?= boot1 | ||||
SRCS= _start.s boot1.c | SRCS= _start.s boot1.c | ||||
CLEANFILES=${FILES} boot1.aout | CLEANFILES=${FILES} boot1.aout | ||||
BOOTBLOCKBASE= 0x4000 | BOOTBLOCKBASE= 0x4000 | ||||
CFLAGS.clang+=-mcmodel=small | CFLAGS.clang+=-mcmodel=small | ||||
CFLAGS.gcc+=-mcmodel=medlow | CFLAGS.gcc+=-mcmodel=medlow | ||||
CFLAGS+=-Os -I${.CURDIR}/../../common | CFLAGS+=-I${.CURDIR}/../../common | ||||
LDFLAGS=-Ttext ${BOOTBLOCKBASE} -Wl,-N | LDFLAGS=-Ttext ${BOOTBLOCKBASE} -Wl,-N | ||||
# Construct boot1. sunlabel expects it to contain zeroed-out space for the | # Construct boot1. sunlabel expects it to contain zeroed-out space for the | ||||
# label, and to be of the correct size. | # label, and to be of the correct size. | ||||
${FILES}: boot1.aout | ${FILES}: boot1.aout | ||||
@set -- `ls -l boot1.aout`; x=$$((7680-$$5)); \ | @set -- `ls -l boot1.aout`; x=$$((7680-$$5)); \ | ||||
echo "$$x bytes available"; test $$x -ge 0 | echo "$$x bytes available"; test $$x -ge 0 | ||||
${DD} if=/dev/zero of=${.TARGET} bs=512 count=16 | ${DD} if=/dev/zero of=${.TARGET} bs=512 count=16 | ||||
${DD} if=boot1.aout of=${.TARGET} bs=512 oseek=1 conv=notrunc | ${DD} if=boot1.aout of=${.TARGET} bs=512 oseek=1 conv=notrunc | ||||
boot1.aout: boot1.elf | boot1.aout: boot1.elf | ||||
elf2aout -o ${.TARGET} ${.ALLSRC} | elf2aout -o ${.TARGET} ${.ALLSRC} | ||||
boot1.o: ${.CURDIR}/../../common/ufsread.c | boot1.o: ${.CURDIR}/../../common/ufsread.c | ||||
.include <bsd.prog.mk> | .include <bsd.prog.mk> |