Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost
[cris-mirror.git] / arch / x86 / tools / Makefile
blob09af7ff53044b9af67837fa26f14ad75d210e94d
1 # SPDX-License-Identifier: GPL-2.0
2 PHONY += posttest
4 ifeq ($(KBUILD_VERBOSE),1)
5 posttest_verbose = -v
6 else
7 posttest_verbose =
8 endif
10 ifeq ($(CONFIG_64BIT),y)
11 posttest_64bit = -y
12 else
13 posttest_64bit = -n
14 endif
16 reformatter = $(srctree)/arch/x86/tools/objdump_reformat.awk
17 chkobjdump = $(srctree)/arch/x86/tools/chkobjdump.awk
19 quiet_cmd_posttest = TEST $@
20 cmd_posttest = ($(OBJDUMP) -v | $(AWK) -f $(chkobjdump)) || $(OBJDUMP) -d -j .text $(objtree)/vmlinux | $(AWK) -f $(reformatter) | $(obj)/insn_decoder_test $(posttest_64bit) $(posttest_verbose)
22 quiet_cmd_sanitytest = TEST $@
23 cmd_sanitytest = $(obj)/insn_sanity $(posttest_64bit) -m 1000000
25 posttest: $(obj)/insn_decoder_test vmlinux $(obj)/insn_sanity
26 $(call cmd,posttest)
27 $(call cmd,sanitytest)
29 hostprogs-y += insn_decoder_test insn_sanity
31 # -I needed for generated C source and C source which in the kernel tree.
32 HOSTCFLAGS_insn_decoder_test.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/uapi/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/uapi/
34 HOSTCFLAGS_insn_sanity.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/
36 # Dependencies are also needed.
37 $(obj)/insn_decoder_test.o: $(srctree)/arch/x86/lib/insn.c $(srctree)/arch/x86/lib/inat.c $(srctree)/arch/x86/include/asm/inat_types.h $(srctree)/arch/x86/include/asm/inat.h $(srctree)/arch/x86/include/asm/insn.h $(objtree)/arch/x86/lib/inat-tables.c
39 $(obj)/insn_sanity.o: $(srctree)/arch/x86/lib/insn.c $(srctree)/arch/x86/lib/inat.c $(srctree)/arch/x86/include/asm/inat_types.h $(srctree)/arch/x86/include/asm/inat.h $(srctree)/arch/x86/include/asm/insn.h $(objtree)/arch/x86/lib/inat-tables.c
41 HOST_EXTRACFLAGS += -I$(srctree)/tools/include
42 hostprogs-y += relocs
43 relocs-objs := relocs_32.o relocs_64.o relocs_common.o
44 PHONY += relocs
45 relocs: $(obj)/relocs