1# SPDX-License-Identifier: GPL-2.0 2OBJECT_FILES_NON_STANDARD := y 3 4hostprogs-y := modpost mk_elfconfig 5always := $(hostprogs-y) empty.o 6 7CFLAGS_REMOVE_empty.o := $(ASM_MACRO_FLAGS) 8 9modpost-objs := modpost.o file2alias.o sumversion.o 10 11devicetable-offsets-file := devicetable-offsets.h 12 13$(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s FORCE 14 $(call filechk,offsets,__DEVICETABLE_OFFSETS_H__) 15 16targets += $(devicetable-offsets-file) devicetable-offsets.s 17 18# dependencies on generated files need to be listed explicitly 19 20$(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o: $(obj)/elfconfig.h 21$(obj)/file2alias.o: $(obj)/$(devicetable-offsets-file) 22 23quiet_cmd_elfconfig = MKELF $@ 24 cmd_elfconfig = $(obj)/mk_elfconfig < $< > $@ 25 26$(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE 27 $(call if_changed,elfconfig) 28 29targets += elfconfig.h 30