libavcommon.mozbuild 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
  2. # This Source Code Form is subject to the terms of the Mozilla Public
  3. # License, v. 2.0. If a copy of the MPL was not distributed with this
  4. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  5. # Add assembler flags and includes
  6. if CONFIG['LIBAV_FFT_ASFLAGS']:
  7. ASFLAGS += CONFIG['LIBAV_FFT_ASFLAGS']
  8. ASFLAGS += ['-I%s/media/libav' % TOPSRCDIR]
  9. USE_YASM = True
  10. if CONFIG['OS_ARCH'] == 'WINNT':
  11. # Fix inline symbols and math defines for windows.
  12. DEFINES['_USE_MATH_DEFINES'] = True
  13. DEFINES['inline'] = "__inline"
  14. ASFLAGS += ['-Pconfig_win.asm']
  15. # 32-bit windows need to prefix symbols with an underscore.
  16. if CONFIG['CPU_ARCH'] == 'x86':
  17. ASFLAGS += ['-DPREFIX']
  18. elif CONFIG['OS_ARCH'] == 'Darwin':
  19. # 32/64-bit macosx assemblers need to prefix symbols with an underscore.
  20. ASFLAGS += ['-Pconfig_darwin.asm', '-DPREFIX']
  21. else:
  22. # Default to unix, similar to how ASFLAGS setup works in configure.in
  23. ASFLAGS += ['-Pconfig_unix.asm']
  24. LOCAL_INCLUDES += ['/media/libav']
  25. # Suppress warnings in third-party code.
  26. if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
  27. CFLAGS += [
  28. '-Wno-parentheses',
  29. '-Wno-pointer-sign',
  30. '-Wno-sign-compare',
  31. '-Wno-switch',
  32. '-Wno-type-limits',
  33. ]
  34. if CONFIG['CLANG_CXX'] or CONFIG['CLANG_CL']:
  35. CFLAGS += [
  36. '-Wno-incompatible-pointer-types-discards-qualifiers',
  37. '-Wno-logical-op-parentheses',
  38. ]
  39. if CONFIG['_MSC_VER'] and not CONFIG['CLANG_CL']:
  40. CFLAGS += [
  41. '-wd4090', # 'return' : different 'const' qualifiers
  42. '-wd4018', # '>' : signed/unsigned mismatch
  43. '-wd4305', # 'initializing' : truncation from '__int64' to 'double'
  44. ]
  45. FINAL_LIBRARY = 'lgpllibs'