blob: 5682ac85ea6127581869c7d17a18f42ac1039ebd (
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
|
# $FreeBSD$
NO_MAN=
.include <bsd.own.mk>
MK_SSP= no
PROG= loader.sym
INTERNALPROG=
SRCS= conf.c efimd.c main.c pal.S start.S vers.c
.PATH: ${.CURDIR}/../../../${MACHINE_ARCH}/${MACHINE_ARCH}
CFLAGS+= -I${.CURDIR}/../common
CFLAGS+= -I${.CURDIR}/../../common
CFLAGS+= -I${.CURDIR}/../../efi/include
CFLAGS+= -I${.CURDIR}/../../efi/include/${MACHINE_ARCH}
CFLAGS+= -I${.CURDIR}/../../..
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
LDSCRIPT= ${.CURDIR}/ldscript.${MACHINE_ARCH}
LDFLAGS= -Wl,-T${LDSCRIPT} -shared -symbolic
${PROG}: ${LDSCRIPT}
NEWVERSWHAT= "EFI boot" ${MACHINE_ARCH}
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
OBJCOPY?= objcopy
OBJDUMP?= objdump
FILES= loader.efi
FILESMODE_loader.efi= ${BINMODE}
loader.efi: loader.sym
if [ `${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*' | wc -l` != 0 ]; then \
${OBJDUMP} -t ${.ALLSRC} | fgrep '*UND*'; \
rm ${.ALLSRC}; \
exit 1; \
fi
${OBJCOPY} -j .data -j .dynamic -j .dynstr -j .dynsym -j .hash \
-j .rela.dyn -j .reloc -j .sdata -j .text \
--target=efi-app-${MACHINE_ARCH} ${.ALLSRC} ${.TARGET}
CLEANFILES= vers.c loader.efi
LIBIA64= ${.OBJDIR}/../common/libia64.a
LIBEFI= ${.OBJDIR}/../../efi/libefi/libefi.a
.if ${MK_FORTH} != "no"
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
.endif
DPADD= ${LIBIA64} ${LIBFICL} ${LIBEFI} ${LIBSTAND}
LDADD= -Wl,--whole-archive ${LIBIA64} -Wl,--no-whole-archive \
${LIBFICL} ${LIBEFI} -lstand
.include <bsd.prog.mk>
|