ya.make 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  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/enum_range.cpp
  82. generic/explicit_type.cpp
  83. generic/fastqueue.cpp
  84. generic/flags.cpp
  85. generic/function.cpp
  86. generic/function_ref.cpp
  87. generic/fwd.cpp
  88. generic/guid.cpp
  89. generic/hash.cpp
  90. generic/hash_multi_map.cpp
  91. generic/hash_table.cpp
  92. generic/hash_primes.cpp
  93. generic/hash_set.cpp
  94. generic/hide_ptr.cpp
  95. generic/intrlist.cpp
  96. generic/is_in.cpp
  97. generic/iterator.cpp
  98. generic/iterator_range.cpp
  99. generic/lazy_value.cpp
  100. generic/list.cpp
  101. generic/map.cpp
  102. generic/mapfindptr.cpp
  103. generic/maybe.cpp
  104. generic/mem_copy.cpp
  105. generic/noncopyable.cpp
  106. generic/object_counter.cpp
  107. generic/overloaded.cpp
  108. generic/ptr.cpp
  109. generic/queue.cpp
  110. generic/refcount.cpp
  111. generic/scope.cpp
  112. generic/serialized_enum.cpp
  113. generic/set.cpp
  114. generic/singleton.cpp
  115. generic/size_literals.cpp
  116. generic/stack.cpp
  117. generic/store_policy.cpp
  118. generic/strbuf.cpp
  119. generic/strfcpy.cpp
  120. generic/string.cpp
  121. generic/typelist.cpp
  122. generic/typetraits.cpp
  123. generic/utility.cpp
  124. generic/va_args.cpp
  125. generic/variant.cpp
  126. generic/vector.cpp
  127. generic/xrange.cpp
  128. generic/yexception.cpp
  129. generic/ylimits.cpp
  130. generic/ymath.cpp
  131. )
  132. # memory
  133. JOIN_SRCS(
  134. all_memory.cpp
  135. memory/addstorage.cpp
  136. memory/alloc.cpp
  137. memory/blob.cpp
  138. memory/mmapalloc.cpp
  139. memory/pool.cpp
  140. memory/segmented_string_pool.cpp
  141. memory/segpool_alloc.cpp
  142. memory/smallobj.cpp
  143. memory/tempbuf.cpp
  144. )
  145. # network
  146. JOIN_SRCS(
  147. all_network.cpp
  148. network/address.cpp
  149. network/endpoint.cpp
  150. network/hostip.cpp
  151. network/init.cpp
  152. network/interface.cpp
  153. network/iovec.cpp
  154. network/ip.cpp
  155. network/nonblock.cpp
  156. network/pair.cpp
  157. network/poller.cpp
  158. network/pollerimpl.cpp
  159. network/sock.cpp
  160. network/socket.cpp
  161. )
  162. # random
  163. JOIN_SRCS(
  164. all_random.cpp
  165. random/common_ops.cpp
  166. random/easy.cpp
  167. random/entropy.cpp
  168. random/fast.cpp
  169. random/lcg_engine.cpp
  170. random/mersenne32.cpp
  171. random/mersenne64.cpp
  172. random/mersenne.cpp
  173. random/normal.cpp
  174. random/shuffle.cpp
  175. random/init_atfork.cpp
  176. )
  177. JOIN_SRCS(
  178. all_stream.cpp
  179. stream/aligned.cpp
  180. stream/buffer.cpp
  181. stream/buffered.cpp
  182. stream/debug.cpp
  183. stream/direct_io.cpp
  184. stream/file.cpp
  185. stream/format.cpp
  186. stream/fwd.cpp
  187. stream/hex.cpp
  188. stream/holder.cpp
  189. stream/input.cpp
  190. stream/labeled.cpp
  191. stream/length.cpp
  192. stream/mem.cpp
  193. stream/multi.cpp
  194. stream/null.cpp
  195. stream/output.cpp
  196. stream/pipe.cpp
  197. stream/printf.cpp
  198. stream/str.cpp
  199. stream/tee.cpp
  200. stream/tempbuf.cpp
  201. stream/tokenizer.cpp
  202. stream/trace.cpp
  203. stream/walk.cpp
  204. stream/zerocopy.cpp
  205. stream/zerocopy_output.cpp
  206. stream/zlib.cpp
  207. )
  208. JOIN_SRCS(
  209. all_string.cpp
  210. string/ascii.cpp
  211. string/builder.cpp
  212. string/cstriter.cpp
  213. string/escape.cpp
  214. string/hex.cpp
  215. string/join.cpp
  216. string/printf.cpp
  217. string/reverse.cpp
  218. string/split.cpp
  219. string/strip.cpp
  220. string/strspn.cpp
  221. string/subst.cpp
  222. string/type.cpp
  223. string/util.cpp
  224. string/vector.cpp
  225. )
  226. IF (GCC OR CLANG OR CLANG_CL)
  227. CFLAGS(-Wnarrowing)
  228. ENDIF()
  229. IF (TSTRING_IS_STD_STRING)
  230. CFLAGS(GLOBAL -DTSTRING_IS_STD_STRING)
  231. ENDIF()
  232. JOIN_SRCS(
  233. all_system_1.cpp
  234. system/atexit.cpp
  235. system/backtrace.cpp
  236. system/compat.cpp
  237. system/condvar.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/fasttime.cpp
  247. system/file.cpp
  248. system/file_lock.cpp
  249. system/filemap.cpp
  250. system/flock.cpp
  251. system/fs.cpp
  252. system/fstat.cpp
  253. system/getpid.cpp
  254. system/hi_lo.cpp
  255. system/hostname.cpp
  256. system/hp_timer.cpp
  257. system/info.cpp
  258. )
  259. IF (NOT OS_EMSCRIPTEN)
  260. JOIN_SRCS(
  261. all_system_2.cpp
  262. system/context.cpp
  263. system/execpath.cpp
  264. )
  265. ENDIF()
  266. IF (OS_WINDOWS)
  267. SRCS(system/err.cpp)
  268. ENDIF()
  269. JOIN_SRCS(
  270. all_system_3.cpp
  271. system/align.cpp
  272. system/byteorder.cpp
  273. system/cpu_id.cpp
  274. system/fhandle.cpp
  275. system/guard.cpp
  276. system/interrupt_signals.cpp
  277. system/madvise.cpp
  278. system/maxlen.cpp
  279. system/mincore.cpp
  280. system/mktemp.cpp
  281. system/mlock.cpp
  282. system/mutex.cpp
  283. system/nice.cpp
  284. system/pipe.cpp
  285. system/platform.cpp
  286. system/progname.cpp
  287. system/protect.cpp
  288. system/rusage.cpp
  289. system/rwlock.cpp
  290. system/sanitizers.cpp
  291. system/shellcommand.cpp
  292. system/shmat.cpp
  293. system/sigset.cpp
  294. system/spinlock.cpp
  295. system/spin_wait.cpp
  296. system/src_location.cpp
  297. system/sys_alloc.cpp
  298. system/sysstat.cpp
  299. system/tempfile.cpp
  300. system/tls.cpp
  301. system/type_name.cpp
  302. system/unaligned_mem.cpp
  303. system/user.cpp
  304. system/utime.cpp
  305. system/yassert.cpp
  306. system/yield.cpp
  307. )
  308. IF (NOT OS_EMSCRIPTEN)
  309. JOIN_SRCS(
  310. all_system_4.cpp
  311. system/mem_info.cpp
  312. system/sem.cpp
  313. system/thread.cpp
  314. system/types.cpp
  315. )
  316. ENDIF()
  317. SRC_C_NO_LTO(system/compiler.cpp)
  318. IF (OS_WINDOWS)
  319. SRCS(
  320. system/fs_win.cpp
  321. system/winint.cpp
  322. )
  323. ELSEIF (OS_CYGWIN OR OS_IOS)
  324. # no asm context switching on cygwin or iOS
  325. ELSE()
  326. IF (ARCH_X86_64 OR ARCH_I386)
  327. SRCS(
  328. system/context_x86.asm
  329. )
  330. ENDIF()
  331. IF (ARCH_AARCH64 OR ARCH_ARM64)
  332. SRCS(
  333. system/context_aarch64.S
  334. )
  335. ENDIF()
  336. ENDIF()
  337. IF (OS_LINUX)
  338. SRCS(
  339. system/valgrind.cpp
  340. )
  341. EXTRALIBS(
  342. -lrt
  343. -ldl
  344. )
  345. ENDIF()
  346. IF (MUSL)
  347. PEERDIR(
  348. contrib/libs/linuxvdso
  349. )
  350. ELSE()
  351. IF (OS_LINUX OR SUN OR CYGWIN OR OS_WINDOWS)
  352. SRCS(
  353. system/mktemp_system.cpp
  354. )
  355. ENDIF()
  356. ENDIF()
  357. # thread
  358. JOIN_SRCS(
  359. all_thread.cpp
  360. thread/factory.cpp
  361. thread/fwd.cpp
  362. thread/lfqueue.cpp
  363. thread/lfstack.cpp
  364. thread/pool.cpp
  365. thread/singleton.cpp
  366. )
  367. END()
  368. RECURSE(
  369. charset
  370. datetime
  371. digest
  372. draft
  373. folder
  374. generic
  375. memory
  376. network
  377. random
  378. stream
  379. string
  380. system
  381. thread
  382. ut
  383. )