summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMauro Rossi <[email protected]>2017-03-13 00:01:21 +0100
committerTapani Pälli <[email protected]>2017-03-23 08:20:18 +0200
commit0ff8ac1b55dcc489e73ba6cfaa1ab872b4b9eb0b (patch)
tree7b37f68f26244fac837332cd7cb7a72c73ce8478 /src/mesa
parentdc9ebc6ef17a09a658525f93a03532904656851e (diff)
android: i965: generate code for OA counter queries
Automake generation rules are replicated for android. $* macro was expected to return "hsw" but instead gives "hsw.{h,c}" so $(basename $*) is used as a workaround to set the correct --chipset option for brw_oa.py script. Build tested with nougat-x86 Fixes: e565505 "i965: Add script to gen code for OA counter queries" Reviewed-by: Tapani Pälli <[email protected]> Acked-by: Robert Bragg <[email protected]> Acked-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/Android.mk17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/Android.mk b/src/mesa/drivers/dri/i965/Android.mk
index abe8f20a8a1..ac0a4446b95 100644
--- a/src/mesa/drivers/dri/i965/Android.mk
+++ b/src/mesa/drivers/dri/i965/Android.mk
@@ -190,5 +190,22 @@ LOCAL_GENERATED_SOURCES := \
$(MESA_DRI_OPTIONS_H) \
$(MESA_GEN_NIR_H)
+LOCAL_MODULE_CLASS := SHARED_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir)
+
+LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/, \
+ $(i965_oa_GENERATED_FILES))
+
+$(intermediates)/brw_oa_%.h: $(LOCAL_PATH)/brw_oa_%.xml $(LOCAL_PATH)/brw_oa.py
+ @echo "target Generated: $(PRIVATE_MODULE) <= $(notdir $(@))"
+ @mkdir -p $(dir $@)
+ $(hide) $(MESA_PYTHON2) $(word 2, $^) --header=$@ --chipset=$(basename $*) $<
+
+$(intermediates)/brw_oa_%.c: $(LOCAL_PATH)/brw_oa_%.xml $(LOCAL_PATH)/brw_oa.py
+ @echo "target Generated: $(PRIVATE_MODULE) <= $(notdir $(@))"
+ @mkdir -p $(dir $@)
+ $(hide) $(MESA_PYTHON2) $(word 2, $^) --code=$@ --chipset=$(basename $*) $<
+
include $(MESA_COMMON_MK)
include $(BUILD_SHARED_LIBRARY)