1# 2# Copyright (C) 2016 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17LOCAL_PATH := $(call my-dir) 18include $(CLEAR_VARS) 19CONFIG_DIR := $(LOCAL_PATH)/libvpx_android_configs/$(TARGET_ARCH_ABI) 20libvpx_source_dir := $(LOCAL_PATH)/libvpx 21 22LOCAL_MODULE := libvpx 23LOCAL_LICENSE_KINDS := SPDX-license-identifier-Apache-2.0 24LOCAL_LICENSE_CONDITIONS := notice 25LOCAL_NOTICE_FILE := $(LOCAL_PATH)/../../../../../LICENSE 26LOCAL_MODULE_CLASS := STATIC_LIBRARIES 27LOCAL_CFLAGS := -DHAVE_CONFIG_H=vpx_config.h 28LOCAL_ARM_MODE := arm 29LOCAL_CFLAGS += -O3 30 31# config specific include should go first to pick up the config specific rtcd. 32LOCAL_C_INCLUDES := $(CONFIG_DIR) $(libvpx_source_dir) 33 34# generate source file list 35libvpx_codec_srcs := $(sort $(shell cat $(CONFIG_DIR)/libvpx_srcs.txt)) 36LOCAL_SRC_FILES := libvpx_android_configs/$(TARGET_ARCH_ABI)/vpx_config.c 37LOCAL_SRC_FILES += $(addprefix libvpx/, $(filter-out vpx_config.c, \ 38 $(filter %.c, $(libvpx_codec_srcs)))) 39 40# include assembly files if they exist 41# "%.asm.[sS]" covers neon assembly and "%.asm" covers x86 assembly 42LOCAL_SRC_FILES += $(addprefix libvpx/, \ 43 $(filter %.asm.s %.asm.S %.asm, $(libvpx_codec_srcs))) 44 45ifneq ($(findstring armeabi-v7a, $(TARGET_ARCH_ABI)),) 46# append .neon to *_neon.c and *.[sS] 47LOCAL_SRC_FILES := $(subst _neon.c,_neon.c.neon,$(LOCAL_SRC_FILES)) 48LOCAL_SRC_FILES := $(subst .s,.s.neon,$(LOCAL_SRC_FILES)) 49LOCAL_SRC_FILES := $(subst .S,.S.neon,$(LOCAL_SRC_FILES)) 50endif 51 52LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/libvpx \ 53 $(LOCAL_PATH)/libvpx/vpx 54 55LOCAL_LDFLAGS := -Wl,--version-script=$(CONFIG_DIR)/libvpx.ver 56include $(BUILD_SHARED_LIBRARY) 57