2009-08-14 04:34:21 +08:00
|
|
|
PHONY += posttest
|
2009-11-17 07:06:18 +08:00
|
|
|
|
|
|
|
ifeq ($(KBUILD_VERBOSE),1)
|
2009-11-21 01:13:08 +08:00
|
|
|
posttest_verbose = -v
|
2009-11-17 07:06:18 +08:00
|
|
|
else
|
2009-11-21 01:13:08 +08:00
|
|
|
posttest_verbose =
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_64BIT),y)
|
|
|
|
posttest_64bit = -y
|
|
|
|
else
|
|
|
|
posttest_64bit = -n
|
2009-11-17 07:06:18 +08:00
|
|
|
endif
|
|
|
|
|
2009-11-21 01:13:14 +08:00
|
|
|
distill_awk = $(srctree)/arch/x86/tools/distill.awk
|
|
|
|
chkobjdump = $(srctree)/arch/x86/tools/chkobjdump.awk
|
|
|
|
|
2009-08-14 04:34:21 +08:00
|
|
|
quiet_cmd_posttest = TEST $@
|
2009-11-21 01:13:14 +08:00
|
|
|
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)
|
2009-08-14 04:34:21 +08:00
|
|
|
|
|
|
|
posttest: $(obj)/test_get_len vmlinux
|
|
|
|
$(call cmd,posttest)
|
|
|
|
|
|
|
|
hostprogs-y := test_get_len
|
|
|
|
|
|
|
|
# -I needed for generated C source and C source which in the kernel tree.
|
2009-10-21 20:39:51 +08:00
|
|
|
HOSTCFLAGS_test_get_len.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/
|
2009-08-14 04:34:21 +08:00
|
|
|
|
2009-10-21 20:39:51 +08:00
|
|
|
# Dependencies are also needed.
|
2009-08-14 04:34:21 +08:00
|
|
|
$(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
|
|
|
|
|