Makefile revision 66555
1# $FreeBSD: head/sys/boot/i386/boot0/Makefile 66555 2000-10-02 17:23:16Z rnordier $
2
3MAINTAINER=	rnordier
4
5PROG=		boot0
6NOMAN=
7STRIP=
8BINDIR?=	/boot
9BINMODE=	444
10
11M4?=	m4
12
13# The default set of flags compiled into boot0.  This enables update (writing
14# the modified boot0 back to disk after running so that the selection made is
15# saved), packet mode (detect and use the BIOS EDD extensions if we try to
16# boot past the 1024 cylinder liimt), and booting from all valid slices.
17BOOT_BOOT0_FLAGS?=	0x8f
18
19# The number of timer ticks to wait for a keypress before assuming the default
20# selection.  Since there are 18.2 ticks per second, the default value of
21# 0xb6 (182d) corresponds to 10 seconds.
22BOOT_BOOT0_TICKS?=	0xb6
23
24# The base address that we the boot0 code to to run it.  Don't change this
25# unless you are glutton for punishment.
26BOOT_BOOT0_ORG?=	0x600
27
28boot0: boot0.o
29.if ${OBJFORMAT} == aout
30	${LD} -N -s -T ${BOOT_BOOT0_ORG} -o boot0.out boot0.o
31	dd if=boot0.out of=${.TARGET} ibs=32 skip=1
32.else
33	${LD} -N -e start -Ttext ${BOOT_BOOT0_ORG} -o boot0.out boot0.o
34	objcopy -S -O binary boot0.out ${.TARGET}
35.endif
36
37boot0.o: boot0.s
38	${AS} ${AFLAGS} --defsym FLAGS=${BOOT_BOOT0_FLAGS} \
39		--defsym TICKS=${BOOT_BOOT0_TICKS} ${.IMPSRC} -o ${.TARGET}
40
41CLEANFILES+= boot0.out boot0.o
42
43.include <bsd.prog.mk>
44