of/lib: Allow scripts/dtc/libfdt to be used from kernel code
[deliverable/linux.git] / lib / Makefile
index 8c31a0cb75e97746af1cd02906ac149105250cc2..2f2be5a8734c4ebf7ad21dbf79c3072df2e99f53 100644 (file)
@@ -130,6 +130,11 @@ obj-$(CONFIG_GENERIC_STRNLEN_USER) += strnlen_user.o
 
 obj-$(CONFIG_STMP_DEVICE) += stmp_device.o
 
+libfdt_files = fdt.o fdt_ro.o fdt_wip.o fdt_rw.o fdt_sw.o fdt_strerror.o
+$(foreach file, $(libfdt_files), \
+       $(eval CFLAGS_$(file) = -I$(src)/../scripts/dtc/libfdt))
+lib-$(CONFIG_LIBFDT) += $(libfdt_files)
+
 hostprogs-y    := gen_crc32table
 clean-files    := crc32table.h
 
This page took 0.023849 seconds and 5 git commands to generate.