Makefile 859 B

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