summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/stand/biosboot/Makefile
blob: efb92d2d53d6a623cfedbc393755826ecb79fb4e (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
#	$OpenBSD: Makefile,v 1.4 2012/08/21 14:46:18 pascal Exp $

MAN=	biosboot.8

.if ${MACHINE} == "amd64"
PROG=	biosboot
SRCS=	biosboot.S
LD=ld
LDFLAGS=-melf_i386 -nostdlib -Ttext 0 -N -x -Bstatic
LDFLAGS+=-L/usr/libdata 
INSTALL_STRIP=
SADIR=	${.CURDIR}/..

${PROG}: $(OBJS) $(DPADD)
	@rm -f $(PROG)
	$(LD) $(LDFLAGS) -o $(PROG) $(OBJS) $(LDADD)
	@size $(PROG)

CPPFLAGS+=-DLOADADDR=$(LOADADDR) -DLINKADDR=$(LINKADDR) -DBOOTMAGIC=$(BOOTMAGIC)
CPPFLAGS+=${DEBUGFLAGS}
CPPFLAGS+=${NOPIE_FLAGS}
AFLAGS+=-m32 # -Wa,-a
AFLAGS+=${NOPIE_FLAGS}
.else
NOPROG=
.endif

.include <bsd.prog.mk>