blob: 604a37efd4d5fd10ae54a1455a98e608a963f6d7 [file] [log] [blame]
Masami Hiramatsuca0e9ba2009-08-13 16:34:21 -04001PHONY += posttest
Masami Hiramatsud65ff752009-11-16 18:06:18 -05002
3ifeq ($(KBUILD_VERBOSE),1)
Masami Hiramatsu80509e22009-11-20 12:13:08 -05004 posttest_verbose = -v
Masami Hiramatsud65ff752009-11-16 18:06:18 -05005else
Masami Hiramatsu80509e22009-11-20 12:13:08 -05006 posttest_verbose =
7endif
8
9ifeq ($(CONFIG_64BIT),y)
10 posttest_64bit = -y
11else
12 posttest_64bit = -n
Masami Hiramatsud65ff752009-11-16 18:06:18 -050013endif
14
Masami Hiramatsu6f5f6722009-11-20 12:13:14 -050015distill_awk = $(srctree)/arch/x86/tools/distill.awk
16chkobjdump = $(srctree)/arch/x86/tools/chkobjdump.awk
17
Masami Hiramatsuca0e9ba2009-08-13 16:34:21 -040018quiet_cmd_posttest = TEST $@
Masami Hiramatsu6f5f6722009-11-20 12:13:14 -050019 cmd_posttest = ($(OBJDUMP) -v | $(AWK) -f $(chkobjdump)) || $(OBJDUMP) -d -j .text $(objtree)/vmlinux | $(AWK) -f $(distill_awk) | $(obj)/test_get_len $(posttest_64bit) $(posttest_verbose)
Masami Hiramatsuca0e9ba2009-08-13 16:34:21 -040020
Masami Hiramatsu1ec454b2011-10-20 23:01:09 +090021quiet_cmd_sanitytest = TEST $@
22 cmd_sanitytest = $(obj)/insn_sanity $(posttest_64bit) -m 1000000
23
24posttest: $(obj)/test_get_len vmlinux $(obj)/insn_sanity
Masami Hiramatsuca0e9ba2009-08-13 16:34:21 -040025 $(call cmd,posttest)
Masami Hiramatsu1ec454b2011-10-20 23:01:09 +090026 $(call cmd,sanitytest)
Masami Hiramatsuca0e9ba2009-08-13 16:34:21 -040027
Masami Hiramatsu1056c3e2011-12-05 21:05:33 +090028hostprogs-y += test_get_len insn_sanity
Masami Hiramatsuca0e9ba2009-08-13 16:34:21 -040029
30# -I needed for generated C source and C source which in the kernel tree.
David Howells584c5ef2012-10-02 18:01:56 +010031HOSTCFLAGS_test_get_len.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/
Masami Hiramatsuca0e9ba2009-08-13 16:34:21 -040032
Masami Hiramatsu1ec454b2011-10-20 23:01:09 +090033HOSTCFLAGS_insn_sanity.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/
34
Ingo Molnar9bf4e7f2009-10-21 14:39:51 +020035# Dependencies are also needed.
Masami Hiramatsuca0e9ba2009-08-13 16:34:21 -040036$(obj)/test_get_len.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
37
Masami Hiramatsu1ec454b2011-10-20 23:01:09 +090038$(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
H. Peter Anvin6520fe52012-05-08 21:22:24 +030039
40HOST_EXTRACFLAGS += -I$(srctree)/tools/include
H. Peter Anvinc889ba82013-04-16 16:02:58 -070041hostprogs-y += relocs
42relocs-objs := relocs_32.o relocs_64.o relocs_common.o
Masahiro Yamadae6bcd1a2014-04-10 10:35:42 +090043PHONY += relocs
H. Peter Anvinc889ba82013-04-16 16:02:58 -070044relocs: $(obj)/relocs
Masahiro Yamadae6bcd1a2014-04-10 10:35:42 +090045 @: