小组成员:谢瑞阳、徐翔宇
Não pode escolher mais do que 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

134 linhas
3.8 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. CC = g++
  5. # Uncomment one of the following to switch between debug and opt mode
  6. #OPT = -O2 -DNDEBUG
  7. OPT = -g2
  8. CFLAGS = -c -DLEVELDB_PLATFORM_POSIX -I. -std=c++0x $(OPT)
  9. LDFLAGS=-lpthread
  10. LIBOBJECTS = \
  11. ./db/builder.o \
  12. ./db/db_impl.o \
  13. ./db/db_iter.o \
  14. ./db/filename.o \
  15. ./db/dbformat.o \
  16. ./db/log_reader.o \
  17. ./db/log_writer.o \
  18. ./db/memtable.o \
  19. ./db/repair.o \
  20. ./db/table_cache.o \
  21. ./db/version_edit.o \
  22. ./db/version_set.o \
  23. ./db/write_batch.o \
  24. ./port/port_posix.o \
  25. ./port/sha1_portable.o \
  26. ./table/block.o \
  27. ./table/block_builder.o \
  28. ./table/format.o \
  29. ./table/iterator.o \
  30. ./table/merger.o \
  31. ./table/table.o \
  32. ./table/table_builder.o \
  33. ./table/two_level_iterator.o \
  34. ./util/arena.o \
  35. ./util/cache.o \
  36. ./util/coding.o \
  37. ./util/comparator.o \
  38. ./util/crc32c.o \
  39. ./util/env.o \
  40. ./util/env_posix.o \
  41. ./util/hash.o \
  42. ./util/histogram.o \
  43. ./util/logging.o \
  44. ./util/options.o \
  45. ./util/status.o
  46. TESTUTIL = ./util/testutil.o
  47. TESTHARNESS = ./util/testharness.o $(TESTUTIL)
  48. TESTS = \
  49. arena_test \
  50. cache_test \
  51. coding_test \
  52. corruption_test \
  53. crc32c_test \
  54. db_test \
  55. dbformat_test \
  56. env_test \
  57. filename_test \
  58. log_test \
  59. sha1_test \
  60. skiplist_test \
  61. table_test \
  62. version_edit_test \
  63. write_batch_test
  64. PROGRAMS = db_bench $(TESTS)
  65. all: $(PROGRAMS)
  66. check: $(TESTS)
  67. for t in $(TESTS); do echo "***** Running $$t"; ./$$t || exit 1; done
  68. clean:
  69. rm -f $(PROGRAMS) */*.o
  70. db_bench: db/db_bench.o $(LIBOBJECTS) $(TESTUTIL)
  71. $(CC) $(LDFLAGS) db/db_bench.o $(LIBOBJECTS) $(TESTUTIL) -o $@
  72. arena_test: util/arena_test.o $(LIBOBJECTS) $(TESTHARNESS)
  73. $(CC) $(LDFLAGS) util/arena_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  74. cache_test: util/cache_test.o $(LIBOBJECTS) $(TESTHARNESS)
  75. $(CC) $(LDFLAGS) util/cache_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  76. coding_test: util/coding_test.o $(LIBOBJECTS) $(TESTHARNESS)
  77. $(CC) $(LDFLAGS) util/coding_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  78. corruption_test: db/corruption_test.o $(LIBOBJECTS) $(TESTHARNESS)
  79. $(CC) $(LDFLAGS) db/corruption_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  80. crc32c_test: util/crc32c_test.o $(LIBOBJECTS) $(TESTHARNESS)
  81. $(CC) $(LDFLAGS) util/crc32c_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  82. db_test: db/db_test.o $(LIBOBJECTS) $(TESTHARNESS)
  83. $(CC) $(LDFLAGS) db/db_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  84. dbformat_test: db/dbformat_test.o $(LIBOBJECTS) $(TESTHARNESS)
  85. $(CC) $(LDFLAGS) db/dbformat_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  86. env_test: util/env_test.o $(LIBOBJECTS) $(TESTHARNESS)
  87. $(CC) $(LDFLAGS) util/env_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  88. filename_test: db/filename_test.o $(LIBOBJECTS) $(TESTHARNESS)
  89. $(CC) $(LDFLAGS) db/filename_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  90. log_test: db/log_test.o $(LIBOBJECTS) $(TESTHARNESS)
  91. $(CC) $(LDFLAGS) db/log_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  92. table_test: table/table_test.o $(LIBOBJECTS) $(TESTHARNESS)
  93. $(CC) $(LDFLAGS) table/table_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  94. sha1_test: port/sha1_test.o $(LIBOBJECTS) $(TESTHARNESS)
  95. $(CC) $(LDFLAGS) port/sha1_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  96. skiplist_test: db/skiplist_test.o $(LIBOBJECTS) $(TESTHARNESS)
  97. $(CC) $(LDFLAGS) db/skiplist_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  98. version_edit_test: db/version_edit_test.o $(LIBOBJECTS) $(TESTHARNESS)
  99. $(CC) $(LDFLAGS) db/version_edit_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  100. write_batch_test: db/write_batch_test.o $(LIBOBJECTS) $(TESTHARNESS)
  101. $(CC) $(LDFLAGS) db/write_batch_test.o $(LIBOBJECTS) $(TESTHARNESS) -o $@
  102. .cc.o:
  103. $(CC) $(CFLAGS) $< -o $@
  104. # TODO(gabor): dependencies for .o files
  105. # TODO(gabor): Build library