19f464c52Smaya# Copyright © 2018 Intel Corporation
29f464c52Smaya#
39f464c52Smaya# Permission is hereby granted, free of charge, to any person obtaining a
49f464c52Smaya# copy of this software and associated documentation files (the "Software"),
59f464c52Smaya# to deal in the Software without restriction, including without limitation
69f464c52Smaya# the rights to use, copy, modify, merge, publish, distribute, sublicense,
79f464c52Smaya# and/or sell copies of the Software, and to permit persons to whom the
89f464c52Smaya# Software is furnished to do so, subject to the following conditions:
99f464c52Smaya#
109f464c52Smaya# The above copyright notice and this permission notice (including the next
119f464c52Smaya# paragraph) shall be included in all copies or substantial portions of the
129f464c52Smaya# Software.
139f464c52Smaya#
149f464c52Smaya# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
159f464c52Smaya# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
169f464c52Smaya# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
179f464c52Smaya# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
189f464c52Smaya# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
199f464c52Smaya# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
209f464c52Smaya# IN THE SOFTWARE.
219f464c52Smaya
229f464c52SmayaBUILT_SOURCES += \
237ec681f3Smrg	$(INTEL_PERF_GENERATED_FILES)
249f464c52Smaya
259f464c52Smayanoinst_LTLIBRARIES += perf/libintel_perf.la
269f464c52Smaya
277ec681f3Smrgperf_libintel_perf_la_SOURCES = $(INTEL_PERF_FILES) $(INTEL_PERF_GENERATED_FILES)
289f464c52Smayaperf_libintel_perf_la_CFLAGS = $(AM_CFLAGS)
299f464c52Smaya
307ec681f3Smrgperf/intel_perf_metrics.c: perf/gen_perf.py $(INTEL_PERF_XML_FILES)
319f464c52Smaya	$(MKDIR_GEN)
329f464c52Smaya	$(PYTHON_GEN) $(PYTHON_FLAGS) $(srcdir)/perf/gen_perf.py \
337ec681f3Smrg	--code=$(builddir)/perf/intel_perf_metrics.c \
347ec681f3Smrg	--header=$(builddir)/perf/intel_perf_metrics.h \
357ec681f3Smrg	$(INTEL_PERF_XML_FILES:%=$(srcdir)/%)
369f464c52Smaya
377ec681f3Smrgperf/intel_perf_metrics.h: perf/intel_perf_metrics.c
389f464c52Smaya
399f464c52SmayaEXTRA_DIST += \
407ec681f3Smrg	$(INTEL_PERF_XML_FILES) \
419f464c52Smaya	perf/gen_perf.py
42