GNU Linux-libre 4.4.288-gnu1
[releases.git] / scripts / mod / Makefile
1 hostprogs-y     := modpost mk_elfconfig
2 always          := $(hostprogs-y) empty.o
3
4 modpost-objs    := modpost.o file2alias.o sumversion.o
5
6 devicetable-offsets-file := devicetable-offsets.h
7
8 $(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s FORCE
9         $(call filechk,offsets,__DEVICETABLE_OFFSETS_H__)
10
11 targets += $(devicetable-offsets-file) devicetable-offsets.s
12
13 # dependencies on generated files need to be listed explicitly
14
15 $(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o: $(obj)/elfconfig.h
16 $(obj)/file2alias.o: $(obj)/$(devicetable-offsets-file)
17
18 quiet_cmd_elfconfig = MKELF   $@
19       cmd_elfconfig = $(obj)/mk_elfconfig < $< > $@
20
21 $(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE
22         $(call if_changed,elfconfig)
23
24 targets += elfconfig.h