libfdt: move headers to <linux/libfdt.h> and <linux/libfdt_env.h>
[oweals/u-boot.git] / lib / libfdt / Makefile
index a02c9b02add2d360e5aa5d0d53a2d620e98e9fda..edd8e64ce0b88212bd26ff9f1166ebc1c5d9aafb 100644 (file)
@@ -5,7 +5,23 @@
 # SPDX-License-Identifier:     GPL-2.0+
 #
 
-COBJS-libfdt += fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_sw.o fdt_wip.o fdt_empty_tree.o
+# Use upstream code.
+obj-y += \
+       fdt.o \
+       fdt_wip.o \
+       fdt_strerror.o \
+       fdt_sw.o \
+       fdt_rw.o \
+       fdt_empty_tree.o \
+       fdt_addresses.o
 
-obj-$(CONFIG_OF_LIBFDT) += $(COBJS-libfdt)
-obj-$(CONFIG_FIT) += $(COBJS-libfdt)
+obj-$(CONFIG_OF_LIBFDT_OVERLAY) += fdt_overlay.o
+
+# Locally modified for U-Boot.
+# TODO: split out the local modifiction.
+obj-y += fdt_ro.o
+
+# U-Boot own file
+obj-y += fdt_region.o
+
+ccflags-y := -I$(srctree)/scripts/dtc/libfdt