diff options
author | David Daney <david.daney@cavium.com> | 2012-07-05 12:12:38 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2012-07-23 08:54:52 -0400 |
commit | ab25383983fb8d7786696f5371e75e79c3e9a405 (patch) | |
tree | 7e35f3abdd680e2cccf3749a2a21b07bc02c7c5b /lib/Makefile | |
parent | a339aef90470cf21debb138f95e22adf143eecca (diff) |
of/lib: Allow scripts/dtc/libfdt to be used from kernel code
libfdt is part of the device tree support in scripts/dtc/libfdt. For
some platforms that use the Device Tree, we want to be able to edit
the flattened device tree form.
We don't want to burden kernel builds that do not require it, so we
gate compilation of libfdt files with CONFIG_LIBFDT. So if it is
needed, you need to do this in your Kconfig:
select LIBFDT
And in the Makefile of the code using libfdt something like:
ccflags-y := -I$(src)/../../../scripts/dtc/libfdt
Signed-off-by: David Daney <david.daney@cavium.com>
Cc: linux-mips@linux-mips.org
Cc: devicetree-discuss@lists.ozlabs.org
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: linux-kernel@vger.kernel.org
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'lib/Makefile')
-rw-r--r-- | lib/Makefile | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Makefile b/lib/Makefile index 8c31a0cb75e9..2f2be5a8734c 100644 --- a/lib/Makefile +++ b/lib/Makefile | |||
@@ -130,6 +130,11 @@ obj-$(CONFIG_GENERIC_STRNLEN_USER) += strnlen_user.o | |||
130 | 130 | ||
131 | obj-$(CONFIG_STMP_DEVICE) += stmp_device.o | 131 | obj-$(CONFIG_STMP_DEVICE) += stmp_device.o |
132 | 132 | ||
133 | libfdt_files = fdt.o fdt_ro.o fdt_wip.o fdt_rw.o fdt_sw.o fdt_strerror.o | ||
134 | $(foreach file, $(libfdt_files), \ | ||
135 | $(eval CFLAGS_$(file) = -I$(src)/../scripts/dtc/libfdt)) | ||
136 | lib-$(CONFIG_LIBFDT) += $(libfdt_files) | ||
137 | |||
133 | hostprogs-y := gen_crc32table | 138 | hostprogs-y := gen_crc32table |
134 | clean-files := crc32table.h | 139 | clean-files := crc32table.h |
135 | 140 | ||