ya.make 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. LIBRARY(yutil)
  2. NEED_CHECK()
  3. NO_UTIL()
  4. # stream
  5. # string
  6. PEERDIR(
  7. util/charset
  8. contrib/libs/zlib
  9. contrib/libs/double-conversion
  10. )
  11. PEERDIR(
  12. contrib/libs/libc_compat
  13. )
  14. # datetime
  15. JOIN_SRCS(
  16. all_datetime.cpp
  17. datetime/base.cpp
  18. datetime/constants.cpp
  19. datetime/cputimer.cpp
  20. datetime/systime.cpp
  21. datetime/uptime.cpp
  22. )
  23. SRCS(
  24. datetime/parser.rl6
  25. digest/city.cpp
  26. random/random.cpp
  27. string/cast.cpp
  28. )
  29. IF (OS_WINDOWS)
  30. SRCS(
  31. datetime/strptime.cpp
  32. )
  33. ENDIF()
  34. # digest
  35. JOIN_SRCS(
  36. all_digest.cpp
  37. digest/fnv.cpp
  38. digest/multi.cpp
  39. digest/murmur.cpp
  40. digest/numeric.cpp
  41. digest/sequence.cpp
  42. )
  43. JOIN_SRCS(
  44. all_util.cpp
  45. ysafeptr.cpp
  46. ysaveload.cpp
  47. str_stl.cpp
  48. )
  49. # folder
  50. JOIN_SRCS(
  51. all_folder.cpp
  52. folder/dirut.cpp
  53. folder/filelist.cpp
  54. folder/fts.cpp
  55. folder/fwd.cpp
  56. folder/iterator.cpp
  57. folder/path.cpp
  58. folder/pathsplit.cpp
  59. folder/tempdir.cpp
  60. )
  61. IF (OS_WINDOWS)
  62. SRCS(
  63. folder/lstat_win.c
  64. folder/dirent_win.c
  65. )
  66. ENDIF()
  67. # generic
  68. JOIN_SRCS(
  69. all_generic.cpp
  70. generic/adaptor.cpp
  71. generic/algorithm.cpp
  72. generic/array_ref.cpp
  73. generic/array_size.cpp
  74. generic/bitmap.cpp
  75. generic/bitops.cpp
  76. generic/bt_exception.cpp
  77. generic/buffer.cpp
  78. generic/cast.cpp
  79. generic/deque.cpp
  80. generic/explicit_type.cpp
  81. generic/fastqueue.cpp
  82. generic/flags.cpp
  83. generic/function.cpp
  84. generic/function_ref.cpp
  85. generic/fwd.cpp
  86. generic/guid.cpp
  87. generic/hash.cpp
  88. generic/hash_multi_map.cpp
  89. generic/hash_table.cpp
  90. generic/hash_primes.cpp
  91. generic/hash_set.cpp
  92. generic/hide_ptr.cpp
  93. generic/intrlist.cpp
  94. generic/is_in.cpp
  95. generic/iterator.cpp
  96. generic/iterator_range.cpp
  97. generic/lazy_value.cpp
  98. generic/list.cpp
  99. generic/map.cpp
  100. generic/mapfindptr.cpp
  101. generic/maybe.cpp
  102. generic/mem_copy.cpp
  103. generic/noncopyable.cpp
  104. generic/object_counter.cpp
  105. generic/overloaded.cpp
  106. generic/ptr.cpp
  107. generic/queue.cpp
  108. generic/refcount.cpp
  109. generic/scope.cpp
  110. generic/serialized_enum.cpp
  111. generic/set.cpp
  112. generic/singleton.cpp
  113. generic/size_literals.cpp
  114. generic/stack.cpp
  115. generic/store_policy.cpp
  116. generic/strbuf.cpp
  117. generic/strfcpy.cpp
  118. generic/string.cpp
  119. generic/typelist.cpp
  120. generic/typetraits.cpp
  121. generic/utility.cpp
  122. generic/va_args.cpp
  123. generic/variant.cpp
  124. generic/vector.cpp
  125. generic/xrange.cpp
  126. generic/yexception.cpp
  127. generic/ylimits.cpp
  128. generic/ymath.cpp
  129. )
  130. # memory
  131. JOIN_SRCS(
  132. all_memory.cpp
  133. memory/addstorage.cpp
  134. memory/alloc.cpp
  135. memory/blob.cpp
  136. memory/mmapalloc.cpp
  137. memory/pool.cpp
  138. memory/segmented_string_pool.cpp
  139. memory/segpool_alloc.cpp
  140. memory/smallobj.cpp
  141. memory/tempbuf.cpp
  142. )
  143. # network
  144. JOIN_SRCS(
  145. all_network.cpp
  146. network/address.cpp
  147. network/endpoint.cpp
  148. network/hostip.cpp
  149. network/init.cpp
  150. network/interface.cpp
  151. network/iovec.cpp
  152. network/ip.cpp
  153. network/nonblock.cpp
  154. network/pair.cpp
  155. network/poller.cpp
  156. network/pollerimpl.cpp
  157. network/sock.cpp
  158. network/socket.cpp
  159. )
  160. # random
  161. JOIN_SRCS(
  162. all_random.cpp
  163. random/common_ops.cpp
  164. random/easy.cpp
  165. random/entropy.cpp
  166. random/fast.cpp
  167. random/lcg_engine.cpp
  168. random/mersenne32.cpp
  169. random/mersenne64.cpp
  170. random/mersenne.cpp
  171. random/normal.cpp
  172. random/shuffle.cpp
  173. random/init_atfork.cpp
  174. )
  175. JOIN_SRCS(
  176. all_stream.cpp
  177. stream/aligned.cpp
  178. stream/buffer.cpp
  179. stream/buffered.cpp
  180. stream/debug.cpp
  181. stream/direct_io.cpp
  182. stream/file.cpp
  183. stream/format.cpp
  184. stream/fwd.cpp
  185. stream/hex.cpp
  186. stream/holder.cpp
  187. stream/input.cpp
  188. stream/labeled.cpp
  189. stream/length.cpp
  190. stream/mem.cpp
  191. stream/multi.cpp
  192. stream/null.cpp
  193. stream/output.cpp
  194. stream/pipe.cpp
  195. stream/printf.cpp
  196. stream/str.cpp
  197. stream/tee.cpp
  198. stream/tempbuf.cpp
  199. stream/tokenizer.cpp
  200. stream/trace.cpp
  201. stream/walk.cpp
  202. stream/zerocopy.cpp
  203. stream/zerocopy_output.cpp
  204. stream/zlib.cpp
  205. )
  206. JOIN_SRCS(
  207. all_string.cpp
  208. string/ascii.cpp
  209. string/builder.cpp
  210. string/cstriter.cpp
  211. string/escape.cpp
  212. string/hex.cpp
  213. string/join.cpp
  214. string/printf.cpp
  215. string/reverse.cpp
  216. string/split.cpp
  217. string/strip.cpp
  218. string/strspn.cpp
  219. string/subst.cpp
  220. string/type.cpp
  221. string/util.cpp
  222. string/vector.cpp
  223. )
  224. IF (GCC OR CLANG OR CLANG_CL)
  225. CFLAGS(-Wnarrowing)
  226. ENDIF()
  227. IF (TSTRING_IS_STD_STRING)
  228. CFLAGS(GLOBAL -DTSTRING_IS_STD_STRING)
  229. ENDIF()
  230. JOIN_SRCS(
  231. all_system_1.cpp
  232. system/atexit.cpp
  233. system/backtrace.cpp
  234. system/compat.cpp
  235. system/condvar.cpp
  236. system/daemon.cpp
  237. system/datetime.cpp
  238. system/defaults.c
  239. system/direct_io.cpp
  240. system/dynlib.cpp
  241. system/env.cpp
  242. system/error.cpp
  243. system/event.cpp
  244. system/fasttime.cpp
  245. system/file.cpp
  246. system/file_lock.cpp
  247. system/filemap.cpp
  248. system/flock.cpp
  249. system/fs.cpp
  250. system/fstat.cpp
  251. system/getpid.cpp
  252. system/hi_lo.cpp
  253. system/hostname.cpp
  254. system/hp_timer.cpp
  255. system/info.cpp
  256. )
  257. IF (NOT OS_EMSCRIPTEN)
  258. JOIN_SRCS(
  259. all_system_2.cpp
  260. system/context.cpp
  261. system/execpath.cpp
  262. )
  263. ENDIF()
  264. IF (OS_WINDOWS)
  265. SRCS(system/err.cpp)
  266. ENDIF()
  267. JOIN_SRCS(
  268. all_system_3.cpp
  269. system/align.cpp
  270. system/byteorder.cpp
  271. system/cpu_id.cpp
  272. system/fhandle.cpp
  273. system/guard.cpp
  274. system/interrupt_signals.cpp
  275. system/madvise.cpp
  276. system/maxlen.cpp
  277. system/mincore.cpp
  278. system/mktemp.cpp
  279. system/mlock.cpp
  280. system/mutex.cpp
  281. system/nice.cpp
  282. system/pipe.cpp
  283. system/platform.cpp
  284. system/progname.cpp
  285. system/protect.cpp
  286. system/rusage.cpp
  287. system/rwlock.cpp
  288. system/sanitizers.cpp
  289. system/shellcommand.cpp
  290. system/shmat.cpp
  291. system/sigset.cpp
  292. system/spinlock.cpp
  293. system/spin_wait.cpp
  294. system/src_location.cpp
  295. system/sys_alloc.cpp
  296. system/sysstat.cpp
  297. system/tempfile.cpp
  298. system/tls.cpp
  299. system/type_name.cpp
  300. system/unaligned_mem.cpp
  301. system/user.cpp
  302. system/utime.cpp
  303. system/yassert.cpp
  304. system/yield.cpp
  305. )
  306. IF (NOT OS_EMSCRIPTEN)
  307. JOIN_SRCS(
  308. all_system_4.cpp
  309. system/mem_info.cpp
  310. system/sem.cpp
  311. system/thread.cpp
  312. system/types.cpp
  313. )
  314. ENDIF()
  315. SRC_C_NO_LTO(system/compiler.cpp)
  316. IF (OS_WINDOWS)
  317. SRCS(
  318. system/fs_win.cpp
  319. system/winint.cpp
  320. )
  321. ELSEIF (OS_CYGWIN OR OS_IOS)
  322. # no asm context switching on cygwin or iOS
  323. ELSE()
  324. IF (ARCH_X86_64 OR ARCH_I386)
  325. SRCS(
  326. system/context_x86.asm
  327. )
  328. ENDIF()
  329. IF (ARCH_AARCH64 OR ARCH_ARM64)
  330. SRCS(
  331. system/context_aarch64.S
  332. )
  333. ENDIF()
  334. ENDIF()
  335. IF (OS_LINUX)
  336. SRCS(
  337. system/valgrind.cpp
  338. )
  339. EXTRALIBS(
  340. -lrt
  341. -ldl
  342. )
  343. ENDIF()
  344. IF (MUSL)
  345. PEERDIR(
  346. contrib/libs/linuxvdso
  347. )
  348. ELSE()
  349. IF (OS_LINUX OR SUN OR CYGWIN OR OS_WINDOWS)
  350. SRCS(
  351. system/mktemp_system.cpp
  352. )
  353. ENDIF()
  354. ENDIF()
  355. # thread
  356. JOIN_SRCS(
  357. all_thread.cpp
  358. thread/factory.cpp
  359. thread/fwd.cpp
  360. thread/lfqueue.cpp
  361. thread/lfstack.cpp
  362. thread/pool.cpp
  363. thread/singleton.cpp
  364. )
  365. END()
  366. RECURSE(
  367. charset
  368. datetime
  369. digest
  370. draft
  371. folder
  372. generic
  373. memory
  374. network
  375. random
  376. stream
  377. string
  378. system
  379. thread
  380. ut
  381. )