Masami Hiramatsu | ca0e9ba | 2009-08-13 16:34:21 -0400 | [diff] [blame] | 1 | PHONY += posttest |
Masami Hiramatsu | d65ff75 | 2009-11-16 18:06:18 -0500 | [diff] [blame] | 2 | |
| 3 | ifeq ($(KBUILD_VERBOSE),1) |
Masami Hiramatsu | 80509e2 | 2009-11-20 12:13:08 -0500 | [diff] [blame] | 4 | posttest_verbose = -v |
Masami Hiramatsu | d65ff75 | 2009-11-16 18:06:18 -0500 | [diff] [blame] | 5 | else |
Masami Hiramatsu | 80509e2 | 2009-11-20 12:13:08 -0500 | [diff] [blame] | 6 | posttest_verbose = |
| 7 | endif |
| 8 | |
| 9 | ifeq ($(CONFIG_64BIT),y) |
| 10 | posttest_64bit = -y |
| 11 | else |
| 12 | posttest_64bit = -n |
Masami Hiramatsu | d65ff75 | 2009-11-16 18:06:18 -0500 | [diff] [blame] | 13 | endif |
| 14 | |
Masami Hiramatsu | 6f5f672 | 2009-11-20 12:13:14 -0500 | [diff] [blame] | 15 | distill_awk = $(srctree)/arch/x86/tools/distill.awk |
| 16 | chkobjdump = $(srctree)/arch/x86/tools/chkobjdump.awk |
| 17 | |
Masami Hiramatsu | ca0e9ba | 2009-08-13 16:34:21 -0400 | [diff] [blame] | 18 | quiet_cmd_posttest = TEST $@ |
Masami Hiramatsu | 6f5f672 | 2009-11-20 12:13:14 -0500 | [diff] [blame] | 19 | 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 Hiramatsu | ca0e9ba | 2009-08-13 16:34:21 -0400 | [diff] [blame] | 20 | |
Masami Hiramatsu | 1ec454b | 2011-10-20 23:01:09 +0900 | [diff] [blame] | 21 | quiet_cmd_sanitytest = TEST $@ |
| 22 | cmd_sanitytest = $(obj)/insn_sanity $(posttest_64bit) -m 1000000 |
| 23 | |
| 24 | posttest: $(obj)/test_get_len vmlinux $(obj)/insn_sanity |
Masami Hiramatsu | ca0e9ba | 2009-08-13 16:34:21 -0400 | [diff] [blame] | 25 | $(call cmd,posttest) |
Masami Hiramatsu | 1ec454b | 2011-10-20 23:01:09 +0900 | [diff] [blame] | 26 | $(call cmd,sanitytest) |
Masami Hiramatsu | ca0e9ba | 2009-08-13 16:34:21 -0400 | [diff] [blame] | 27 | |
Masami Hiramatsu | 1056c3e | 2011-12-05 21:05:33 +0900 | [diff] [blame] | 28 | hostprogs-y += test_get_len insn_sanity |
Masami Hiramatsu | ca0e9ba | 2009-08-13 16:34:21 -0400 | [diff] [blame] | 29 | |
| 30 | # -I needed for generated C source and C source which in the kernel tree. |
David Howells | 584c5ef | 2012-10-02 18:01:56 +0100 | [diff] [blame] | 31 | HOSTCFLAGS_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 Hiramatsu | ca0e9ba | 2009-08-13 16:34:21 -0400 | [diff] [blame] | 32 | |
Masami Hiramatsu | 1ec454b | 2011-10-20 23:01:09 +0900 | [diff] [blame] | 33 | HOSTCFLAGS_insn_sanity.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/ |
| 34 | |
Ingo Molnar | 9bf4e7f | 2009-10-21 14:39:51 +0200 | [diff] [blame] | 35 | # Dependencies are also needed. |
Masami Hiramatsu | ca0e9ba | 2009-08-13 16:34:21 -0400 | [diff] [blame] | 36 | $(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 Hiramatsu | 1ec454b | 2011-10-20 23:01:09 +0900 | [diff] [blame] | 38 | $(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 Anvin | 6520fe5 | 2012-05-08 21:22:24 +0300 | [diff] [blame] | 39 | |
| 40 | HOST_EXTRACFLAGS += -I$(srctree)/tools/include |
H. Peter Anvin | c889ba8 | 2013-04-16 16:02:58 -0700 | [diff] [blame] | 41 | hostprogs-y += relocs |
| 42 | relocs-objs := relocs_32.o relocs_64.o relocs_common.o |
Masahiro Yamada | e6bcd1a | 2014-04-10 10:35:42 +0900 | [diff] [blame] | 43 | PHONY += relocs |
H. Peter Anvin | c889ba8 | 2013-04-16 16:02:58 -0700 | [diff] [blame] | 44 | relocs: $(obj)/relocs |
Masahiro Yamada | e6bcd1a | 2014-04-10 10:35:42 +0900 | [diff] [blame] | 45 | @: |