mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-17 02:08:38 +00:00
d6a0c78a4e
Currently, pylibfdt is always compiled if swig is installed on your machine. It is really annoying because most of targets (excepts x86, sunxi, rockchip) do not use dtoc or binman. "checkbinman" and "checkdtoc" are wrong. It is odd that the final build stage checks if we have built necessary tools. If your platform depends on dtoc/binman, you must be able to build pylibfdt. If swig is not installed, it should fail immediately. I added PYLIBFDT, DTOC, BINMAN entries to Kconfig. They should be property select:ed by platforms that need them. Kbuild will descend into scripts/dtc/pylibfdt/ only when CONFIG_PYLIBFDT is enabled. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
34 lines
1.1 KiB
Makefile
34 lines
1.1 KiB
Makefile
# scripts/dtc makefile
|
|
|
|
hostprogs-y := dtc
|
|
always := $(hostprogs-y)
|
|
|
|
dtc-objs := dtc.o flattree.o fstree.o data.o livetree.o treesource.o \
|
|
srcpos.o checks.o util.o
|
|
dtc-objs += dtc-lexer.lex.o dtc-parser.tab.o
|
|
|
|
# Source files need to get at the userspace version of libfdt_env.h to compile
|
|
|
|
HOSTCFLAGS_DTC := -I$(src) -I$(src)/libfdt
|
|
|
|
HOSTCFLAGS_checks.o := $(HOSTCFLAGS_DTC)
|
|
HOSTCFLAGS_data.o := $(HOSTCFLAGS_DTC)
|
|
HOSTCFLAGS_dtc.o := $(HOSTCFLAGS_DTC)
|
|
HOSTCFLAGS_flattree.o := $(HOSTCFLAGS_DTC)
|
|
HOSTCFLAGS_fstree.o := $(HOSTCFLAGS_DTC)
|
|
HOSTCFLAGS_livetree.o := $(HOSTCFLAGS_DTC)
|
|
HOSTCFLAGS_srcpos.o := $(HOSTCFLAGS_DTC)
|
|
HOSTCFLAGS_treesource.o := $(HOSTCFLAGS_DTC)
|
|
HOSTCFLAGS_util.o := $(HOSTCFLAGS_DTC)
|
|
|
|
HOSTCFLAGS_dtc-lexer.lex.o := $(HOSTCFLAGS_DTC)
|
|
HOSTCFLAGS_dtc-parser.tab.o := $(HOSTCFLAGS_DTC)
|
|
|
|
# dependencies on generated files need to be listed explicitly
|
|
$(obj)/dtc-lexer.lex.o: $(obj)/dtc-parser.tab.h
|
|
|
|
# generated files need to be cleaned explicitly
|
|
clean-files := dtc-lexer.lex.c dtc-parser.tab.c dtc-parser.tab.h
|
|
|
|
# Added for U-Boot
|
|
subdir-$(CONFIG_PYLIBFDT) += pylibfdt
|