Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 1 | # 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. |
| 14 | LOCAL_PATH := $(call my-dir) |
| 15 | |
| 16 | include_dirs := \ |
| 17 | $(LOCAL_PATH)/include \ |
| 18 | $(LOCAL_PATH)/prebuilt/include |
| 19 | |
| 20 | # Java platform library for the system implementation of the GVR API. |
| 21 | include $(CLEAR_VARS) |
| 22 | LOCAL_MODULE := gvr_platform |
| 23 | LOCAL_MODULE_STEM := com.google.vr.gvr.platform |
| 24 | LOCAL_REQUIRED_MODULES := libgvr_system_loader libgvr_system |
| 25 | LOCAL_SRC_FILES := $(call all-subdir-java-files) |
| 26 | include $(BUILD_JAVA_LIBRARY) |
| 27 | |
| 28 | # Library to perform dlopen on the actual platform library. |
| 29 | include $(CLEAR_VARS) |
| 30 | LOCAL_MODULE := libgvr_system_loader |
| 31 | LOCAL_SRC_FILES := library_loader.cpp |
| 32 | include $(BUILD_SHARED_LIBRARY) |
| 33 | |
| 34 | # Shared library implementing the GVR API. |
| 35 | include $(CLEAR_VARS) |
| 36 | LOCAL_MODULE := libgvr_system |
| 37 | |
| 38 | LOCAL_SRC_FILES := \ |
| 39 | shim_gvr.cpp \ |
| 40 | shim_gvr_controller.cpp \ |
| 41 | shim_gvr_private.cpp \ |
| 42 | deviceparams/CardboardDevice.nolite.proto |
| 43 | |
| 44 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 45 | |
| 46 | LOCAL_C_INCLUDES := $(include_dirs) |
| 47 | LOCAL_C_INCLUDES += $(call local-generated-sources-dir)/proto/$(LOCAL_PATH) |
| 48 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(include_dirs) |
| 49 | |
| 50 | gvr_api_linker_script := $(LOCAL_PATH)/exported_apis.lds |
| 51 | LOCAL_ADDITIONAL_DEPENDENCIES := $(gvr_api_linker_script) |
| 52 | |
| 53 | LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES |
| 54 | LOCAL_CFLAGS += -DEGL_EGLEXT_PROTOTYPES |
| 55 | LOCAL_LDFLAGS += -Wl,-version-script,$(gvr_api_linker_script) |
| 56 | |
| 57 | LOCAL_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 Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 71 | libprotobuf-cpp-full |
| 72 | |
| 73 | LOCAL_STATIC_LIBRARIES := \ |
| 74 | libdisplay \ |
| 75 | libbufferhub \ |
| 76 | libbufferhubqueue \ |
Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 77 | libdvrcommon \ |
| 78 | libeds \ |
| 79 | libdvrgraphics \ |
| 80 | libsensor \ |
| 81 | libperformance \ |
| 82 | libpdx_default_transport \ |
| 83 | |
| 84 | include $(BUILD_SHARED_LIBRARY) |
| 85 | |
| 86 | # Prebuilt shared library for libgvr_audio.so |
| 87 | include $(CLEAR_VARS) |
| 88 | LOCAL_MODULE := libgvr_audio |
| 89 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 90 | LOCAL_MODULE_SUFFIX := .so |
| 91 | LOCAL_MULTILIB := both |
Jiwen 'Steve' Cai | 123ff89 | 2017-01-28 20:44:35 -0800 | [diff] [blame] | 92 | LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64 |
Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 93 | LOCAL_SRC_FILES_arm := prebuilt/lib/android_arm/libgvr_audio.so |
| 94 | LOCAL_SRC_FILES_arm64 := prebuilt/lib/android_arm64/libgvr_audio.so |
Jiwen 'Steve' Cai | 123ff89 | 2017-01-28 20:44:35 -0800 | [diff] [blame] | 95 | LOCAL_SRC_FILES_x86 := prebuilt/lib/android_x86/libgvr_audio.so |
| 96 | LOCAL_SRC_FILES_x86_64 := prebuilt/lib/android_x86_64/libgvr_audio.so |
Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 97 | include $(BUILD_PREBUILT) |
| 98 | |
| 99 | # Prebuilt shared library for libgvr.so |
| 100 | include $(CLEAR_VARS) |
| 101 | LOCAL_MODULE := libgvr |
| 102 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/prebuilt/include |
| 103 | LOCAL_MODULE_CLASS := SHARED_LIBRARIES |
| 104 | LOCAL_MODULE_SUFFIX := .so |
| 105 | LOCAL_MULTILIB := both |
Jiwen 'Steve' Cai | 123ff89 | 2017-01-28 20:44:35 -0800 | [diff] [blame] | 106 | LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64 |
Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 107 | LOCAL_SRC_FILES_arm := prebuilt/lib/android_arm/libgvr.so |
| 108 | LOCAL_SRC_FILES_arm64 := prebuilt/lib/android_arm64/libgvr.so |
Jiwen 'Steve' Cai | 123ff89 | 2017-01-28 20:44:35 -0800 | [diff] [blame] | 109 | LOCAL_SRC_FILES_x86 := prebuilt/lib/android_x86/libgvr.so |
| 110 | LOCAL_SRC_FILES_x86_64 := prebuilt/lib/android_x86_64/libgvr.so |
Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 111 | include $(BUILD_PREBUILT) |
| 112 | |
| 113 | # Prebuilt Java static library for common_library.aar |
| 114 | include $(CLEAR_VARS) |
| 115 | LOCAL_PREBUILT_STATIC_JAVA_LIBRARIES := \ |
| 116 | gvr_common_library_aar:prebuilt/lib/common_library.aar |
| 117 | include $(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. |
| 121 | include $(CLEAR_VARS) |
| 122 | LOCAL_MODULE := libgvr_ext |
| 123 | LOCAL_C_INCLUDES := $(LOCAL_PATH)/include |
| 124 | LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include |
| 125 | LOCAL_SRC_FILES := dummy_gvr_ext.cpp |
Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 126 | LOCAL_LDLIBS := -llog |
| 127 | LOCAL_MODULE_TAGS := optional |
| 128 | LOCAL_SHARED_LIBRARIES += libgvr |
Jiwen 'Steve' Cai | 87162c1 | 2017-01-29 11:37:16 -0800 | [diff] [blame] | 129 | LOCAL_MODULE_TARGET_ARCH := arm arm64 x86 x86_64 |
Alex Vakulenko | e4eec20 | 2017-01-27 14:41:04 -0800 | [diff] [blame] | 130 | include $(BUILD_STATIC_LIBRARY) |