blob: d20ea626bf6dab200cc5c9ad9316724e621f8e5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
# $OpenBSD: Makefile,v 1.11 1997/07/13 07:21:43 downsj Exp $
# $NetBSD: Makefile,v 1.22 1996/10/18 06:03:25 thorpej Exp $
# @(#)Makefile 8.1 (Berkeley) 6/10/93
NOPROG= noprog
NOMAN= noman
#SUBDIR= libkern libsa
# RELOC=FFF00000 allows for boot prog up to FF000 (1044480) bytes long
RELOC= FFF00000
CONS= -DDCACONSOLE -DITECONSOLE -DDCMCONSOLE -DAPCICONSOLE
CONS+= -DHIL_KEYBOARD -DUK_KEYBOARD -DDOMAIN_KEYBOARD
DEFS= -DSTANDALONE ${CONS} -Dhp300
#DEFS+= -DNETIF_DEBUG -DRPC_DEBUG -DNFS_DEBUG -DRARP_DEBUG -DNET_DEBUG
#DEFS+= -DLE_DEBUG
CFLAGS= -O3 -msoft-float ${INCPATH} ${DEFS}
SRCS= apci.c autoconf.c cons.c ct.c dca.c dcm.c devopen.c dnkbd.c fhpib.c \
hd.c hil.c hpib.c if_le.c ite.c ite_dv.c ite_gb.c ite_rb.c \
ite_subr.c ite_tc.c ite_hy.c kbd.c kbdconf.c kbdvar.h machdep.c \
nhpib.c prf.c scsi.c sd.c version.c
OBJS= ${SRCS:N*.h:R:S/$/.o/g}
S= ${.CURDIR}/../../..
.PATH: ${S}/arch/${MACHINE_ARCH}/${MACHINE_ARCH}
.PATH: ${S}/stand
INCPATH=-I${.CURDIR} -I${.CURDIR}/../.. -I${S} -I${S}/lib/libsa
.include "${.CURDIR}/libkern/Makefile.inc"
LIBKERN= ${KERN_LIB}
### find out what to use for libz
Z_AS= library
.include "${S}/lib/libz/Makefile.inc"
LIBZ= ${ZLIB}
.include "${.CURDIR}/libsa/Makefile.inc"
LIBSA= ${SA_LIB}
LIBS= ${OBJS} ${LIBSA} ${LIBZ} ${LIBKERN}
BOOTS= uboot.lif
BOOTAOUTS=uboot
ALL= ${BOOTS} mkboot installboot
all: ${ALL}
${BOOTS}: ${LIBS}
# depend on CFLAGS
${OBJS}: Makefile
# startups
srt0.o: ${.CURDIR}/srt0.s
${CC} ${INCPATH} ${DEFS} -c ${.CURDIR}/srt0.s
# unified boot program (disk, network, tape)
uboot.lif: uboot mkboot
./mkboot uboot $@
uboot: srt0.o uboot.o tgets.o netio.o clock.o conf.o ${LIBS}
${LD} -N -T ${RELOC} -e begin srt0.o uboot.o tgets.o netio.o clock.o \
conf.o ${LIBS} -o $@
@size $@
@echo $@ total size should not exceed 1044480 bytes
# helper program ... turns OMAGIC into LIF
mkboot: ${.CURDIR}/mkboot.c
${CC} ${CFLAGS} ${.CURDIR}/mkboot.c -o $@
installboot: ${.CURDIR}/installboot.sh
@rm -f installboot
cp -p ${.CURDIR}/installboot.sh installboot
# utilities
clean::
rm -f *.o *.i
rm -f a.out ${BOOTS} ${BOOTAOUTS}
rm -f mkboot installboot
install:
${INSTALL} -d -m 755 -o ${BINOWN} -g ${BINGRP} \
${DESTDIR}/usr/mdec/rbootd
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 555 installboot \
${DESTDIR}/usr/mdec
${INSTALL} -c -o ${BINOWN} -g ${BINGRP} -m 444 uboot.lif \
${DESTDIR}/usr/mdec
rm -f ${DESTDIR}/usr/mdec/hdboot
ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/hdboot
rm -f ${DESTDIR}/usr/mdec/boothd
ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/boothd
rm -f ${DESTDIR}/usr/mdec/sdboot
ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/sdboot
rm -f ${DESTDIR}/usr/mdec/bootsd
ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/bootsd
rm -f ${DESTDIR}/usr/mdec/ctboot
ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/ctboot
rm -f ${DESTDIR}/usr/mdec/bootct
ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/bootct
rm -f ${DESTDIR}/usr/mdec/rbootd/SYS_UBOOT
ln ${DESTDIR}/usr/mdec/uboot.lif ${DESTDIR}/usr/mdec/rbootd/SYS_UBOOT
#obj: _SUBDIRUSE
.include <bsd.prog.mk>
|