Skip to contentSkip to conversation

benchmarks/Android.mk, tools/Android.mk: Fix android build error

PATCH New Derek Morton 1 participant 1 message Aug 6, 2015

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 benchmarks/Android.mk, tools/Android.mk: Fix android build error

Recently added tools / benckmarks have the same module name as existing tests. Android does not allow duplicate modules. This patch appends _benchmark and _tool to the module names used when building benckmarks and tools to prevent complie errors due to clashes with tests of the same name.

v2: Don't add test/benchmark to the module name if the source already has the suffix.

---
 benchmarks/Android.mk | 6 +++++-
 tools/Android.mk      | 6 +++++-
 2 files changed, 10 insertions(+), 2 deletions(-)
benchmarks/Android.mk +5 -1
index 14fc0a7..f75888d 100644
@@ -17,7 +17,11 @@ define add_benchmark
     # Excessive complaining for established cases. Rely on the Linux version warnings.
     LOCAL_CFLAGS += -Wno-sign-compare
 
-    LOCAL_MODULE := $1
+    ifneq (,$(findstring benchmark,$1))
+        LOCAL_MODULE := $1
+    else
+        LOCAL_MODULE := $1_benchmark
+    endif
     LOCAL_MODULE_TAGS := optional
 
     LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
tools/Android.mk +5 -1
index 6617f28..c8b5744 100644
@@ -25,7 +25,11 @@ define add_tool
     LOCAL_C_INCLUDES = $(LOCAL_PATH)/../lib
     LOCAL_C_INCLUDES += ${ANDROID_BUILD_TOP}/external/PRIVATE/drm/include/drm
 
-    LOCAL_MODULE := $1
+    ifneq (,$(findstring tool,$1))
+        LOCAL_MODULE := $1
+    else
+        LOCAL_MODULE := $1_tool
+    endif
     LOCAL_MODULE_TAGS := optional
 
     LOCAL_STATIC_LIBRARIES := libintel_gpu_tools
Signature · 6 lines
1.9.1

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx