xref: /linux/tools/perf/util/intel-pt-decoder/Build (revision 34f7c6e7d4396090692a09789db231e12cb4762b)
1perf-$(CONFIG_AUXTRACE) += intel-pt-pkt-decoder.o intel-pt-insn-decoder.o intel-pt-log.o intel-pt-decoder.o
2
3inat_tables_script = $(srctree)/tools/arch/x86/tools/gen-insn-attr-x86.awk
4inat_tables_maps = $(srctree)/tools/arch/x86/lib/x86-opcode-map.txt
5
6$(OUTPUT)util/intel-pt-decoder/inat-tables.c: $(inat_tables_script) $(inat_tables_maps)
7	$(call rule_mkdir)
8	@$(call echo-cmd,gen)$(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ || rm -f $@
9
10# Busybox's diff doesn't have -I, avoid warning in the case
11
12$(OUTPUT)util/intel-pt-decoder/intel-pt-insn-decoder.o: util/intel-pt-decoder/intel-pt-insn-decoder.c $(OUTPUT)util/intel-pt-decoder/inat-tables.c
13	$(call rule_mkdir)
14	$(call if_changed_dep,cc_o_c)
15
16CFLAGS_intel-pt-insn-decoder.o += -I$(OUTPUT)util/intel-pt-decoder
17
18ifeq ($(CC_NO_CLANG), 1)
19  CFLAGS_intel-pt-insn-decoder.o += -Wno-override-init
20endif
21
22CFLAGS_intel-pt-insn-decoder.o += -Wno-packed
23