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