Makefile 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. PHONY += posttest
  2. ifeq ($(KBUILD_VERBOSE),1)
  3. posttest_verbose = -v
  4. else
  5. posttest_verbose =
  6. endif
  7. ifeq ($(CONFIG_64BIT),y)
  8. posttest_64bit = -y
  9. else
  10. posttest_64bit = -n
  11. endif
  12. distill_awk = $(srctree)/arch/x86/tools/distill.awk
  13. chkobjdump = $(srctree)/arch/x86/tools/chkobjdump.awk
  14. quiet_cmd_posttest = TEST $@
  15. 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)
  16. quiet_cmd_sanitytest = TEST $@
  17. cmd_sanitytest = $(obj)/insn_sanity $(posttest_64bit) -m 1000000
  18. posttest: $(obj)/test_get_len vmlinux $(obj)/insn_sanity
  19. $(call cmd,posttest)
  20. $(call cmd,sanitytest)
  21. hostprogs-y += test_get_len insn_sanity
  22. # -I needed for generated C source and C source which in the kernel tree.
  23. 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/
  24. HOSTCFLAGS_insn_sanity.o := -Wall -I$(objtree)/arch/x86/lib/ -I$(srctree)/arch/x86/include/ -I$(srctree)/arch/x86/lib/ -I$(srctree)/include/
  25. # Dependencies are also needed.
  26. $(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
  27. $(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
  28. HOST_EXTRACFLAGS += -I$(srctree)/tools/include
  29. hostprogs-y += relocs
  30. relocs-objs := relocs_32.o relocs_64.o relocs_common.o
  31. PHONY += relocs
  32. relocs: $(obj)/relocs
  33. @: