ya.make 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193
  1. # Generated by devtools/yamaker from nixpkgs 22.05.
  2. LIBRARY()
  3. LICENSE(
  4. CC-PDDC AND
  5. MIT
  6. )
  7. LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
  8. VERSION(3.3)
  9. ORIGINAL_SOURCE(https://github.com/libffi/libffi/archive/v3.3.tar.gz)
  10. ADDINCL(
  11. contrib/restricted/libffi
  12. contrib/restricted/libffi/include
  13. contrib/restricted/libffi/src
  14. GLOBAL contrib/restricted/libffi/include
  15. )
  16. NO_COMPILER_WARNINGS()
  17. NO_RUNTIME()
  18. CFLAGS(
  19. -DHAVE_CONFIG_H
  20. GLOBAL -DFFI_BUILDING
  21. )
  22. SRCS(
  23. src/closures.c
  24. src/java_raw_api.c
  25. src/prep_cif.c
  26. src/raw_api.c
  27. src/types.c
  28. )
  29. IF (ARCH_ARM64 AND OS_ANDROID)
  30. ADDINCL(
  31. contrib/restricted/libffi/configs/aarch64-unknown-linux-android21
  32. GLOBAL contrib/restricted/libffi/configs/aarch64-unknown-linux-android21/include
  33. )
  34. SRCS(
  35. src/aarch64/ffi.c
  36. src/aarch64/sysv.S
  37. )
  38. ELSEIF (ARCH_ARM64 AND OS_DARWIN)
  39. ADDINCL(
  40. contrib/restricted/libffi/configs/aarch64-apple-macos
  41. GLOBAL contrib/restricted/libffi/configs/aarch64-apple-macos/include
  42. )
  43. SRCS(
  44. src/aarch64/ffi.c
  45. src/aarch64/sysv.S
  46. )
  47. ELSEIF (ARCH_ARM64 AND OS_IOS)
  48. ADDINCL(
  49. contrib/restricted/libffi/configs/aarch64-apple-iphoneos
  50. GLOBAL contrib/restricted/libffi/configs/aarch64-apple-iphoneos/include
  51. )
  52. SRCS(
  53. src/aarch64/ffi.c
  54. src/aarch64/sysv.S
  55. )
  56. ELSEIF (ARCH_ARM64 AND OS_LINUX)
  57. ADDINCL(
  58. contrib/restricted/libffi/configs/aarch64-unknown-linux-gnu
  59. GLOBAL contrib/restricted/libffi/configs/aarch64-unknown-linux-gnu/include
  60. )
  61. SRCS(
  62. src/aarch64/ffi.c
  63. src/aarch64/sysv.S
  64. )
  65. ELSEIF (ARCH_ARM7 AND OS_ANDROID)
  66. ADDINCL(
  67. contrib/restricted/libffi/configs/armv7a-unknown-linux-androideabi16
  68. GLOBAL contrib/restricted/libffi/configs/armv7a-unknown-linux-androideabi16/include
  69. )
  70. SRCS(
  71. src/arm/ffi.c
  72. src/arm/sysv.S
  73. )
  74. ELSEIF (ARCH_ARM7 AND OS_LINUX)
  75. ADDINCL(
  76. contrib/restricted/libffi/configs/armv7a-unknown-linux-gnueabihf
  77. GLOBAL contrib/restricted/libffi/configs/armv7a-unknown-linux-gnueabihf/include
  78. )
  79. SRCS(
  80. src/arm/ffi.c
  81. src/arm/sysv.S
  82. )
  83. ELSEIF (ARCH_I386 AND OS_ANDROID)
  84. ADDINCL(
  85. contrib/restricted/libffi/configs/i686-pc-linux-android16
  86. GLOBAL contrib/restricted/libffi/configs/i686-pc-linux-android16/include
  87. )
  88. SRCS(
  89. src/x86/ffi.c
  90. src/x86/sysv.S
  91. )
  92. ELSEIF (ARCH_I386 AND OS_WINDOWS)
  93. ADDINCL(
  94. contrib/restricted/libffi/configs/i386-microsoft-windows
  95. GLOBAL contrib/restricted/libffi/configs/i386-microsoft-windows/include
  96. )
  97. LDFLAGS(/safeseh:no)
  98. SRCS(
  99. configs/i386-microsoft-windows/sysv_intel.masm
  100. src/x86/ffi.c
  101. )
  102. ELSEIF (ARCH_PPC64LE AND OS_LINUX)
  103. ADDINCL(
  104. contrib/restricted/libffi/configs/powerpc64le-unknown-linux-gnu
  105. GLOBAL contrib/restricted/libffi/configs/powerpc64le-unknown-linux-gnu/include
  106. )
  107. SRCS(
  108. src/powerpc/ffi.c
  109. src/powerpc/ffi_linux64.c
  110. src/powerpc/ffi_sysv.c
  111. src/powerpc/linux64.S
  112. src/powerpc/linux64_closure.S
  113. src/powerpc/ppc_closure.S
  114. src/powerpc/sysv.S
  115. )
  116. ELSEIF (ARCH_X86_64 AND OS_ANDROID)
  117. ADDINCL(
  118. contrib/restricted/libffi/configs/x86_64-pc-linux-android21
  119. GLOBAL contrib/restricted/libffi/configs/x86_64-pc-linux-android21/include
  120. )
  121. SRCS(
  122. src/x86/ffi64.c
  123. src/x86/ffiw64.c
  124. src/x86/unix64.S
  125. src/x86/win64.S
  126. )
  127. ELSEIF (ARCH_X86_64 AND OS_DARWIN)
  128. ADDINCL(
  129. contrib/restricted/libffi/configs/x86_64-apple-macosx
  130. GLOBAL contrib/restricted/libffi/configs/x86_64-apple-macosx/include
  131. )
  132. SRCS(
  133. src/x86/ffi64.c
  134. src/x86/ffiw64.c
  135. src/x86/unix64.S
  136. src/x86/win64.S
  137. )
  138. ELSEIF (ARCH_X86_64 AND OS_IOS)
  139. ADDINCL(
  140. contrib/restricted/libffi/configs/x86_64-apple-iphonesimulator
  141. GLOBAL contrib/restricted/libffi/configs/x86_64-apple-iphonesimulator/include
  142. )
  143. SRCS(
  144. src/x86/ffi64.c
  145. src/x86/ffiw64.c
  146. src/x86/unix64.S
  147. src/x86/win64.S
  148. )
  149. ELSEIF (ARCH_X86_64 AND OS_LINUX)
  150. ADDINCL(
  151. contrib/restricted/libffi/configs/x86_64-pc-linux-gnu
  152. GLOBAL contrib/restricted/libffi/configs/x86_64-pc-linux-gnu/include
  153. )
  154. SRCS(
  155. src/x86/ffi64.c
  156. src/x86/ffiw64.c
  157. src/x86/unix64.S
  158. src/x86/win64.S
  159. )
  160. ELSEIF (ARCH_X86_64 AND OS_WINDOWS)
  161. ADDINCL(
  162. contrib/restricted/libffi/configs/x86_64-microsoft-windows
  163. GLOBAL contrib/restricted/libffi/configs/x86_64-microsoft-windows/include
  164. )
  165. SRCS(
  166. configs/x86_64-microsoft-windows/win64_intel.masm
  167. src/x86/ffiw64.c
  168. )
  169. ELSEIF (OS_NONE)
  170. ADDINCL(
  171. contrib/restricted/libffi/configs/x86_64-pc-linux-gnu
  172. GLOBAL contrib/restricted/libffi/configs/x86_64-pc-linux-gnu/include
  173. )
  174. ELSE()
  175. MESSAGE(FATAL_ERROR Unsupported libffi platform: ${TARGET_PLATFORM} / ${HARDWARE_TYPE})
  176. ENDIF()
  177. END()
  178. RECURSE(
  179. testsuite
  180. )