blob: 0daf2ea17c61a3133224c524e31a3c70588fc470 [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)
Leandro Gracia Gil021f6562017-02-06 16:04:21 -080022LOCAL_MODULE := com.google.vr.gvr.platform
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080023LOCAL_REQUIRED_MODULES := libgvr_system_loader libgvr_system
Leandro Gracia Gil021f6562017-02-06 16:04:21 -080024LOCAL_SRC_FILES := $(call all-java-files-under, java)
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080025include $(BUILD_JAVA_LIBRARY)
26
27# Library to perform dlopen on the actual platform library.
28include $(CLEAR_VARS)
29LOCAL_MODULE := libgvr_system_loader
30LOCAL_SRC_FILES := library_loader.cpp
31include $(BUILD_SHARED_LIBRARY)
32
33# Shared library implementing the GVR API.
34include $(CLEAR_VARS)
35LOCAL_MODULE := libgvr_system
36
37LOCAL_SRC_FILES := \
38 shim_gvr.cpp \
39 shim_gvr_controller.cpp \
40 shim_gvr_private.cpp \
41 deviceparams/CardboardDevice.nolite.proto
42
43LOCAL_MODULE_CLASS := SHARED_LIBRARIES
44
45LOCAL_C_INCLUDES := $(include_dirs)
46LOCAL_C_INCLUDES += $(call local-generated-sources-dir)/proto/$(LOCAL_PATH)
47LOCAL_EXPORT_C_INCLUDE_DIRS := $(include_dirs)
48
49gvr_api_linker_script := $(LOCAL_PATH)/exported_apis.lds
50LOCAL_ADDITIONAL_DEPENDENCIES := $(gvr_api_linker_script)
51
52LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
53LOCAL_CFLAGS += -DEGL_EGLEXT_PROTOTYPES
54LOCAL_LDFLAGS += -Wl,-version-script,$(gvr_api_linker_script)
55
56LOCAL_SHARED_LIBRARIES := \
57 libandroid_runtime \
58 libbase \
59 libbinder \
60 libcutils \
61 libutils \
62 libgui \
63 libui \
64 libEGL \
65 libGLESv2 \
66 libvulkan \
67 libhardware \
68 liblog \
69 libsync \
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080070 libprotobuf-cpp-full
71
72LOCAL_STATIC_LIBRARIES := \
73 libdisplay \
74 libbufferhub \
75 libbufferhubqueue \
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080076 libdvrcommon \
77 libeds \
78 libdvrgraphics \
79 libsensor \
80 libperformance \
81 libpdx_default_transport \
82
83include $(BUILD_SHARED_LIBRARY)
84
85# Prebuilt shared library for libgvr_audio.so
86include $(CLEAR_VARS)
87LOCAL_MODULE := libgvr_audio
88LOCAL_MODULE_CLASS := SHARED_LIBRARIES
89LOCAL_MODULE_SUFFIX := .so
90LOCAL_MULTILIB := both
Jiwen 'Steve' Cai123ff892017-01-28 20:44:35 -080091LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080092LOCAL_SRC_FILES_arm := prebuilt/lib/android_arm/libgvr_audio.so
93LOCAL_SRC_FILES_arm64 := prebuilt/lib/android_arm64/libgvr_audio.so
Jiwen 'Steve' Cai123ff892017-01-28 20:44:35 -080094LOCAL_SRC_FILES_x86 := prebuilt/lib/android_x86/libgvr_audio.so
95LOCAL_SRC_FILES_x86_64 := prebuilt/lib/android_x86_64/libgvr_audio.so
Alex Vakulenkoe4eec202017-01-27 14:41:04 -080096include $(BUILD_PREBUILT)
97
98# Prebuilt shared library for libgvr.so
99include $(CLEAR_VARS)
100LOCAL_MODULE := libgvr
101LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/prebuilt/include
102LOCAL_MODULE_CLASS := SHARED_LIBRARIES
103LOCAL_MODULE_SUFFIX := .so
104LOCAL_MULTILIB := both
Jiwen 'Steve' Cai123ff892017-01-28 20:44:35 -0800105LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64
Alex Vakulenkoe4eec202017-01-27 14:41:04 -0800106LOCAL_SRC_FILES_arm := prebuilt/lib/android_arm/libgvr.so
107LOCAL_SRC_FILES_arm64 := prebuilt/lib/android_arm64/libgvr.so
Jiwen 'Steve' Cai123ff892017-01-28 20:44:35 -0800108LOCAL_SRC_FILES_x86 := prebuilt/lib/android_x86/libgvr.so
109LOCAL_SRC_FILES_x86_64 := prebuilt/lib/android_x86_64/libgvr.so
Alex Vakulenkoe4eec202017-01-27 14:41:04 -0800110include $(BUILD_PREBUILT)
111
112# Prebuilt Java static library for common_library.aar
113include $(CLEAR_VARS)
114LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \
115 gvr_common_library_aar:prebuilt/lib/common_library.aar
116include $(BUILD_MULTI_PREBUILT)
117
118# Dummy libgvr_ext to be used along side libgvr.so prebuilt.
119# This shall be replaced with Google3 prebuilts in future.
120include $(CLEAR_VARS)
121LOCAL_MODULE := libgvr_ext
122LOCAL_C_INCLUDES := $(LOCAL_PATH)/include
123LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include
124LOCAL_SRC_FILES := dummy_gvr_ext.cpp
Alex Vakulenkoe4eec202017-01-27 14:41:04 -0800125LOCAL_LDLIBS := -llog
126LOCAL_MODULE_TAGS := optional
127LOCAL_SHARED_LIBRARIES += libgvr
Jiwen 'Steve' Cai87162c12017-01-29 11:37:16 -0800128LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64
Alex Vakulenkoe4eec202017-01-27 14:41:04 -0800129include $(BUILD_STATIC_LIBRARY)