Makefile 826 B

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