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