ya.make 7.0 KB

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