opus.mk 1.2 KB

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