162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 262306a36Sopenharmony_ciOBJECT_FILES_NON_STANDARD := y 362306a36Sopenharmony_ciCFLAGS_REMOVE_empty.o += $(CC_FLAGS_LTO) 462306a36Sopenharmony_ci 562306a36Sopenharmony_cihostprogs-always-y += modpost mk_elfconfig 662306a36Sopenharmony_cialways-y += empty.o 762306a36Sopenharmony_ci 862306a36Sopenharmony_cimodpost-objs := modpost.o file2alias.o sumversion.o 962306a36Sopenharmony_ci 1062306a36Sopenharmony_cidevicetable-offsets-file := devicetable-offsets.h 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci$(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s FORCE 1362306a36Sopenharmony_ci $(call filechk,offsets,__DEVICETABLE_OFFSETS_H__) 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_citargets += $(devicetable-offsets-file) devicetable-offsets.s 1662306a36Sopenharmony_ci 1762306a36Sopenharmony_ci# dependencies on generated files need to be listed explicitly 1862306a36Sopenharmony_ci 1962306a36Sopenharmony_ci$(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o: $(obj)/elfconfig.h 2062306a36Sopenharmony_ci$(obj)/file2alias.o: $(obj)/$(devicetable-offsets-file) 2162306a36Sopenharmony_ci 2262306a36Sopenharmony_ciquiet_cmd_elfconfig = MKELF $@ 2362306a36Sopenharmony_ci cmd_elfconfig = $(obj)/mk_elfconfig < $< > $@ 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci$(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE 2662306a36Sopenharmony_ci $(call if_changed,elfconfig) 2762306a36Sopenharmony_ci 2862306a36Sopenharmony_citargets += elfconfig.h 29