Merge tag 'tty-4.20-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
[linux-2.6-block.git] / scripts / mod / Makefile
1 # SPDX-License-Identifier: GPL-2.0
2 OBJECT_FILES_NON_STANDARD := y
3
4 hostprogs-y     := modpost mk_elfconfig
5 always          := $(hostprogs-y) empty.o
6
7 CFLAGS_REMOVE_empty.o := $(ASM_MACRO_FLAGS)
8
9 modpost-objs    := modpost.o file2alias.o sumversion.o
10
11 devicetable-offsets-file := devicetable-offsets.h
12
13 $(obj)/$(devicetable-offsets-file): $(obj)/devicetable-offsets.s FORCE
14         $(call filechk,offsets,__DEVICETABLE_OFFSETS_H__)
15
16 targets += $(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
23 quiet_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
29 targets += elfconfig.h