File tree 5 files changed +82
-37
lines changed
5 files changed +82
-37
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,9 @@ $(shell sh ./build_detect_platform)
19
19
# this file is generated by build_detect_platform to set build flags
20
20
include build_config.mk
21
21
22
+ # Read in common build variable definitions and source file list.
23
+ include common.mk
24
+
22
25
# If Snappy is installed, add compilation and linker flags
23
26
# (see http://code.google.com/p/snappy/)
24
27
ifeq ($(SNAPPY ) , 1)
37
40
GOOGLE_PERFTOOLS_LDFLAGS =
38
41
endif
39
42
40
- CFLAGS = -c -I. -I./include $(PORT_CFLAGS ) $(PLATFORM_CFLAGS ) $(OPT ) $(SNAPPY_CFLAGS )
43
+ CFLAGS = -c $( C_INCLUDES:%=-I% ) $(PORT_CFLAGS ) $(PLATFORM_CFLAGS ) $(OPT ) $(SNAPPY_CFLAGS )
41
44
42
45
LDFLAGS += $(PLATFORM_LDFLAGS ) $(SNAPPY_LDFLAGS ) $(GOOGLE_PERFTOOLS_LDFLAGS )
43
46
44
- LIBOBJECTS = \
45
- ./db/builder.o \
46
- ./db/c.o \
47
- ./db/db_impl.o \
48
- ./db/db_iter.o \
49
- ./db/filename.o \
50
- ./db/dbformat.o \
51
- ./db/log_reader.o \
52
- ./db/log_writer.o \
53
- ./db/memtable.o \
54
- ./db/repair.o \
55
- ./db/table_cache.o \
56
- ./db/version_edit.o \
57
- ./db/version_set.o \
58
- ./db/write_batch.o \
59
- ./port/port_posix.o \
60
- ./table/block.o \
61
- ./table/block_builder.o \
62
- ./table/format.o \
63
- ./table/iterator.o \
64
- ./table/merger.o \
65
- ./table/table.o \
66
- ./table/table_builder.o \
67
- ./table/two_level_iterator.o \
68
- ./util/arena.o \
69
- ./util/cache.o \
70
- ./util/coding.o \
71
- ./util/comparator.o \
72
- ./util/crc32c.o \
73
- ./util/env.o \
74
- ./util/env_posix.o \
75
- ./util/hash.o \
76
- ./util/histogram.o \
77
- ./util/logging.o \
78
- ./util/options.o \
79
- ./util/status.o
47
+ LIBOBJECTS = $(SOURCES:.cc=.o ) port/port_posix.o
80
48
81
49
TESTUTIL = ./util/testutil.o
82
50
TESTHARNESS = ./util/testharness.o $(TESTUTIL )
Original file line number Diff line number Diff line change
1
+ Android NDK port for LevelDB.
2
+
3
+ This git branch contains a make system to build LevelDB
4
+ against the Android NDK: http://developer.android.com/sdk/ndk/index.html
5
+
6
+ To build:
7
+ - Download install the Android NDK
8
+ - cd into this directory
9
+ - $ ndk-build
10
+
11
+ ====
12
+
1
13
leveldb: A key-value store
2
14
Authors: Sanjay Ghemawat (
[email protected] ) and Jeff Dean (
[email protected] )
3
15
Original file line number Diff line number Diff line change
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
+ # Definitions of build variable common between Android and non-Android builds.
6
+
7
+ # Also add /include directory for extra leveldb includes.
8
+ C_INCLUDES = . ./include
9
+
10
+ SOURCES = \
11
+ ./db/builder.cc \
12
+ ./db/c.cc \
13
+ ./db/db_impl.cc \
14
+ ./db/db_iter.cc \
15
+ ./db/filename.cc \
16
+ ./db/dbformat.cc \
17
+ ./db/log_reader.cc \
18
+ ./db/log_writer.cc \
19
+ ./db/memtable.cc \
20
+ ./db/repair.cc \
21
+ ./db/table_cache.cc \
22
+ ./db/version_edit.cc \
23
+ ./db/version_set.cc \
24
+ ./db/write_batch.cc \
25
+ ./table/block.cc \
26
+ ./table/block_builder.cc \
27
+ ./table/format.cc \
28
+ ./table/iterator.cc \
29
+ ./table/merger.cc \
30
+ ./table/table.cc \
31
+ ./table/table_builder.cc \
32
+ ./table/two_level_iterator.cc \
33
+ ./util/arena.cc \
34
+ ./util/cache.cc \
35
+ ./util/coding.cc \
36
+ ./util/comparator.cc \
37
+ ./util/crc32c.cc \
38
+ ./util/env.cc \
39
+ ./util/env_posix.cc \
40
+ ./util/hash.cc \
41
+ ./util/histogram.cc \
42
+ ./util/logging.cc \
43
+ ./util/options.cc \
44
+ ./util/status.cc
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2011 The LevelDB Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. See the AUTHORS file for names of contributors.
2
+
3
+ # To build for Android, add the Android NDK to your path and type 'ndk-build'.
4
+
5
+ LOCAL_PATH := $(call my-dir)
6
+
7
+ include $(CLEAR_VARS )
8
+
9
+ include common.mk
10
+
11
+ LOCAL_MODULE := leveldb
12
+ LOCAL_C_INCLUDES := $(C_INCLUDES )
13
+ LOCAL_CPP_EXTENSION := .cc
14
+ LOCAL_CFLAGS := -DLEVELDB_PLATFORM_ANDROID -std=gnu++0x
15
+ LOCAL_SRC_FILES := $(SOURCES:%.cc=../%.cc ) ../port/port_android.cc
16
+
17
+ include $(BUILD_SHARED_LIBRARY )
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2011 The LevelDB Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. See the AUTHORS file for names of contributors.
2
+
3
+ APP_ABI := armeabi-v7a
4
+ APP_STL := gnustl_static
You can’t perform that action at this time.
0 commit comments