blob: 00a1734c66a92c951d222706accac6ce10a812b5 (
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
|
# $OpenBSD: Makefile,v 1.20 1998/05/27 13:33:36 mickey Exp $
.include "${.CURDIR}/../Makefile.inc"
PROG= boot
LD?= ld
SIZE?= size
LDFLAGS+=-nostdlib -Bstatic
CLEANFILES+= i386 machine
.if defined(DEBUGFLAGS) && !empty(DEBUGFLAGS:M-D_TEST)
CLEANFILES+= srt0.o
SRCS= crt0.c
.else
LDFLAGS+=-Ttext $(LINKADDR) -z -x
CLEANFILES+= crt0.o
SRCS= srt0.S
.endif
SRCS+= boot.c cmd.c vars.c bootarg.c conf.c
MAN= boot.8
MLINKS= boot.8 boot.conf.8
S =${.CURDIR}/../../../..
SADIR= ${.CURDIR}/..
LDADD= ${LIBSA} ${LIBZ}
DPADD= ${LIBSA} ${LIBZ}
.PATH: ${S}/stand/boot
all: machine-links
machine-links:
@rm -f machine i386
@ln -fs ${.CURDIR}/../.. i386
@ln -fs ${.CURDIR}/../../include machine
${PROG}: $(OBJS) $(DPADD)
$(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LDADD)
@$(SIZE) $(PROG)
.include <bsd.prog.mk>
CPPFLAGS+=-DBOOTMAGIC=$(BOOTMAGIC) ${DEBUGFLAGS}
CFLAGS+=$(SACFLAGS)
#AFLAGS+=-Wa,-R
# AFLAGS+=-Wa,-a
|