summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2015-07-16 14:42:10 +0200
committerThierry Reding <treding@nvidia.com>2017-09-06 09:36:04 +0200
commitf8f1d215115b7691ba0bd56f788309c5f44491c2 (patch)
treea9be269470ac7db2d33d5ec979adcc2593a6e0bb
parent0c311a8868520bc5fb59bcd6356eb60493c633d3 (diff)
tegra: Add Android supportstaging/tegra
Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r--tegra/Android.mk42
-rw-r--r--tegra/Makefile.am12
-rw-r--r--tegra/Makefile.sources10
3 files changed, 56 insertions, 8 deletions
diff --git a/tegra/Android.mk b/tegra/Android.mk
new file mode 100644
index 00000000..2d6881a3
--- /dev/null
+++ b/tegra/Android.mk
@@ -0,0 +1,42 @@
+#
+# Copyright © 2015 NVIDIA Corporation
+#
+# 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 (including the next
+# paragraph) 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.
+#
+
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+# Import variables LIBDRM_TEGRA_FILES, LIBDRM_TEGRA_H_FILES
+include $(LOCAL_PATH)/Makefile.sources
+
+LOCAL_MODULE := libdrm_tegra
+LOCAL_MODULE_TAGS := optional
+
+LOCAL_SRC_FILES := $(LIBDRM_TEGRA_FILES)
+LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)
+
+LOCAL_CFLAGS := \
+ -DHAVE_LIBDRM_ATOMIC_PRIMITIVES=1
+
+LOCAL_SHARED_LIBRARIES := \
+ libdrm
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/tegra/Makefile.am b/tegra/Makefile.am
index 4f0b4862..a51e2259 100644
--- a/tegra/Makefile.am
+++ b/tegra/Makefile.am
@@ -1,3 +1,5 @@
+include Makefile.sources
+
AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/include/drm
@@ -11,16 +13,10 @@ libdrm_tegra_la_LTLIBRARIES = libdrm_tegra.la
libdrm_tegra_la_LDFLAGS = -version-number 0:0:0 -no-undefined
libdrm_tegra_la_LIBADD = ../libdrm.la @PTHREADSTUBS_LIBS@
-libdrm_tegra_la_SOURCES = \
- channel.c \
- fence.c \
- job.c \
- private.h \
- pushbuf.c \
- tegra.c
+libdrm_tegra_la_SOURCES = $(LIBDRM_TEGRA_FILES)
libdrm_tegraincludedir = ${includedir}/libdrm
-libdrm_tegrainclude_HEADERS = tegra.h
+libdrm_tegrainclude_HEADERS = $(LIBDRM_TEGRA_H_FILES)
pkgconfigdir = @pkgconfigdir@
pkgconfig_DATA = libdrm_tegra.pc
diff --git a/tegra/Makefile.sources b/tegra/Makefile.sources
new file mode 100644
index 00000000..52a21c8b
--- /dev/null
+++ b/tegra/Makefile.sources
@@ -0,0 +1,10 @@
+LIBDRM_TEGRA_FILES := \
+ channel.c \
+ fence.c \
+ job.c \
+ private.h \
+ pushbuf.c \
+ tegra.c
+
+LIBDRM_TEGRA_H_FILES := \
+ tegra.h