Make BOOTWAIT a truly tunable parameter. It was hard-set before.
[unix-history] / sys / i386 / boot / Makefile
CommitLineData
15637ed4 1#
15637ed4
RG
2# Permission to use, copy, modify and distribute this software and its
3# documentation is hereby granted, provided that both the copyright
4# notice and this permission notice appear in all copies of the
5# software, derivative works or modified versions, and any portions
6# thereof, and that both notices appear in supporting documentation.
7#
8# CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
9# CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
10# ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
11#
12# Carnegie Mellon requests users of this software to return to
13#
14# Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
15# School of Computer Science
16# Carnegie Mellon University
17# Pittsburgh PA 15213-3890
18#
19# any improvements or extensions that they make and grant Carnegie Mellon
20# the rights to redistribute these changes.
21#
e4270b63 22# from: Mach, Revision 2.2 92/04/04 11:33:46 rpd
dabe7334 23# $Id: Makefile,v 1.9 1994/06/16 03:53:24 adam Exp $
15637ed4 24#
e4270b63 25
a27f4645
RM
26wd0:
27 dd if=boot of=biosboot count=1
28 dd if=boot of=bootbios skip=1
29 disklabel -r -w wd0 nec5655 newboot biosboot bootbios
30 rm biosboot bootbios
15637ed4 31
a27f4645
RM
32NOPROG= noprog
33NOMAN= noman
34
25809f7b 35# tunable loopcount parameter, waiting for keypress
dabe7334 36BOOTWAIT?= 2400
25809f7b
AD
37
38CFLAGS = -O2 -DDO_BAD144 -DBOOTWAIT=${BOOTWAIT} -I${.CURDIR}
15637ed4 39LIBS= -lc
a27f4645 40INC= -I${.CURDIR}/../..
15637ed4 41
a27f4645 42# start.o should be first
15637ed4
RG
43OBJS = start.o table.o boot2.o boot.o asm.o bios.o io.o disk.o sys.o
44
a27f4645 45.SUFFIXES: .S .c .o
15637ed4 46
15637ed4 47.c.o:
a27f4645
RM
48 $(CC) $(CFLAGS) $(INC) -c $<
49
50.S.o:
51 $(CC) $(CFLAGS) -c $<
52
53boot: $(OBJS)
6801b768 54 $(LD) -Bstatic -N -T 0 -o boot $(OBJS) $(LIBS)
15637ed4
RG
55 cp boot boot.sym
56 @strip boot
a27f4645 57 @sh ${.CURDIR}/rmaouthdr boot boot.tmp
15637ed4
RG
58 @mv -f boot.tmp boot
59 @ls -l boot
60
61biosboot: boot
62 dd if=boot of=biosboot count=1
63
64bootbios: boot
65 dd if=boot of=bootbios skip=1
66
e98a45f5
JH
67${DESTDIR}/usr/mdec/bootsd: bootbios
68 cp bootbios ${DESTDIR}/usr/mdec/bootsd
15637ed4 69
e98a45f5
JH
70${DESTDIR}/usr/mdec/sdboot: biosboot
71 cp biosboot ${DESTDIR}/usr/mdec/sdboot
15637ed4 72
e98a45f5
JH
73${DESTDIR}/usr/mdec/bootwd: ${DESTDIR}/usr/mdec/bootsd
74 rm -f ${DESTDIR}/usr/mdec/bootwd
75 ln ${DESTDIR}/usr/mdec/bootsd ${DESTDIR}/usr/mdec/bootwd
15637ed4 76
e98a45f5
JH
77${DESTDIR}/usr/mdec/wdboot: ${DESTDIR}/usr/mdec/sdboot
78 rm -f ${DESTDIR}/usr/mdec/wdboot
79 ln ${DESTDIR}/usr/mdec/sdboot ${DESTDIR}/usr/mdec/wdboot
15637ed4 80
e98a45f5
JH
81${DESTDIR}/usr/mdec/bootfd: ${DESTDIR}/usr/mdec/bootsd
82 rm -f ${DESTDIR}/usr/mdec/bootfd
83 ln ${DESTDIR}/usr/mdec/bootsd ${DESTDIR}/usr/mdec/bootfd
15637ed4 84
e98a45f5
JH
85${DESTDIR}/usr/mdec/fdboot: ${DESTDIR}/usr/mdec/sdboot
86 rm -f ${DESTDIR}/usr/mdec/fdboot
87 ln ${DESTDIR}/usr/mdec/sdboot ${DESTDIR}/usr/mdec/fdboot
15637ed4 88
e98a45f5
JH
89sd: ${DESTDIR}/usr/mdec/bootsd ${DESTDIR}/usr/mdec/sdboot
90wd: ${DESTDIR}/usr/mdec/bootwd ${DESTDIR}/usr/mdec/wdboot
91fd: ${DESTDIR}/usr/mdec/bootfd ${DESTDIR}/usr/mdec/fdboot
15637ed4 92
a27f4645 93all: biosboot bootbios
15637ed4 94
a27f4645
RM
95fd0:
96 dd if=boot of=biosboot count=1
97 dd if=boot of=bootbios skip=1
98 disklabel -r -w fd0 floppy bootflpy biosboot bootbios
99 rm biosboot bootbios
15637ed4 100
a27f4645 101install: wd sd fd
15637ed4 102
bd3378a0 103clean:
15637ed4
RG
104 /bin/rm -f *.o *.d boot bootbios biosboot boot.sym
105
a27f4645 106.include <bsd.prog.mk>