diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2019-07-19 11:30:21 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2019-08-19 14:50:18 +0200 |
commit | 7e5a875fff7dfe65d7d884dff924fcc25e6cee06 (patch) | |
tree | 38b009279aef0fda2ef22aa03f70c8bebd220c13 /lib/Makefile | |
parent | 9a9e8156d21f171368c136696abcfbd74978bc4b (diff) | |
download | barebox-7e5a875fff7dfe65d7d884dff924fcc25e6cee06.tar.gz barebox-7e5a875fff7dfe65d7d884dff924fcc25e6cee06.tar.xz |
Compile libfdt for barebox
libfdt can be useful for very early device tree parsing, so compile it
for barobox aswell. This is done the same way as done in the Kernel:
we put C files with the same name as in libfdt into lib/ and just
include the libfdt files from there.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib/Makefile')
-rw-r--r-- | lib/Makefile | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile index 161d3a756e..a07ceb15ab 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -79,3 +79,13 @@ obj-$(CONFIG_GENERIC_LIB_LSHRDI3) += lshrdi3.o obj-$(CONFIG_GENERIC_LIB_MULDI3) += muldi3.o pbl-$(CONFIG_GENERIC_LIB_ASHLDI3) += ashldi3.o + +libfdt_files = fdt.o fdt_ro.o fdt_wip.o fdt_rw.o fdt_sw.o fdt_strerror.o \ + fdt_empty_tree.o +$(foreach file, $(libfdt_files), \ + $(eval CFLAGS_$(file) = -I $(srctree)/scripts/dtc/libfdt)) +$(foreach file, $(libfdt_files), \ + $(eval CFLAGS_pbl-$(file) = -I $(srctree)/scripts/dtc/libfdt)) + +obj-pbl-$(CONFIG_LIBFDT) += $(libfdt_files) + |