ya.make 6.6 KB

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