blob: c8b1ed948a1ab8a6b4fb99e0db1acaf12bc19c2c (
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
|
# $OpenBSD: Makefile,v 1.3 2001/08/22 10:53:28 art Exp $
# $NetBSD: Makefile,v 1.1 2000/08/20 14:58:45 mrg Exp $
CURDIR= ${.CURDIR}
S= ${CURDIR}/../../../..
#
# Override normal settings
#
CLEANFILES= assym.fth.h assym.fth.h.tmp machine sparc \
bootblk bootblk.text bootblk.text.tmp
NOMAN=
STRIPFLAG=
# deal with Solaris vs. NetBSD build environments for now ..
OS!=uname -s
.if (${OS} == "NetBSD")
USE_GENASSYM?= no
SVR4=
.else
USE_GENASSYM?= yes
SVR4=-U__SVR4 -U__svr4__ -D__NetBSD__
.endif
INCLUDES= -I. -I$S/arch -I$S -nostdinc
CPPFLAGS= ${INCLUDES} ${IDENT} ${PARAM} -D_LKM ${SVR4}
all: bootblk.text bootblk
#clean::
# rm assym.fth.h bootblk.text machine bootblk
sparc:
ln -s ${.CURDIR}/../../../sparc/include sparc
machine:
ln -s ${.CURDIR}/../../../${MACHINE}/include machine
assym.fth.h: ${.CURDIR}/genassym.sh genfth.cf machine
sh ${.CURDIR}/genassym.sh ${CC} ${CFLAGS} \
${CPPFLAGS} ${PROF} <${.CURDIR}/genfth.cf >assym.fth.h.tmp && \
mv -f assym.fth.h.tmp assym.fth.h
bootblk.text: bootblk.fth assym.fth.h
awk '/fload/ { print "#include \"" $$2 "\"" }; !/fload/' \
${.CURDIR}/bootblk.fth | /usr/bin/cpp -P >bootblk.text.tmp &&
mv -f bootblk.text.tmp bootblk.text
bootblk: bootblk.fth assym.fth.h
fgen -o bootblk ${.CURDIR}/bootblk.fth
beforedepend:
@touch .depend
beforeinstall:
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE} \
bootblk ${DESTDIR}/usr/mdec
#
# The following are if you grab the fakeboot program from the Sun website
#
fake: bootblk bootblk.text
../fakeboot/fakeboot -elf32 <bootblk >/bootblk
../fakeboot/fakeboot -elf32 <bootblk.text >/bootblk.text
.include <bsd.prog.mk>
|