ya.make 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411
  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/process_uptime.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/daemon.cpp
  238. system/datetime.cpp
  239. system/defaults.c
  240. system/direct_io.cpp
  241. system/dynlib.cpp
  242. system/env.cpp
  243. system/error.cpp
  244. system/event.cpp
  245. system/fasttime.cpp
  246. system/file.cpp
  247. system/file_lock.cpp
  248. system/filemap.cpp
  249. system/flock.cpp
  250. system/fs.cpp
  251. system/fstat.cpp
  252. system/getpid.cpp
  253. system/hi_lo.cpp
  254. system/hostname.cpp
  255. system/hp_timer.cpp
  256. system/info.cpp
  257. )
  258. IF (NOT OS_EMSCRIPTEN)
  259. JOIN_SRCS(
  260. all_system_2.cpp
  261. system/context.cpp
  262. system/execpath.cpp
  263. )
  264. ENDIF()
  265. IF (OS_WINDOWS)
  266. SRCS(system/err.cpp)
  267. ENDIF()
  268. JOIN_SRCS(
  269. all_system_3.cpp
  270. system/align.cpp
  271. system/byteorder.cpp
  272. system/cpu_id.cpp
  273. system/fhandle.cpp
  274. system/guard.cpp
  275. system/interrupt_signals.cpp
  276. system/madvise.cpp
  277. system/maxlen.cpp
  278. system/mincore.cpp
  279. system/mktemp.cpp
  280. system/mlock.cpp
  281. system/mutex.cpp
  282. system/nice.cpp
  283. system/pipe.cpp
  284. system/platform.cpp
  285. system/progname.cpp
  286. system/protect.cpp
  287. system/rusage.cpp
  288. system/rwlock.cpp
  289. system/sanitizers.cpp
  290. system/shellcommand.cpp
  291. system/shmat.cpp
  292. system/sigset.cpp
  293. system/spinlock.cpp
  294. system/spin_wait.cpp
  295. system/src_location.cpp
  296. system/sys_alloc.cpp
  297. system/sysstat.cpp
  298. system/tempfile.cpp
  299. system/tls.cpp
  300. system/type_name.cpp
  301. system/unaligned_mem.cpp
  302. system/user.cpp
  303. system/utime.cpp
  304. system/yassert.cpp
  305. system/yield.cpp
  306. )
  307. IF (NOT OS_EMSCRIPTEN)
  308. JOIN_SRCS(
  309. all_system_4.cpp
  310. system/mem_info.cpp
  311. system/sem.cpp
  312. system/thread.cpp
  313. system/types.cpp
  314. )
  315. ENDIF()
  316. SRC_C_NO_LTO(system/compiler.cpp)
  317. IF (OS_WINDOWS)
  318. SRCS(
  319. system/fs_win.cpp
  320. system/winint.cpp
  321. )
  322. ELSEIF (OS_CYGWIN OR OS_IOS)
  323. # no asm context switching on cygwin or iOS
  324. ELSE()
  325. IF (ARCH_X86_64 OR ARCH_I386)
  326. SRCS(
  327. system/context_x86.asm
  328. )
  329. ENDIF()
  330. IF (ARCH_AARCH64 OR ARCH_ARM64)
  331. SRCS(
  332. system/context_aarch64.S
  333. )
  334. ENDIF()
  335. ENDIF()
  336. IF (OS_LINUX)
  337. SRCS(
  338. system/valgrind.cpp
  339. )
  340. EXTRALIBS(
  341. -lrt
  342. -ldl
  343. )
  344. ENDIF()
  345. IF (MUSL)
  346. PEERDIR(
  347. contrib/libs/linuxvdso
  348. )
  349. ELSE()
  350. IF (OS_LINUX OR SUN OR CYGWIN OR OS_WINDOWS)
  351. SRCS(
  352. system/mktemp_system.cpp
  353. )
  354. ENDIF()
  355. ENDIF()
  356. # thread
  357. JOIN_SRCS(
  358. all_thread.cpp
  359. thread/factory.cpp
  360. thread/fwd.cpp
  361. thread/lfqueue.cpp
  362. thread/lfstack.cpp
  363. thread/pool.cpp
  364. thread/singleton.cpp
  365. )
  366. END()
  367. RECURSE(
  368. charset
  369. datetime
  370. digest
  371. draft
  372. folder
  373. generic
  374. memory
  375. network
  376. random
  377. stream
  378. string
  379. system
  380. thread
  381. ut
  382. )