ya.make 7.2 KB

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