ya.make 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350
  1. # Generated by devtools/yamaker from nixpkgs 22.05.
  2. LIBRARY()
  3. VERSION(1.1.1t)
  4. ORIGINAL_SOURCE(https://github.com/openssl/openssl/archive/OpenSSL_1_1_1t.tar.gz)
  5. IF (OPENSOURCE_REPLACE_OPENSSL AND EXPORT_CMAKE)
  6. OPENSOURCE_EXPORT_REPLACEMENT(
  7. CMAKE OpenSSL
  8. CMAKE_TARGET OpenSSL::OpenSSL
  9. CONAN openssl/${OPENSOURCE_REPLACE_OPENSSL}
  10. )
  11. ELSE()
  12. ADDINCL(
  13. GLOBAL contrib/libs/openssl/include
  14. )
  15. ENDIF()
  16. LICENSE(
  17. Apache-2.0 AND
  18. BSD-2-Clause AND
  19. BSD-3-Clause AND
  20. BSD-Source-Code AND
  21. OpenSSL AND
  22. Public-Domain
  23. )
  24. LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
  25. PROVIDES(openssl)
  26. PEERDIR(
  27. contrib/libs/openssl/crypto
  28. )
  29. ADDINCL(
  30. contrib/libs/openssl
  31. )
  32. IF (NOT EXPORT_CMAKE OR NOT OPENSOURCE_REPLACE_OPENSSL)
  33. IF (OS_LINUX)
  34. IF (ARCH_ARM64)
  35. SET(LINUX_ARM64 yes)
  36. ELSEIF (ARCH_ARM7)
  37. SET(LINUX_ARMV7 yes)
  38. ELSEIF (ARCH_X86_64)
  39. SET(LINUX_X86_64 yes)
  40. ENDIF()
  41. ENDIF()
  42. IF (OS_IOS)
  43. IF (ARCH_ARM64)
  44. SET(IOS_ARM64 yes)
  45. ELSEIF (ARCH_ARM7)
  46. SET(IOS_ARMV7 yes)
  47. ELSEIF (ARCH_X86_64)
  48. SET(IOS_X86_64 yes)
  49. ELSEIF (ARCH_I386)
  50. SET(IOS_I386 yes)
  51. ENDIF()
  52. ENDIF()
  53. IF (OS_ANDROID)
  54. IF (ARCH_ARM64)
  55. SET(ANDROID_ARM64 yes)
  56. ELSEIF (ARCH_ARM7)
  57. SET(ANDROID_ARMV7 yes)
  58. ELSEIF (ARCH_X86_64)
  59. SET(ANDROID_X86_64 yes)
  60. ELSEIF (ARCH_I686)
  61. SET(ANDROID_I686 yes)
  62. ENDIF()
  63. ENDIF()
  64. IF (OS_WINDOWS)
  65. IF (ARCH_X86_64)
  66. SET(WINDOWS_X86_64 yes)
  67. ELSEIF (ARCH_I686)
  68. SET(WINDOWS_I686 yes)
  69. ENDIF()
  70. ENDIF()
  71. NO_COMPILER_WARNINGS()
  72. NO_RUNTIME()
  73. CFLAGS(
  74. -DAESNI_ASM
  75. -DOPENSSL_BN_ASM_MONT
  76. -DOPENSSL_CPUID_OBJ
  77. -DSHA1_ASM
  78. -DSHA256_ASM
  79. -DSHA512_ASM
  80. )
  81. IF (NOT WINDOWS_I686)
  82. CFLAGS(
  83. -DECP_NISTZ256_ASM
  84. -DPOLY1305_ASM
  85. )
  86. ENDIF()
  87. IF (NOT ANDROID_I686 AND NOT WINDOWS_I686)
  88. CFLAGS(
  89. -DKECCAK1600_ASM
  90. )
  91. ENDIF()
  92. IF (NOT OS_WINDOWS)
  93. CFLAGS(
  94. -DENGINESDIR=\"/usr/local/lib/engines-1.1\"
  95. -DOPENSSLDIR=\"/usr/local/ssl\"
  96. )
  97. ENDIF()
  98. IF (OS_DARWIN AND ARCH_X86_64 OR OS_LINUX AND ARCH_X86_64 OR OS_WINDOWS AND ARCH_X86_64)
  99. CFLAGS(
  100. -DGHASH_ASM
  101. -DL_ENDIAN
  102. -DMD5_ASM
  103. -DOPENSSL_BN_ASM_GF2m
  104. -DOPENSSL_BN_ASM_MONT5
  105. -DOPENSSL_IA32_SSE2
  106. -DPADLOCK_ASM
  107. -DRC4_ASM
  108. -DX25519_ASM
  109. )
  110. ENDIF()
  111. IF (OS_LINUX AND ARCH_AARCH64 OR OS_LINUX AND ARCH_X86_64 OR OS_ANDROID)
  112. CFLAGS(
  113. -DOPENSSL_USE_NODELETE
  114. )
  115. ENDIF()
  116. IF (OS_DARWIN AND ARCH_ARM64)
  117. CFLAGS(
  118. -DL_ENDIAN
  119. -DOPENSSL_PIC
  120. )
  121. ENDIF()
  122. IF (OS_WINDOWS)
  123. IF (ARCH_X86_64)
  124. CFLAGS(
  125. -DENGINESDIR="\"C:\\\\Program\ Files\\\\OpenSSL\\\\lib\\\\engines-1_1\""
  126. -DOPENSSLDIR="\"C:\\\\Program\ Files\\\\Common\ Files\\\\SSL\""
  127. )
  128. ELSEIF (ARCH_I386)
  129. CFLAGS(
  130. -DENGINESDIR="\"C:\\\\Program\ Files\ \(x86\)\\\\OpenSSL\\\\lib\\\\engines-1_1\""
  131. -DOPENSSLDIR="\"C:\\\\Program\ Files\ \(x86\)\\\\Common\ Files\\\\SSL\""
  132. )
  133. ENDIF()
  134. CFLAGS(
  135. -DOPENSSL_SYS_WIN32
  136. /GF
  137. )
  138. ENDIF()
  139. IF (SANITIZER_TYPE == memory)
  140. CFLAGS(
  141. -DPURIFY
  142. )
  143. ENDIF()
  144. IF (MUSL)
  145. CFLAGS(
  146. -DOPENSSL_NO_ASYNC
  147. )
  148. ENDIF()
  149. IF (ARCH_TYPE_32)
  150. CFLAGS(
  151. -DOPENSSL_NO_EC_NISTP_64_GCC_128
  152. )
  153. ENDIF()
  154. SRCS(
  155. engines/e_capi.c
  156. engines/e_padlock.c
  157. ssl/bio_ssl.c
  158. ssl/d1_lib.c
  159. ssl/d1_msg.c
  160. ssl/d1_srtp.c
  161. ssl/methods.c
  162. ssl/packet.c
  163. ssl/pqueue.c
  164. ssl/record/dtls1_bitmap.c
  165. ssl/record/rec_layer_d1.c
  166. ssl/record/rec_layer_s3.c
  167. ssl/record/ssl3_buffer.c
  168. ssl/record/ssl3_record.c
  169. ssl/record/ssl3_record_tls13.c
  170. ssl/s3_cbc.c
  171. ssl/s3_enc.c
  172. ssl/s3_lib.c
  173. ssl/s3_msg.c
  174. ssl/ssl_asn1.c
  175. ssl/ssl_cert.c
  176. ssl/ssl_ciph.c
  177. ssl/ssl_conf.c
  178. ssl/ssl_err.c
  179. ssl/ssl_init.c
  180. ssl/ssl_lib.c
  181. ssl/ssl_mcnf.c
  182. ssl/ssl_rsa.c
  183. ssl/ssl_sess.c
  184. ssl/ssl_stat.c
  185. ssl/ssl_txt.c
  186. ssl/ssl_utst.c
  187. ssl/statem/extensions.c
  188. ssl/statem/extensions_clnt.c
  189. ssl/statem/extensions_cust.c
  190. ssl/statem/extensions_srvr.c
  191. ssl/statem/statem.c
  192. ssl/statem/statem_clnt.c
  193. ssl/statem/statem_dtls.c
  194. ssl/statem/statem_lib.c
  195. ssl/statem/statem_srvr.c
  196. ssl/t1_enc.c
  197. ssl/t1_lib.c
  198. ssl/t1_trce.c
  199. ssl/tls13_enc.c
  200. ssl/tls_srp.c
  201. )
  202. IF (NOT IOS_ARMV7 AND NOT LINUX_ARMV7)
  203. CFLAGS(
  204. -DVPAES_ASM
  205. )
  206. ENDIF()
  207. IF (OS_LINUX AND ARCH_ARM7 OR OS_LINUX AND ARCH_AARCH64 OR OS_LINUX AND ARCH_X86_64 OR OS_LINUX AND ARCH_PPC64LE)
  208. SRCS(
  209. engines/e_afalg.c
  210. )
  211. ENDIF()
  212. IF (OS_DARWIN AND ARCH_X86_64)
  213. SRCS(
  214. asm/darwin/engines/e_padlock-x86_64.s
  215. )
  216. ENDIF()
  217. IF (OS_LINUX AND ARCH_X86_64)
  218. SRCS(
  219. asm/linux/engines/e_padlock-x86_64.s
  220. )
  221. ENDIF()
  222. IF (OS_WINDOWS AND ARCH_X86_64)
  223. SRCS(
  224. asm/windows/engines/e_padlock-x86_64.masm
  225. )
  226. ENDIF()
  227. IF (OS_WINDOWS AND ARCH_I386)
  228. CFLAGS(
  229. -DPADLOCK_ASM
  230. )
  231. MASMFLAGS(
  232. /safeseh
  233. )
  234. SRCS(
  235. asm/windows/engines/e_padlock-x86.masm
  236. )
  237. ENDIF()
  238. IF (OS_IOS AND ARCH_X86_64)
  239. CFLAGS(
  240. -DPADLOCK_ASM
  241. -D_REENTRANT
  242. )
  243. SRCS(
  244. asm/ios/x86_64/engines/e_padlock-x86_64.s
  245. engines/e_dasync.c
  246. engines/e_ossltest.c
  247. )
  248. ENDIF()
  249. IF (OS_ANDROID AND ARCH_X86_64)
  250. CFLAGS(
  251. -DOPENSSL_PIC
  252. -DOPENSSL_IA32_SSE2
  253. -DOPENSSL_BN_ASM_MONT5
  254. -DOPENSSL_BN_ASM_GF2m
  255. -DDRC4_ASM
  256. -DMD5_ASM
  257. -DGHASH_ASM
  258. -DX25519_ASM
  259. )
  260. SRCS(
  261. asm/android/x86_64/engines/e_padlock-x86_64.s
  262. )
  263. ENDIF()
  264. IF (OS_ANDROID AND ARCH_I686)
  265. CFLAGS(
  266. -DOPENSSL_PIC
  267. -DOPENSSL_BN_ASM_PART_WORDS
  268. -DOPENSSL_IA32_SSE2
  269. -DOPENSSL_BN_ASM_MONT
  270. -DOPENSSL_BN_ASM_GF2m
  271. -DRC4_ASM
  272. -DMD5_ASM
  273. -DRMD160_ASM
  274. -DVPAES_ASM
  275. -DWHIRLPOOL_ASM
  276. -DGHASH_ASM
  277. )
  278. SRCS(
  279. asm/android/i686/engines/e_padlock-x86.s
  280. )
  281. ENDIF()
  282. IF (OS_ANDROID AND ARCH_ARM7)
  283. CFLAGS(
  284. -DOPENSSL_PIC
  285. -DOPENSSL_BN_ASM_GF2m
  286. -DKECCAK1600_ASM
  287. -DAES_ASM
  288. -DBSAES_ASM
  289. -DGHASH_ASM
  290. )
  291. ENDIF()
  292. IF (OS_ANDROID AND ARCH_ARM64)
  293. CFLAGS(
  294. -DOPENSSL_PIC
  295. -DKECCAK1600_ASM
  296. -DVPAES_ASM
  297. )
  298. ENDIF()
  299. ENDIF() # IF (NOT EXPORT_CMAKE OR NOT OPENSOURCE_REPLACE_OPENSSL)
  300. END()
  301. RECURSE(
  302. apps
  303. crypto
  304. )