diff options
author | Warner Losh <imp@FreeBSD.org> | 2019-05-03 21:13:04 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2019-05-03 21:13:04 +0000 |
commit | ce2403e6725bc92bd66e1513880e3cab89fa2a48 (patch) | |
tree | e970c42536f6f3d0b36d691397590d89e857aa76 | |
parent | 6f21634d55d0a4562cc73a28da50afa1ddec6c25 (diff) | |
download | src-ce2403e6725bc92bd66e1513880e3cab89fa2a48.tar.gz src-ce2403e6725bc92bd66e1513880e3cab89fa2a48.zip |
Substitute boot1 with ${BOOT1}
Allow for other names to be built, so parameterize this makefile to
avoid hard coding boot1.
Notes
Notes:
svn path=/head/; revision=347061
-rw-r--r-- | stand/efi/boot1/Makefile | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/stand/efi/boot1/Makefile b/stand/efi/boot1/Makefile index 721d193df5af..68695c30d779 100644 --- a/stand/efi/boot1/Makefile +++ b/stand/efi/boot1/Makefile @@ -2,7 +2,8 @@ .include <bsd.init.mk> -PROG= boot1.sym +BOOT1?= boot1 +PROG= ${BOOT1}.sym INTERNALPROG= WARNS?= 6 @@ -51,8 +52,8 @@ CFLAGS+= -DEFI_DEBUG .PATH: ${LDRSRC} CFLAGS+= -I${LDRSRC} -FILES= boot1.efi boot1.efifat -FILESMODE_boot1.efi= ${BINMODE} +FILES= ${BOOT1}.efi ${BOOT1}.efifat +FILESMODE_${BOOT1}.efi= ${BINMODE} LDSCRIPT= ${EFISRC}/loader/arch/${MACHINE}/ldscript.${MACHINE} LDFLAGS+= -Wl,-T${LDSCRIPT},-Bsymbolic,-znotext -shared @@ -77,7 +78,7 @@ LDADD+= ${LIBEFI} ${LIBSA} DPADD+= ${LDSCRIPT} -boot1.efi: ${PROG} +${BOOT1}.efi: ${PROG} if ${NM} ${.ALLSRC} | grep ' U '; then \ echo "Undefined symbols in ${.ALLSRC}"; \ exit 1; \ @@ -93,7 +94,7 @@ boot1.efi: ${PROG} .include "Makefile.fat" -boot1.efifat: boot1.efi +${BOOT1}.efifat: ${BOOT1}.efi @set -- `ls -l ${.ALLSRC}`; \ x=$$(($$5-${BOOT1_MAXSIZE})); \ if [ $$x -ge 0 ]; then \ @@ -104,6 +105,6 @@ boot1.efifat: boot1.efi xz -d -c ${BOOTSRC}/efi/boot1/fat-${MACHINE}.tmpl.xz > ${.TARGET} ${DD} if=${.ALLSRC} of=${.TARGET} seek=${BOOT1_OFFSET} conv=notrunc -CLEANFILES+= boot1.efi boot1.efifat +CLEANFILES+= ${BOOT1}.efi ${BOOT1}.efifat .include <bsd.prog.mk> |