0463b4a2fb
1. Make libefi portable by removing ia64 specific code and build it on i386 and amd64 by default to prevent regressions. These changes include fixes and improvements over previous code to establish or improve APIs where none existed or when the amount of kluging was unacceptably high. 2. Increase the amount of sharing between the efi and ski loaders to improve maintainability of the loaders and simplify making changes to the loader-kernel handshaking in the future. The version of the efi and ski loaders are now both changed to 1.2 as user visible improvements and changes have been made.
59 lines
1.5 KiB
Makefile
59 lines
1.5 KiB
Makefile
# $FreeBSD$
|
|
|
|
NO_MAN=
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
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>
|