mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-06-09 23:36:03 +09:00
Makefile: Use a variable for generated of-platdata headers
There are actually two generated files but only one is currently mentioned in the Makefile as a dependency. Put them both in a Makefile variable and use that instead, to avoid inconsistency. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
8490c578f4
commit
56b313d1b6
|
@ -120,13 +120,14 @@ endif
|
||||||
u-boot-spl-init := $(head-y)
|
u-boot-spl-init := $(head-y)
|
||||||
u-boot-spl-main := $(libs-y)
|
u-boot-spl-main := $(libs-y)
|
||||||
ifdef CONFIG_$(SPL_TPL_)OF_PLATDATA
|
ifdef CONFIG_$(SPL_TPL_)OF_PLATDATA
|
||||||
|
platdata-hdr := include/generated/dt-structs-gen.h include/generated/dt-decl.h
|
||||||
ifdef CONFIG_$(SPL_TPL_)OF_PLATDATA_INST
|
ifdef CONFIG_$(SPL_TPL_)OF_PLATDATA_INST
|
||||||
u-boot-spl-platdata := $(obj)/dts/dt-uclass.o $(obj)/dts/dt-device.o
|
u-boot-spl-platdata := $(obj)/dts/dt-uclass.o $(obj)/dts/dt-device.o
|
||||||
else
|
else
|
||||||
u-boot-spl-platdata := $(obj)/dts/dt-plat.o
|
u-boot-spl-platdata := $(obj)/dts/dt-plat.o
|
||||||
endif
|
endif
|
||||||
u-boot-spl-platdata_c := $(patsubst %.o,%.c,$(u-boot-spl-platdata))
|
u-boot-spl-platdata_c := $(patsubst %.o,%.c,$(u-boot-spl-platdata))
|
||||||
endif
|
endif # OF_PLATDATA
|
||||||
|
|
||||||
# Linker Script
|
# Linker Script
|
||||||
# First test whether there's a linker-script for the specific stage defined...
|
# First test whether there's a linker-script for the specific stage defined...
|
||||||
|
@ -327,15 +328,11 @@ cmd_dtoc = $(DTOC_ARGS) -c $(obj)/dts -C include/generated all
|
||||||
quiet_cmd_plat = PLAT $@
|
quiet_cmd_plat = PLAT $@
|
||||||
cmd_plat = $(CC) $(c_flags) -c $< -o $(filter-out $(PHONY),$@)
|
cmd_plat = $(CC) $(c_flags) -c $< -o $(filter-out $(PHONY),$@)
|
||||||
|
|
||||||
targets += $(u-boot-spl-platdata)
|
$(obj)/dts/dt-%.o: $(obj)/dts/dt-%.c $(platdata-hdr)
|
||||||
|
|
||||||
$(obj)/dts/dt-%.o: $(obj)/dts/dt-%.c \
|
|
||||||
include/generated/dt-structs-gen.h prepare FORCE
|
|
||||||
$(call if_changed,plat)
|
$(call if_changed,plat)
|
||||||
|
|
||||||
# Don't use dts_dir here, since it forces running this expensive rule every time
|
# Don't use dts_dir here, since it forces running this expensive rule every time
|
||||||
include/generated/dt-structs-gen.h $(u-boot-spl-platdata_c) &: \
|
$(platdata-hdr) $(u-boot-spl-platdata_c) &: $(obj)/$(SPL_BIN).dtb
|
||||||
$(obj)/$(SPL_BIN).dtb
|
|
||||||
@[ -d $(obj)/dts ] || mkdir -p $(obj)/dts
|
@[ -d $(obj)/dts ] || mkdir -p $(obj)/dts
|
||||||
$(call if_changed,dtoc)
|
$(call if_changed,dtoc)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user