]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - sys/boot/sparc64/boot1/Makefile
MFC r264400,r265836:
[FreeBSD/stable/10.git] / sys / boot / sparc64 / boot1 / Makefile
1 # $FreeBSD$
2
3 PROG=   boot1.elf
4 INTERNALPROG=
5 MAN=
6 FILES?= boot1
7 SRCS=   _start.s boot1.c
8 CLEANFILES=${FILES} boot1.aout
9
10 BOOTBLOCKBASE= 0x4000
11
12 CFLAGS.clang+=-mcmodel=small
13 CFLAGS.gcc+=-mcmodel=medlow
14 CFLAGS+=-Os -I${.CURDIR}/../../common
15 LDFLAGS=-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
25 boot1.aout: boot1.elf
26         elf2aout -o ${.TARGET} ${.ALLSRC}
27
28 boot1.o: ${.CURDIR}/../../common/ufsread.c
29
30 .include <bsd.prog.mk>