1################################################################################
2#
3# opus
4#
5################################################################################
6
7OPUS_VERSION = 1.4
8OPUS_SITE = https://downloads.xiph.org/releases/opus
9OPUS_LICENSE = BSD-3-Clause
10OPUS_LICENSE_FILES = COPYING
11OPUS_CPE_ID_VENDOR = opus-codec
12OPUS_INSTALL_STAGING = YES
13
14OPUS_CFLAGS = $(TARGET_CFLAGS)
15
16# opus has ARM assembly optimizations not compatible with thumb1:
17# Error: selected processor does not support `smull r6,ip,r5,r0' in Thumb mode
18# so force ARM mode
19ifeq ($(BR2_ARM_INSTRUCTIONS_THUMB),y)
20OPUS_CFLAGS += -marm
21endif
22
23ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_85180),y)
24OPUS_CFLAGS += -O0
25endif
26
27OPUS_CONF_ENV = CFLAGS="$(OPUS_CFLAGS)"
28OPUS_CONF_OPTS = --enable-custom-modes
29
30ifeq ($(BR2_PACKAGE_OPUS_FIXED_POINT),y)
31OPUS_CONF_OPTS += --enable-fixed-point
32endif
33
34ifeq ($(BR2_OPTIMIZE_FAST),y)
35OPUS_CONF_OPTS += --enable-float-approx
36endif
37
38# When we're on ARM, but we don't have ARM instructions (only
39# Thumb-2), disable the usage of assembly as it is not Thumb-ready.
40ifeq ($(BR2_arm)$(BR2_armeb):$(BR2_ARM_CPU_HAS_ARM),y:)
41OPUS_CONF_OPTS += --disable-asm
42endif
43
44$(eval $(autotools-package))
45