summaryrefslogtreecommitdiffstats
path: root/sys/boot/uboot/lib/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/uboot/lib/Makefile')
-rw-r--r--sys/boot/uboot/lib/Makefile12
1 files changed, 12 insertions, 0 deletions
diff --git a/sys/boot/uboot/lib/Makefile b/sys/boot/uboot/lib/Makefile
index 7908f24..e5ed3ce 100644
--- a/sys/boot/uboot/lib/Makefile
+++ b/sys/boot/uboot/lib/Makefile
@@ -1,5 +1,7 @@
# $FreeBSD$
+.include <bsd.own.mk>
+
.PATH: ${.CURDIR}/../../common
LIB= uboot
@@ -18,6 +20,16 @@ SRCS+= disk.c
CFLAGS+= -DLOADER_DISK_SUPPORT
.endif
+.if ${MK_FDT} != "no"
+LOADER_FDT_SUPPORT= yes
+.else
+LOADER_FDT_SUPPORT= no
+.endif
+
+.if ${LOADER_FDT_SUPPORT} == "yes"
+CFLAGS+= -DLOADER_FDT_SUPPORT
+.endif
+
# Pick up FDT includes
CFLAGS+= -I${.CURDIR}/../../../../sys/contrib/libfdt/
OpenPOWER on IntegriCloud