xref: /linux/tools/perf/util/intel-pt-decoder/Build (revision 1260ed77798502de9c98020040d2995008de10cc)
1e467705aSIan Rogersperf-util-$(CONFIG_AUXTRACE) += intel-pt-pkt-decoder.o intel-pt-insn-decoder.o intel-pt-log.o intel-pt-decoder.o
2237fae79SAdrian Hunter
300a26390SJosh Poimboeufinat_tables_script = $(srctree)/tools/arch/x86/tools/gen-insn-attr-x86.awk
400a26390SJosh Poimboeufinat_tables_maps = $(srctree)/tools/arch/x86/lib/x86-opcode-map.txt
5237fae79SAdrian Hunter
6237fae79SAdrian Hunter$(OUTPUT)util/intel-pt-decoder/inat-tables.c: $(inat_tables_script) $(inat_tables_maps)
704aa90b5SWang Nan	$(call rule_mkdir)
8237fae79SAdrian Hunter	@$(call echo-cmd,gen)$(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ || rm -f $@
9237fae79SAdrian Hunter
10*e7bb49e3SIan Rogersifeq ($(SRCARCH),x86)
11*e7bb49e3SIan Rogers  perf-util-y += inat.o insn.o
12*e7bb49e3SIan Rogerselse
13*e7bb49e3SIan Rogers  perf-util-$(CONFIG_AUXTRACE) += inat.o insn.o
14*e7bb49e3SIan Rogersendif
15*e7bb49e3SIan Rogers
16*e7bb49e3SIan Rogers$(OUTPUT)util/intel-pt-decoder/inat.o: $(srctree)/tools/arch/x86/lib/inat.c $(OUTPUT)util/intel-pt-decoder/inat-tables.c
173a9d7723SAdrian Hunter	$(call rule_mkdir)
183a9d7723SAdrian Hunter	$(call if_changed_dep,cc_o_c)
19237fae79SAdrian Hunter
20*e7bb49e3SIan RogersCFLAGS_inat.o += -I$(OUTPUT)util/intel-pt-decoder
21*e7bb49e3SIan Rogers
22*e7bb49e3SIan Rogers$(OUTPUT)util/intel-pt-decoder/insn.o: $(srctree)/tools/arch/x86/lib/insn.c
23*e7bb49e3SIan Rogers	$(call rule_mkdir)
24*e7bb49e3SIan Rogers	$(call if_changed_dep,cc_o_c)
2535670dd0SArnaldo Carvalho de Melo
263866058eSDavid Carrillo-Cisnerosifeq ($(CC_NO_CLANG), 1)
27*e7bb49e3SIan Rogers  CFLAGS_insn.o += -Wno-override-init
2835670dd0SArnaldo Carvalho de Meloendif
29f96b4675SBorislav Petkov
30*e7bb49e3SIan RogersCFLAGS_insn.o += -Wno-packed
31