小组成员:谢瑞阳、徐翔宇
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

321 строка
7.3 KiB

  1. # Copyright (c) 2011 The LevelDB Authors. All rights reserved.
  2. # Use of this source code is governed by a BSD-style license that can be
  3. # found in the LICENSE file. See the AUTHORS file for names of contributors.
  4. {
  5. 'variables': {
  6. 'use_snappy%': 1,
  7. },
  8. 'target_defaults': {
  9. 'defines': [
  10. 'LEVELDB_PLATFORM_CHROMIUM=1',
  11. ],
  12. 'include_dirs': [
  13. '.',
  14. ],
  15. 'conditions': [
  16. ['OS == "win"', {
  17. 'include_dirs': [
  18. 'port/win',
  19. ],
  20. }],
  21. ['use_snappy', {
  22. 'defines': [
  23. 'USE_SNAPPY=1',
  24. ],
  25. }],
  26. ],
  27. },
  28. 'targets': [
  29. {
  30. 'target_name': 'leveldb',
  31. 'type': '<(library)',
  32. 'dependencies': [
  33. # The base libary is a lightweight abstraction layer for things like
  34. # threads and IO. http://src.chromium.org/viewvc/chrome/trunk/src/base/
  35. '../../base/base.gyp:base',
  36. ],
  37. 'conditions': [
  38. ['use_snappy', {
  39. 'dependencies': [
  40. '../../third_party/snappy/snappy.gyp:snappy',
  41. ],
  42. }],
  43. ],
  44. 'sources': [
  45. # Include and then exclude so that all files show up in IDEs, even if
  46. # they don't build.
  47. 'db/builder.cc',
  48. 'db/builder.h',
  49. 'db/db_impl.cc',
  50. 'db/db_impl.h',
  51. 'db/db_iter.cc',
  52. 'db/db_iter.h',
  53. 'db/filename.cc',
  54. 'db/filename.h',
  55. 'db/dbformat.cc',
  56. 'db/dbformat.h',
  57. 'db/log_format.h',
  58. 'db/log_reader.cc',
  59. 'db/log_reader.h',
  60. 'db/log_writer.cc',
  61. 'db/log_writer.h',
  62. 'db/memtable.cc',
  63. 'db/memtable.h',
  64. 'db/repair.cc',
  65. 'db/skiplist.h',
  66. 'db/snapshot.h',
  67. 'db/table_cache.cc',
  68. 'db/table_cache.h',
  69. 'db/version_edit.cc',
  70. 'db/version_edit.h',
  71. 'db/version_set.cc',
  72. 'db/version_set.h',
  73. 'db/write_batch.cc',
  74. 'db/write_batch_internal.h',
  75. 'include/cache.h',
  76. 'include/comparator.h',
  77. 'include/db.h',
  78. 'include/env.h',
  79. 'include/iterator.h',
  80. 'include/options.h',
  81. 'include/slice.h',
  82. 'include/status.h',
  83. 'include/table.h',
  84. 'include/table_builder.h',
  85. 'include/write_batch.h',
  86. 'port/port.h',
  87. 'port/port_chromium.cc',
  88. 'port/port_chromium.h',
  89. 'port/port_example.h',
  90. 'port/port_posix.cc',
  91. 'port/port_posix.h',
  92. 'port/sha1_portable.cc',
  93. 'port/sha1_portable.h',
  94. 'table/block.cc',
  95. 'table/block.h',
  96. 'table/block_builder.cc',
  97. 'table/block_builder.h',
  98. 'table/format.cc',
  99. 'table/format.h',
  100. 'table/iterator.cc',
  101. 'table/iterator_wrapper.h',
  102. 'table/merger.cc',
  103. 'table/merger.h',
  104. 'table/table.cc',
  105. 'table/table_builder.cc',
  106. 'table/two_level_iterator.cc',
  107. 'table/two_level_iterator.h',
  108. 'util/arena.cc',
  109. 'util/arena.h',
  110. 'util/cache.cc',
  111. 'util/coding.cc',
  112. 'util/coding.h',
  113. 'util/comparator.cc',
  114. 'util/crc32c.cc',
  115. 'util/crc32c.h',
  116. 'util/env.cc',
  117. 'util/env_chromium.cc',
  118. 'util/env_posix.cc',
  119. 'util/hash.cc',
  120. 'util/hash.h',
  121. 'util/logging.cc',
  122. 'util/logging.h',
  123. 'util/mutexlock.h',
  124. 'util/options.cc',
  125. 'util/random.h',
  126. 'util/status.cc',
  127. ],
  128. 'sources/': [
  129. ['exclude', '_(android|example|portable|posix)\\.cc$'],
  130. ],
  131. },
  132. {
  133. 'target_name': 'leveldb_testutil',
  134. 'type': '<(library)',
  135. 'dependencies': [
  136. '../../base/base.gyp:base',
  137. 'leveldb',
  138. ],
  139. 'export_dependent_settings': [
  140. # The tests use include directories from these projects.
  141. '../../base/base.gyp:base',
  142. 'leveldb',
  143. ],
  144. 'sources': [
  145. 'util/histogram.cc',
  146. 'util/histogram.h',
  147. 'util/testharness.cc',
  148. 'util/testharness.h',
  149. 'util/testutil.cc',
  150. 'util/testutil.h',
  151. ],
  152. },
  153. {
  154. 'target_name': 'leveldb_arena_test',
  155. 'type': 'executable',
  156. 'dependencies': [
  157. 'leveldb_testutil',
  158. ],
  159. 'sources': [
  160. 'util/arena_test.cc',
  161. ],
  162. },
  163. {
  164. 'target_name': 'leveldb_cache_test',
  165. 'type': 'executable',
  166. 'dependencies': [
  167. 'leveldb_testutil',
  168. ],
  169. 'sources': [
  170. 'util/cache_test.cc',
  171. ],
  172. },
  173. {
  174. 'target_name': 'leveldb_coding_test',
  175. 'type': 'executable',
  176. 'dependencies': [
  177. 'leveldb_testutil',
  178. ],
  179. 'sources': [
  180. 'util/coding_test.cc',
  181. ],
  182. },
  183. {
  184. 'target_name': 'leveldb_corruption_test',
  185. 'type': 'executable',
  186. 'dependencies': [
  187. 'leveldb_testutil',
  188. ],
  189. 'sources': [
  190. 'db/corruption_test.cc',
  191. ],
  192. },
  193. {
  194. 'target_name': 'leveldb_crc32c_test',
  195. 'type': 'executable',
  196. 'dependencies': [
  197. 'leveldb_testutil',
  198. ],
  199. 'sources': [
  200. 'util/crc32c_test.cc',
  201. ],
  202. },
  203. {
  204. 'target_name': 'leveldb_db_bench',
  205. 'type': 'executable',
  206. 'dependencies': [
  207. 'leveldb_testutil',
  208. ],
  209. 'sources': [
  210. 'db/db_bench.cc',
  211. ],
  212. },
  213. {
  214. 'target_name': 'leveldb_db_test',
  215. 'type': 'executable',
  216. 'dependencies': [
  217. 'leveldb_testutil',
  218. ],
  219. 'sources': [
  220. 'db/db_test.cc',
  221. ],
  222. },
  223. {
  224. 'target_name': 'leveldb_dbformat_test',
  225. 'type': 'executable',
  226. 'dependencies': [
  227. 'leveldb_testutil',
  228. ],
  229. 'sources': [
  230. 'db/dbformat_test.cc',
  231. ],
  232. },
  233. {
  234. 'target_name': 'leveldb_env_test',
  235. 'type': 'executable',
  236. 'dependencies': [
  237. 'leveldb_testutil',
  238. ],
  239. 'sources': [
  240. 'util/env_test.cc',
  241. ],
  242. },
  243. {
  244. 'target_name': 'leveldb_filename_test',
  245. 'type': 'executable',
  246. 'dependencies': [
  247. 'leveldb_testutil',
  248. ],
  249. 'sources': [
  250. 'db/filename_test.cc',
  251. ],
  252. },
  253. {
  254. 'target_name': 'leveldb_log_test',
  255. 'type': 'executable',
  256. 'dependencies': [
  257. 'leveldb_testutil',
  258. ],
  259. 'sources': [
  260. 'db/log_test.cc',
  261. ],
  262. },
  263. {
  264. 'target_name': 'leveldb_sha1_test',
  265. 'type': 'executable',
  266. 'dependencies': [
  267. 'leveldb_testutil',
  268. ],
  269. 'sources': [
  270. 'port/sha1_test.cc',
  271. ],
  272. },
  273. {
  274. 'target_name': 'leveldb_skiplist_test',
  275. 'type': 'executable',
  276. 'dependencies': [
  277. 'leveldb_testutil',
  278. ],
  279. 'sources': [
  280. 'db/skiplist_test.cc',
  281. ],
  282. },
  283. {
  284. 'target_name': 'leveldb_table_test',
  285. 'type': 'executable',
  286. 'dependencies': [
  287. 'leveldb_testutil',
  288. ],
  289. 'sources': [
  290. 'table/table_test.cc',
  291. ],
  292. },
  293. {
  294. 'target_name': 'leveldb_version_edit_test',
  295. 'type': 'executable',
  296. 'dependencies': [
  297. 'leveldb_testutil',
  298. ],
  299. 'sources': [
  300. 'db/version_edit_test.cc',
  301. ],
  302. },
  303. {
  304. 'target_name': 'leveldb_write_batch_test',
  305. 'type': 'executable',
  306. 'dependencies': [
  307. 'leveldb_testutil',
  308. ],
  309. 'sources': [
  310. 'db/write_batch_test.cc',
  311. ],
  312. },
  313. ],
  314. }
  315. # Local Variables:
  316. # tab-width:2
  317. # indent-tabs-mode:nil
  318. # End:
  319. # vim: set expandtab tabstop=2 shiftwidth=2: