作者: 谢瑞阳 10225101483 徐翔宇 10225101535
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

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