Merge from vendor branch NTPD:
[dragonfly.git] / sys / boot / i386 / boot0 / 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/boot0/Attic/Makefile,v 1.5 2004/07/19 23:30:31 dillon Exp $
3
4 PROG=           boot0
5 NOMAN=
6 STRIP=
7 BINDIR?=        /boot
8 BINMODE=        444
9
10 .PATH: ${.CURDIR}/..
11
12 # The default set of flags compiled into boot0.  This enables update (writing
13 # the modified boot0 back to disk after running so that the selection made is
14 # saved), packet mode (detect and use the BIOS EDD extensions if we try to
15 # boot past the 1024 cylinder liimt), and booting from all valid slices.
16 BOOT_BOOT0_FLAGS?=      0xf
17
18 # The number of timer ticks to wait for a keypress before assuming the default
19 # selection.  Since there are 18.2 ticks per second, the default value of
20 # 0xb6 (182d) corresponds to 10 seconds.
21 BOOT_BOOT0_TICKS?=      0xb6
22
23 # pull BOOT0_ORIGIN out of bootasm.h
24 #
25 #
26 boot0: boot0.o bootasmdef.nx
27         @echo "boot0 origin set to `${.OBJDIR}/bootasmdef.nx BOOT0_ORIGIN`"
28         ${LD} -N -e start -Ttext `${.OBJDIR}/bootasmdef.nx BOOT0_ORIGIN` -o boot0.out boot0.o
29         objcopy -S -O binary boot0.out ${.TARGET}
30
31 boot0.o: boot0.S
32         ${CC} -c -DFLAGS=${BOOT_BOOT0_FLAGS} -DTICKS=${BOOT_BOOT0_TICKS} \
33                 ${AFLAGS} ${.IMPSRC} -o ${.TARGET}
34
35 CLEANFILES+= boot0.out boot0.o bootasmdef.nx
36
37 .include <bsd.prog.mk>