Makefile revision 97867
1# $FreeBSD: head/sys/boot/sparc64/boot1/Makefile 97867 2002-06-05 12:30:45Z phk $
2
3PROG=		boot1
4SRCS=		_start.S boot1.c
5NOMAN=
6STRIP=
7BINDIR?=	/boot
8BINMODE=	444
9
10BOOTBLOCKBASE=	0x4000
11
12CFLAGS=	-ffreestanding -mcmodel=medlow -Os -I../.. -I../../common -I${.CURDIR}/../../common
13
14boot1.elf: _start.o boot1.o
15	${LD} -N -Ttext ${BOOTBLOCKBASE} -o ${.TARGET} ${.ALLSRC}
16
17boot1.aout: boot1.elf
18	elf2aout -o ${.TARGET} ${.ALLSRC}
19
20boot1.o:	${.CURDIR}/../../common/ufsread.c
21
22# Construct boot1. disklabel expects it to contain zeroed-out space for the
23# label, and to be of the correct size.
24boot1: boot1.aout
25	dd if=/dev/zero of=${.TARGET} bs=512 count=16
26	dd if=boot1.aout of=${.TARGET} bs=512 oseek=1 conv=notrunc
27
28CLEANFILES+=	boot1.elf boot1.aout
29
30.include <bsd.prog.mk>
31