2001-06-09 12:49:51 -04:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
2004-02-12 03:10:34 -05:00
|
|
|
PROG= loader.sym
|
|
|
|
|
INTERNALPROG=
|
2001-06-09 12:49:51 -04:00
|
|
|
NOMAN=
|
|
|
|
|
NEWVERSWHAT= "EFI boot" ${MACHINE_ARCH}
|
|
|
|
|
|
2004-02-12 03:10:34 -05:00
|
|
|
SRCS= start.S main.c conf.c dev_net.c vers.c
|
2001-06-09 12:49:51 -04:00
|
|
|
|
2004-02-12 03:10:34 -05:00
|
|
|
.PATH: ${.CURDIR}/../libefi/arch/${MACHINE_ARCH}
|
2003-02-26 01:18:52 -05:00
|
|
|
|
|
|
|
|
.if !defined(NOFORTH)
|
2001-06-09 12:49:51 -04:00
|
|
|
# Enable BootForth
|
2001-09-04 10:48:59 -04:00
|
|
|
BOOT_FORTH= yes
|
2001-06-09 12:49:51 -04:00
|
|
|
CFLAGS+= -DBOOT_FORTH
|
2003-02-26 01:18:52 -05:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../ficl -I${.CURDIR}/../../ficl/${MACHINE_ARCH}
|
2001-06-09 12:49:51 -04:00
|
|
|
LIBFICL= ${.OBJDIR}/../../ficl/libficl.a
|
2002-04-05 23:29:36 -05:00
|
|
|
.endif
|
|
|
|
|
|
|
|
|
|
LIBEFI= ${.OBJDIR}/../libefi/libefi.a
|
|
|
|
|
|
2001-06-09 12:49:51 -04:00
|
|
|
# Always add MI sources
|
2001-06-16 02:17:16 -04:00
|
|
|
.PATH: ${.CURDIR}/../../common
|
2004-02-12 03:10:34 -05:00
|
|
|
.include "${.CURDIR}/../../common/Makefile.inc"
|
2001-06-16 02:17:16 -04:00
|
|
|
|
|
|
|
|
CFLAGS+= -I${.CURDIR}/../include
|
|
|
|
|
CFLAGS+= -I${.CURDIR}/../include/${MACHINE_ARCH}
|
2004-02-12 03:10:34 -05:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../common
|
2001-06-16 02:17:16 -04:00
|
|
|
CFLAGS+= -I${.CURDIR}/../libefi
|
2002-04-04 01:04:38 -05:00
|
|
|
CFLAGS+= -I${.CURDIR}/../../../../lib/libstand
|
2001-06-16 02:17:16 -04:00
|
|
|
CFLAGS+= -DLOADER
|
2001-06-09 12:49:51 -04:00
|
|
|
|
|
|
|
|
LDSCRIPT= ${.CURDIR}/../libefi/arch/${MACHINE_ARCH}/ldscript.${MACHINE_ARCH}
|
2004-02-12 23:45:41 -05:00
|
|
|
LDFLAGS= -Wl,-T${LDSCRIPT} -shared -symbolic
|
2002-04-05 23:11:46 -05:00
|
|
|
OBJCOPY?= objcopy
|
2001-06-09 12:49:51 -04:00
|
|
|
|
2004-02-12 23:45:41 -05:00
|
|
|
CLEANFILES= vers.c loader.efi loader.help
|
2001-06-09 12:49:51 -04:00
|
|
|
|
2004-02-12 03:10:34 -05:00
|
|
|
vers.c: ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version
|
2001-06-09 12:49:51 -04:00
|
|
|
sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT}
|
|
|
|
|
|
2004-02-12 03:10:34 -05:00
|
|
|
loader.efi: loader.sym
|
2001-06-09 12:49:51 -04:00
|
|
|
${OBJCOPY} -j .text \
|
|
|
|
|
-j .hash \
|
|
|
|
|
-j .data \
|
|
|
|
|
-j .sdata \
|
|
|
|
|
-j .dynamic \
|
|
|
|
|
-j .rela \
|
|
|
|
|
-j .reloc \
|
|
|
|
|
-j .dynsym \
|
2002-03-28 01:58:46 -05:00
|
|
|
-j .dynstr \
|
2001-06-09 12:49:51 -04:00
|
|
|
--target=efi-app-${MACHINE_ARCH} \
|
2004-02-12 03:10:34 -05:00
|
|
|
loader.sym loader.efi
|
2001-06-09 12:49:51 -04:00
|
|
|
|
2004-02-12 03:10:34 -05:00
|
|
|
loader.help: help.common
|
2001-06-16 02:17:16 -04:00
|
|
|
cat ${.ALLSRC} | awk -f ${.CURDIR}/../../common/merge_help.awk \
|
|
|
|
|
> ${.TARGET}
|
2001-06-09 12:49:51 -04:00
|
|
|
|
2004-02-12 03:10:34 -05:00
|
|
|
.PATH: ${.CURDIR}/../../forth
|
|
|
|
|
FILES= loader.efi loader.help loader.4th support.4th loader.conf
|
|
|
|
|
FILESMODE_loader.efi= ${BINMODE}
|
|
|
|
|
FILESDIR_loader.conf= /boot/defaults
|
|
|
|
|
|
2002-04-06 23:25:45 -05:00
|
|
|
.if !exists(${DESTDIR}/boot/loader.rc)
|
2004-02-12 03:10:34 -05:00
|
|
|
FILES+= loader.rc
|
2001-06-09 12:49:51 -04:00
|
|
|
.endif
|
|
|
|
|
|
2004-02-12 03:10:34 -05:00
|
|
|
DPADD= ${LIBFICL} ${LIBEFI} ${LIBSTAND}
|
|
|
|
|
LDADD= ${LIBFICL} ${LIBEFI} -lstand
|
2001-06-09 12:49:51 -04:00
|
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|