moz.build 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  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. EXPORTS += [
  6. 'jconfig.h',
  7. 'jerror.h',
  8. 'jinclude.h',
  9. 'jmorecfg.h',
  10. 'jpegint.h',
  11. 'jpeglib.h',
  12. ]
  13. SOURCES += [
  14. 'jcomapi.c',
  15. 'jdapimin.c',
  16. 'jdapistd.c',
  17. 'jdatadst.c',
  18. 'jdatasrc.c',
  19. 'jdcoefct.c',
  20. 'jdcolor.c',
  21. 'jddctmgr.c',
  22. 'jdhuff.c',
  23. 'jdinput.c',
  24. 'jdmainct.c',
  25. 'jdmarker.c',
  26. 'jdmaster.c',
  27. 'jdmerge.c',
  28. 'jdphuff.c',
  29. 'jdpostct.c',
  30. 'jdsample.c',
  31. 'jdtrans.c',
  32. 'jerror.c',
  33. 'jfdctflt.c',
  34. 'jfdctfst.c',
  35. 'jfdctint.c',
  36. 'jidctflt.c',
  37. 'jidctfst.c',
  38. 'jidctint.c',
  39. 'jidctred.c',
  40. 'jmemmgr.c',
  41. 'jmemnobs.c',
  42. 'jquant1.c',
  43. 'jquant2.c',
  44. 'jutils.c',
  45. ]
  46. # These files enable support for writing JPEGs
  47. SOURCES += [
  48. 'jcapimin.c',
  49. 'jcapistd.c',
  50. 'jccoefct.c',
  51. 'jccolor.c',
  52. 'jcdctmgr.c',
  53. 'jchuff.c',
  54. 'jcinit.c',
  55. 'jcmainct.c',
  56. 'jcmarker.c',
  57. 'jcmaster.c',
  58. 'jcparam.c',
  59. 'jcphuff.c',
  60. 'jcprepct.c',
  61. 'jcsample.c',
  62. 'jctrans.c',
  63. ]
  64. if CONFIG['LIBJPEG_TURBO_USE_YASM']:
  65. USE_YASM = True
  66. if CONFIG['LIBJPEG_TURBO_ASFLAGS']:
  67. if CONFIG['CPU_ARCH'] == 'arm':
  68. SOURCES += [
  69. 'simd/jsimd_arm.c',
  70. 'simd/jsimd_arm_neon.S',
  71. ]
  72. elif CONFIG['CPU_ARCH'] == 'aarch64':
  73. SOURCES += [
  74. 'simd/jsimd_arm64.c',
  75. 'simd/jsimd_arm64_neon.S',
  76. ]
  77. elif CONFIG['CPU_ARCH'] == 'mips':
  78. SOURCES += [
  79. 'simd/jsimd_mips.c',
  80. 'simd/jsimd_mips_dspr2.S',
  81. ]
  82. elif CONFIG['CPU_ARCH'] == 'x86_64':
  83. SOURCES += [
  84. 'simd/jccolor-sse2-64.asm',
  85. 'simd/jcgray-sse2-64.asm',
  86. 'simd/jchuff-sse2-64.asm',
  87. 'simd/jcsample-sse2-64.asm',
  88. 'simd/jdcolor-sse2-64.asm',
  89. 'simd/jdmerge-sse2-64.asm',
  90. 'simd/jdsample-sse2-64.asm',
  91. 'simd/jfdctflt-sse-64.asm',
  92. 'simd/jfdctfst-sse2-64.asm',
  93. 'simd/jfdctint-sse2-64.asm',
  94. 'simd/jidctflt-sse2-64.asm',
  95. 'simd/jidctfst-sse2-64.asm',
  96. 'simd/jidctint-sse2-64.asm',
  97. 'simd/jidctred-sse2-64.asm',
  98. 'simd/jquantf-sse2-64.asm',
  99. 'simd/jquanti-sse2-64.asm',
  100. 'simd/jsimd_x86_64.c',
  101. ]
  102. elif CONFIG['CPU_ARCH'] == 'x86':
  103. SOURCES += [
  104. 'simd/jccolor-mmx.asm',
  105. 'simd/jccolor-sse2.asm',
  106. 'simd/jcgray-mmx.asm',
  107. 'simd/jcgray-sse2.asm',
  108. 'simd/jchuff-sse2.asm',
  109. 'simd/jcsample-mmx.asm',
  110. 'simd/jcsample-sse2.asm',
  111. 'simd/jdcolor-mmx.asm',
  112. 'simd/jdcolor-sse2.asm',
  113. 'simd/jdmerge-mmx.asm',
  114. 'simd/jdmerge-sse2.asm',
  115. 'simd/jdsample-mmx.asm',
  116. 'simd/jdsample-sse2.asm',
  117. 'simd/jfdctflt-3dn.asm',
  118. 'simd/jfdctflt-sse.asm',
  119. 'simd/jfdctfst-mmx.asm',
  120. 'simd/jfdctfst-sse2.asm',
  121. 'simd/jfdctint-mmx.asm',
  122. 'simd/jfdctint-sse2.asm',
  123. 'simd/jidctflt-3dn.asm',
  124. 'simd/jidctflt-sse.asm',
  125. 'simd/jidctflt-sse2.asm',
  126. 'simd/jidctfst-mmx.asm',
  127. 'simd/jidctfst-sse2.asm',
  128. 'simd/jidctint-mmx.asm',
  129. 'simd/jidctint-sse2.asm',
  130. 'simd/jidctred-mmx.asm',
  131. 'simd/jidctred-sse2.asm',
  132. 'simd/jquant-3dn.asm',
  133. 'simd/jquant-mmx.asm',
  134. 'simd/jquant-sse.asm',
  135. 'simd/jquantf-sse2.asm',
  136. 'simd/jquanti-sse2.asm',
  137. 'simd/jsimd_i386.c',
  138. 'simd/jsimdcpu.asm',
  139. ]
  140. else: # No SIMD support?
  141. SOURCES += [
  142. 'jsimd_none.c',
  143. ]
  144. ASFLAGS += CONFIG['LIBJPEG_TURBO_ASFLAGS']
  145. ASFLAGS += ['-I%s/media/libjpeg/simd/' % TOPSRCDIR]
  146. if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
  147. NO_VISIBILITY_FLAGS = True
  148. # We allow warnings for third-party code that can be updated from upstream.
  149. ALLOW_COMPILER_WARNINGS = True
  150. FINAL_LIBRARY = 'gkmedias'