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 | |
| 21 | posttest: $(obj)/test_get_len vmlinux |
| 22 | $(call cmd,posttest) |
| 23 | |
| 24 | hostprogs-y := test_get_len |
| 25 | |
| 26 | # -I needed for generated C source and C source which in the kernel tree. |
Ingo Molnar | 9bf4e7f | 2009-10-21 14:39:51 +0200 | [diff] [blame] | 27 | HOSTCFLAGS_test_get_len.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/ |
Masami Hiramatsu | ca0e9ba | 2009-08-13 16:34:21 -0400 | [diff] [blame] | 28 | |
Ingo Molnar | 9bf4e7f | 2009-10-21 14:39:51 +0200 | [diff] [blame] | 29 | # Dependencies are also needed. |
Masami Hiramatsu | ca0e9ba | 2009-08-13 16:34:21 -0400 | [diff] [blame] | 30 | $(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 |
| 31 | |