blob: b38e8e7adc1a5a85bb66f1440ad675d2af06bb86 (
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
|
# $OpenBSD: Makefile,v 1.10 1997/08/13 04:03:29 mickey Exp $
PROG= boot
SRCS= srt0.S boot.c cmd.c kentry.c conf.c
#AFLAGS+=-Wa,-R
# AFLAGS+=-Wa,-a
LD=ld
LDFLAGS+=-nostdlib -Ttext $(LINKADDR) -z -x -Bstatic
INSTALL_STRIP=
MAN= boot.8
S =${.CURDIR}/../../../..
SADIR= ${.CURDIR}/..
LDADD= ${LIBSA} ${LIBZ}
DPADD= ${LIBSA} ${LIBZ}
all: machine-links
machine-links:
@rm -f machine i386
@ln -fs ${.CURDIR}/../.. i386
@ln -fs ${.CURDIR}/../../include machine
kentry.o: kentry.c
@echo ${COMPILE.c} ${.IMPSRC}
@${COMPILE.c} -S -o tmp.s ${.IMPSRC}
@sed 's/ret/lret/g' tmp.s | ${AS} -f -o $@
@rm tmp.s
${PROG}: $(OBJS) $(DPADD)
$(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LDADD)
@size $(PROG)
.include <bsd.prog.mk>
CPPFLAGS+=-DBOOTMAGIC=$(BOOTMAGIC) ${DEBUGFLAGS}
CFLAGS+=$(SACFLAGS)
.ifdef NO_NET
CPPFLAGS+=-DNO_NET
.endif
|