android: freedreno/common: add support for libfreedreno_common static
authorMauro Rossi <issor.oruam@gmail.com>
Thu, 30 Jul 2020 21:18:51 +0000 (23:18 +0200)
committerMauro Rossi <issor.oruam@gmail.com>
Sun, 2 Aug 2020 19:40:21 +0000 (21:40 +0200)
Porting of meson build rules to Android

Fixes: 9623debf48a ("freedreno: Centralize UUID generation into new files freedreno_uuid.c/h")
Signed-off-by: Mauro Rossi <issor.oruam@gmail.com>
Acked-by: Rob Clark <robdclark@gmail.com>
Acked-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6151>

src/freedreno/Android.common.mk [new file with mode: 0644]
src/freedreno/Android.mk
src/freedreno/Makefile.sources
src/gallium/drivers/freedreno/Android.mk

diff --git a/src/freedreno/Android.common.mk b/src/freedreno/Android.common.mk
new file mode 100644 (file)
index 0000000..2bbf09b
--- /dev/null
@@ -0,0 +1,41 @@
+# Mesa 3-D graphics library
+#
+# Copyright (C)
+#
+# Permission is hereby granted, free of charge, to any person obtaining a
+# copy of this software and associated documentation files (the "Software"),
+# to deal in the Software without restriction, including without limitation
+# the rights to use, copy, modify, merge, publish, distribute, sublicense,
+# and/or sell copies of the Software, and to permit persons to whom the
+# Software is furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
+# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+# DEALINGS IN THE SOFTWARE.
+
+# Android.mk for libfreedreno_common.a
+
+# ---------------------------------------
+# Build libfreedreno_common
+# ---------------------------------------
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+       $(common_SOURCES)
+
+LOCAL_C_INCLUDES := \
+       $(MESA_TOP)/src/gallium/include \
+       $(MESA_TOP)/src/gallium/auxiliary
+
+LOCAL_MODULE := libfreedreno_common
+
+include $(MESA_COMMON_MK)
+include $(BUILD_STATIC_LIBRARY)
index 3d76c40f6b59193a0182fee6aa18bfd8c1f0882c..84fe2eeda7bba354a40791e8ddd0ae49124b269d 100644 (file)
@@ -25,6 +25,7 @@
 LOCAL_PATH := $(call my-dir)
 
 include $(LOCAL_PATH)/Makefile.sources
+include $(LOCAL_PATH)/Android.common.mk
 include $(LOCAL_PATH)/Android.drm.mk
 include $(LOCAL_PATH)/Android.ir3.mk
 include $(LOCAL_PATH)/Android.perfcntrs.mk
index 99d9ace4a73fa864cb7d8b14493c7bafe8f19c7d..0768667e0c1933f1c855ed7fbbea6cb68b2691ff 100644 (file)
@@ -1,3 +1,9 @@
+common_SOURCES := \
+       common/disasm.h \
+       common/freedreno_uuid.c \
+       common/freedreno_uuid.h \
+       common/freedreno_guardband.h
+
 drm_SOURCES := \
        drm/freedreno_bo.c \
        drm/freedreno_drmif.h \
index c41165cb2480f1d4f02c695225040816ce8594c9..ee4d06af612088dee0fad4bfee4cbf43abd9306b 100644 (file)
@@ -39,7 +39,8 @@ LOCAL_SRC_FILES := \
 
 LOCAL_C_INCLUDES := \
        $(LOCAL_PATH)/ir3 \
-       $(MESA_TOP)/include
+       $(MESA_TOP)/include \
+       $(MESA_TOP)/src/freedreno/common
 
 LOCAL_GENERATED_SOURCES := $(MESA_GEN_NIR_H)