Merge from vendor branch GCC:
[dragonfly.git] / sys / boot / i386 / bootn0 / Makefile
1 # $FreeBSD: src/sys/boot/i386/boot0/Makefile,v 1.17 2002/09/17 01:48:54 peter Exp $
2 # $DragonFly: src/sys/boot/i386/bootn0/Attic/Makefile,v 1.1 2004/06/26 02:00:11 dillon Exp $
3
4 PROG=           boot0
5 NOMAN=
6 STRIP=
7 BINDIR?=        /boot
8 BINMODE=        444
9
10 # The default set of flags compiled into boot0.  This enables update (writing
11 # the modified boot0 back to disk after running so that the selection made is
12 # saved), packet mode (detect and use the BIOS EDD extensions if we try to
13 # boot past the 1024 cylinder liimt), and booting from all valid slices.
14 BOOT_BOOT0_FLAGS?=      0xf
15
16 # The number of timer ticks to wait for a keypress before assuming the default
17 # selection.  Since there are 18.2 ticks per second, the default value of
18 # 0xb6 (182d) corresponds to 10 seconds.
19 BOOT_BOOT0_TICKS?=      0xb6
20
21 # We relocate boot0 to this address, with the stack heading downward and 
22 # the contents of boot0 heading upward.
23 BOOT_BOOT0_ORG?=        0x91000
24
25 boot0: boot0.o
26         ${LD} -N -e start -Ttext ${BOOT_BOOT0_ORG} -o boot0.out boot0.o
27         objcopy -S -O binary boot0.out ${.TARGET}
28
29 boot0.o: boot0.S
30         ${CC} -E ${.IMPSRC} | \
31         ${AS} ${AFLAGS} --defsym FLAGS=${BOOT_BOOT0_FLAGS} \
32                 --defsym TICKS=${BOOT_BOOT0_TICKS} -o ${.TARGET}
33
34 CLEANFILES+= boot0.out boot0.o
35
36 .include <bsd.prog.mk>