Merge from vendor branch LIBSTDC++:
[dragonfly.git] / sys / i386 / boot / rawboot / Makefile
1 # $FreeBSD: src/sys/i386/boot/rawboot/Makefile,v 1.13.2.1 2002/08/07 16:31:56 ru Exp $
2 # $DragonFly: src/sys/i386/boot/rawboot/Attic/Makefile,v 1.3 2003/11/15 19:01:35 dillon Exp $
3 #
4
5 PROG=   boot
6
7 # Order is very important on the SRCS line for this prog
8 SRCS=   start.S table.c boot2.S boot.c asm.S bios.S serial.S
9 SRCS+=  probe_keyboard.c io.c disk.c sys.c
10
11 .PATH:  ${.CURDIR}/../biosboot
12
13 BINMODE=        444
14 CFLAGS=         -O2 -malign-functions=0 -malign-jumps=0 -malign-loops=0 \
15                 -DRAWBOOT \
16                 -I${.CURDIR}/../biosboot \
17                 -DBOOTWAIT=${BOOTWAIT} -DTIMEOUT=${TIMEOUT}
18 CFLAGS+=        -DBOOTSEG=${BOOTSEG} -DBOOTSTACK=${BOOTSTACK}
19 CFLAGS+=        ${CWARNFLAGS}
20
21 # By default, if a serial port is going to be used as console, use COM1
22 # (aka /dev/ttyd0).
23 BOOT_COMCONSOLE_PORT?=0x3F8
24 CFLAGS+=        -DCOMCONSOLE=${BOOT_COMCONSOLE_PORT}
25
26 BOOT_COMCONSOLE_SPEED?=9600
27 CFLAGS+=        -DCONSPEED=${BOOT_COMCONSOLE_SPEED}
28
29 # Enable code to take the default boot string from a fixed location on the
30 # disk.  See nextboot(8) and README.386BSD for more info.
31 #CFLAGS+=       -DNAMEBLOCK
32 #CFLAGS+=       -DNAMEBLOCK_WRITEBACK
33
34 # Bias the conversion from the BIOS drive number to the FreeBSD unit number
35 # for hard disks.  This may be useful for people booting in a mixed IDE/SCSI
36 # environment (set BOOT_HD_BIAS to the number of IDE drives).
37 #CFLAGS+=       -DBOOT_HD_BIAS=1
38 #
39 # Details: this only applies if BOOT_HD_BIAS > 0.  If the BIOS drive number
40 # for the boot drive is >= BOOT_HD_BIAS, then the boot drive is assumed to
41 # be SCSI and have unit number (BIOS_drive_number - BOOT_HD_BIAS).  E.g.,
42 # BOOT_HD_BIAS=1 makes BIOS drive 1 correspond to 1:sd(0,a) instead of
43 # 1:wd(1,a).  If `sd' is given explicitly, then the drive is assumed to be
44 # SCSI and have BIOS drive number (sd_unit_number + BOOT_HD_BIAS).  E.g.,
45 # BOOT_HD_BIAS=1 makes sd(0,a) correspond to 1:sd(0,a) instead of 0:sd(0,a).
46
47 CLEANFILES+=    boot.nohdr boot.strip rawboot sizetest
48 LDFLAGS+=       -N -T 0 -nostdlib
49 NOSHARED=       YES
50 NOMAN=
51 STRIP=
52
53 # tunable timeout parameter, waiting for keypress, calibrated in ms
54 BOOTWAIT?=      5000
55 # tunable timeout during string input, calibrated in ms
56 #TIMEOUT?=      30000
57
58 # Location that boot2 is loaded at
59 BOOTSEG=        0x1000
60
61 # Offset in BOOTSEG for the top of the stack, keep this 16 byte aligned
62 BOOTSTACK=      0xFFF0
63
64 boot.strip:     boot
65         cp -p boot boot.strip
66         strip -aout boot.strip
67         size -aout boot.strip
68
69 boot.nohdr:     boot.strip
70         dd if=boot.strip of=boot.nohdr ibs=32 skip=1 obs=1024b
71         ls -l boot.nohdr
72
73 rawboot:        boot.nohdr
74         dd if=boot.nohdr of=rawboot bs=8k count=1 conv=sync
75
76 all:            rawboot
77
78 install:
79         ${INSTALL} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}\
80                 rawboot ${DESTDIR}${BINDIR}/rawboot
81
82 .include "../../../conf/bsd.kern.mk"
83 .include <bsd.prog.mk>