blob: be786057f89c991d8bc929f40f58fcff6dc4917b [file] [log] [blame]
Alex Vakulenkoe4eec202017-01-27 14:41:04 -08001# Copyright (C) 2016 The Android Open Source Project
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14LOCAL_PATH := $(call my-dir)
15
16include_dirs := \
17 $(LOCAL_PATH)/include \
18 $(LOCAL_PATH)/prebuilt/include
19
20# Java platform library for the system implementation of the GVR API.
21include $(CLEAR_VARS)
22LOCAL_MODULE := gvr_platform
23LOCAL_MODULE_STEM := com.google.vr.gvr.platform
24LOCAL_REQUIRED_MODULES := libgvr_system_loader libgvr_system
25LOCAL_SRC_FILES := $(call all-subdir-java-files)
26include $(BUILD_JAVA_LIBRARY)
27
28# Library to perform dlopen on the actual platform library.
29include $(CLEAR_VARS)
30LOCAL_MODULE := libgvr_system_loader
31LOCAL_SRC_FILES := library_loader.cpp
32include $(BUILD_SHARED_LIBRARY)
33
34# Shared library implementing the GVR API.
35include $(CLEAR_VARS)
36LOCAL_MODULE := libgvr_system
37
38LOCAL_SRC_FILES := \
39 shim_gvr.cpp \
40 shim_gvr_controller.cpp \
41 shim_gvr_private.cpp \
42 deviceparams/CardboardDevice.nolite.proto
43
44LOCAL_MODULE_CLASS := SHARED_LIBRARIES
45
46LOCAL_C_INCLUDES := $(include_dirs)
47LOCAL_C_INCLUDES += $(call local-generated-sources-dir)/proto/$(LOCAL_PATH)
48LOCAL_EXPORT_C_INCLUDE_DIRS := $(include_dirs)
49
50gvr_api_linker_script := $(LOCAL_PATH)/exported_apis.lds
51LOCAL_ADDITIONAL_DEPENDENCIES := $(gvr_api_linker_script)
52
53LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
54LOCAL_CFLAGS += -DEGL_EGLEXT_PROTOTYPES
55LOCAL_LDFLAGS += -Wl,-version-script,$(gvr_api_linker_script)
56
57LOCAL_SHARED_LIBRARIES := \
58 libandroid_runtime \
59 libbase \
60 libbinder \
61 libcutils \
62 libutils \
63 libgui \
64 libui \
65 libEGL \
66 libGLESv2 \
67 libvulkan \
68 libhardware \
69 liblog \
70 libsync \
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080071 libprotobuf-cpp-full
72
73LOCAL_STATIC_LIBRARIES := \
74 libdisplay \
75 libbufferhub \
76 libbufferhubqueue \
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080077 libdvrcommon \
78 libeds \
79 libdvrgraphics \
80 libsensor \
81 libperformance \
82 libpdx_default_transport \
83
84include $(BUILD_SHARED_LIBRARY)
85
86# Prebuilt shared library for libgvr_audio.so
87include $(CLEAR_VARS)
88LOCAL_MODULE := libgvr_audio
89LOCAL_MODULE_CLASS := SHARED_LIBRARIES
90LOCAL_MODULE_SUFFIX := .so
91LOCAL_MULTILIB := both
Jiwen 'Steve' Cai123ff892017-01-28 20:44:35 -080092LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080093LOCAL_SRC_FILES_arm := prebuilt/lib/android_arm/libgvr_audio.so
94LOCAL_SRC_FILES_arm64 := prebuilt/lib/android_arm64/libgvr_audio.so
Jiwen 'Steve' Cai123ff892017-01-28 20:44:35 -080095LOCAL_SRC_FILES_x86 := prebuilt/lib/android_x86/libgvr_audio.so
96LOCAL_SRC_FILES_x86_64 := prebuilt/lib/android_x86_64/libgvr_audio.so
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080097include $(BUILD_PREBUILT)
98
99# Prebuilt shared library for libgvr.so
100include $(CLEAR_VARS)
101LOCAL_MODULE := libgvr
102LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/prebuilt/include
103LOCAL_MODULE_CLASS := SHARED_LIBRARIES
104LOCAL_MODULE_SUFFIX := .so
105LOCAL_MULTILIB := both
Jiwen 'Steve' Cai123ff892017-01-28 20:44:35 -0800106LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64
Alex Vakulenkoe4eec202017-01-27 14:41:04 -0800107LOCAL_SRC_FILES_arm := prebuilt/lib/android_arm/libgvr.so
108LOCAL_SRC_FILES_arm64 := prebuilt/lib/android_arm64/libgvr.so
Jiwen 'Steve' Cai123ff892017-01-28 20:44:35 -0800109LOCAL_SRC_FILES_x86 := prebuilt/lib/android_x86/libgvr.so
110LOCAL_SRC_FILES_x86_64 := prebuilt/lib/android_x86_64/libgvr.so
Alex Vakulenkoe4eec202017-01-27 14:41:04 -0800111include $(BUILD_PREBUILT)
112
113# Prebuilt Java static library for common_library.aar
114include $(CLEAR_VARS)
115LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
116 gvr_common_library_aar:prebuilt/lib/common_library.aar
117include $(BUILD_MULTI_PREBUILT)
118
119# Dummy libgvr_ext to be used along side libgvr.so prebuilt.
120# This shall be replaced with Google3 prebuilts in future.
121include $(CLEAR_VARS)
122LOCAL_MODULE := libgvr_ext
123LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
124LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
125LOCAL_SRC_FILES := dummy_gvr_ext.cpp
Alex Vakulenkoe4eec202017-01-27 14:41:04 -0800126LOCAL_LDLIBS := -llog
127LOCAL_MODULE_TAGS := optional
128LOCAL_SHARED_LIBRARIES += libgvr
Jiwen 'Steve' Cai87162c12017-01-29 11:37:16 -0800129LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64
Alex Vakulenkoe4eec202017-01-27 14:41:04 -0800130include $(BUILD_STATIC_LIBRARY)