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.
5 #-----------------------------------------------
6 # Uncomment exactly one of the lines labelled (A), (B), and (C) below
7 # to switch between compilation modes.
9 # (A) Production use (optimized mode)
11 # (B) Debug mode, w/ full line-level debugging symbols
13 # (C) Profiling mode: opt, but w/debugging symbols
14 # OPT ?= -O2 -g2 -DNDEBUG
15 #-----------------------------------------------
17 # detect what platform we're building on
18 $(shell CC
="$(CC)" CXX
="$(CXX)" TARGET_OS
="$(TARGET_OS)" \
19 .
/build_detect_platform build_config.mk .
/)
20 # this file is generated by the previous line to set build flags and sources
21 include build_config.mk
29 db
/fault_injection_test \
34 db
/version_edit_test \
37 helpers
/memenv
/memenv_test \
38 issues
/issue178_test \
39 issues
/issue200_test \
40 table
/filter_block_test \
55 # Put the object files in a subdirectory, but the application at the top of the object dir.
56 PROGNAMES
:= $(notdir $(TESTS
) $(UTILS
))
58 # On Linux may need libkyotocabinet-dev for dependency.
60 doc
/bench
/db_bench_sqlite3 \
61 doc
/bench
/db_bench_tree_db
63 CFLAGS
+= -I.
-I.
/include $(PLATFORM_CCFLAGS
) $(OPT
)
64 CXXFLAGS
+= -I.
-I.
/include $(PLATFORM_CXXFLAGS
) $(OPT
)
66 LDFLAGS
+= $(PLATFORM_LDFLAGS
)
67 LIBS
+= $(PLATFORM_LIBS
)
69 SIMULATOR_OUTDIR
=out-ios-x86
70 DEVICE_OUTDIR
=out-ios-arm
72 ifeq ($(PLATFORM
), IOS
)
73 # Note: iOS should probably be using libtool, not ar.
75 SIMULATORSDK
=$(shell xcrun
-sdk iphonesimulator
--show-sdk-path
)
76 DEVICESDK
=$(shell xcrun
-sdk iphoneos
--show-sdk-path
)
77 DEVICE_CFLAGS
= -isysroot
"$(DEVICESDK)" -arch armv6
-arch armv7
-arch armv7s
-arch arm64
78 SIMULATOR_CFLAGS
= -isysroot
"$(SIMULATORSDK)" -arch i686
-arch x86_64
79 STATIC_OUTDIR
=out-ios-universal
81 STATIC_OUTDIR
=out-static
82 SHARED_OUTDIR
=out-shared
83 STATIC_PROGRAMS
:= $(addprefix $(STATIC_OUTDIR
)/, $(PROGNAMES
))
84 SHARED_PROGRAMS
:= $(addprefix $(SHARED_OUTDIR
)/, db_bench
)
87 STATIC_LIBOBJECTS
:= $(addprefix $(STATIC_OUTDIR
)/, $(SOURCES
:.
cc=.o
))
88 STATIC_MEMENVOBJECTS
:= $(addprefix $(STATIC_OUTDIR
)/, $(MEMENV_SOURCES
:.
cc=.o
))
90 DEVICE_LIBOBJECTS
:= $(addprefix $(DEVICE_OUTDIR
)/, $(SOURCES
:.
cc=.o
))
91 DEVICE_MEMENVOBJECTS
:= $(addprefix $(DEVICE_OUTDIR
)/, $(MEMENV_SOURCES
:.
cc=.o
))
93 SIMULATOR_LIBOBJECTS
:= $(addprefix $(SIMULATOR_OUTDIR
)/, $(SOURCES
:.
cc=.o
))
94 SIMULATOR_MEMENVOBJECTS
:= $(addprefix $(SIMULATOR_OUTDIR
)/, $(MEMENV_SOURCES
:.
cc=.o
))
96 SHARED_LIBOBJECTS
:= $(addprefix $(SHARED_OUTDIR
)/, $(SOURCES
:.
cc=.o
))
97 SHARED_MEMENVOBJECTS
:= $(addprefix $(SHARED_OUTDIR
)/, $(MEMENV_SOURCES
:.
cc=.o
))
99 TESTUTIL
:= $(STATIC_OUTDIR
)/util
/testutil.o
100 TESTHARNESS
:= $(STATIC_OUTDIR
)/util
/testharness.o
$(TESTUTIL
)
102 STATIC_TESTOBJS
:= $(addprefix $(STATIC_OUTDIR
)/, $(addsuffix .o
, $(TESTS
)))
103 STATIC_UTILOBJS
:= $(addprefix $(STATIC_OUTDIR
)/, $(addsuffix .o
, $(UTILS
)))
104 STATIC_ALLOBJS
:= $(STATIC_LIBOBJECTS
) $(STATIC_MEMENVOBJECTS
) $(STATIC_TESTOBJS
) $(STATIC_UTILOBJS
) $(TESTHARNESS
)
105 DEVICE_ALLOBJS
:= $(DEVICE_LIBOBJECTS
) $(DEVICE_MEMENVOBJECTS
)
106 SIMULATOR_ALLOBJS
:= $(SIMULATOR_LIBOBJECTS
) $(SIMULATOR_MEMENVOBJECTS
)
110 # Should we build shared libraries?
111 ifneq ($(PLATFORM_SHARED_EXT
),)
113 # Many leveldb test apps use non-exported API's. Only build a subset for testing.
114 SHARED_ALLOBJS
:= $(SHARED_LIBOBJECTS
) $(SHARED_MEMENVOBJECTS
) $(TESTHARNESS
)
116 ifneq ($(PLATFORM_SHARED_VERSIONED
),true
)
117 SHARED_LIB1
= libleveldb.
$(PLATFORM_SHARED_EXT
)
118 SHARED_LIB2
= $(SHARED_LIB1
)
119 SHARED_LIB3
= $(SHARED_LIB1
)
120 SHARED_LIBS
= $(SHARED_LIB1
)
121 SHARED_MEMENVLIB
= $(SHARED_OUTDIR
)/libmemenv.a
123 # Update db.h if you change these.
124 SHARED_VERSION_MAJOR
= 1
125 SHARED_VERSION_MINOR
= 20
126 SHARED_LIB1
= libleveldb.
$(PLATFORM_SHARED_EXT
)
127 SHARED_LIB2
= $(SHARED_LIB1
).
$(SHARED_VERSION_MAJOR
)
128 SHARED_LIB3
= $(SHARED_LIB1
).
$(SHARED_VERSION_MAJOR
).
$(SHARED_VERSION_MINOR
)
129 SHARED_LIBS
= $(SHARED_OUTDIR
)/$(SHARED_LIB1
) $(SHARED_OUTDIR
)/$(SHARED_LIB2
) $(SHARED_OUTDIR
)/$(SHARED_LIB3
)
130 $(SHARED_OUTDIR
)/$(SHARED_LIB1
): $(SHARED_OUTDIR
)/$(SHARED_LIB3
)
131 ln
-fs
$(SHARED_LIB3
) $(SHARED_OUTDIR
)/$(SHARED_LIB1
)
132 $(SHARED_OUTDIR
)/$(SHARED_LIB2
): $(SHARED_OUTDIR
)/$(SHARED_LIB3
)
133 ln
-fs
$(SHARED_LIB3
) $(SHARED_OUTDIR
)/$(SHARED_LIB2
)
134 SHARED_MEMENVLIB
= $(SHARED_OUTDIR
)/libmemenv.a
137 $(SHARED_OUTDIR
)/$(SHARED_LIB3
): $(SHARED_LIBOBJECTS
)
138 $(CXX
) $(LDFLAGS
) $(PLATFORM_SHARED_LDFLAGS
)$(SHARED_LIB2
) $(SHARED_LIBOBJECTS
) -o
$(SHARED_OUTDIR
)/$(SHARED_LIB3
) $(LIBS
)
140 endif # PLATFORM_SHARED_EXT
142 all: $(SHARED_LIBS
) $(SHARED_PROGRAMS
) $(STATIC_OUTDIR
)/libleveldb.a
$(STATIC_OUTDIR
)/libmemenv.a
$(STATIC_PROGRAMS
)
144 check: $(STATIC_PROGRAMS
)
145 for t in
$(notdir $(TESTS
)); do echo
"***** Running $$t"; $(STATIC_OUTDIR
)/$$t || exit
1; done
148 -rm -rf out-static out-shared out-ios-x86 out-ios-arm out-ios-universal
149 -rm -f build_config.mk
150 -rm -rf ios-x86 ios-arm
155 $(STATIC_OUTDIR
)/db
: |
$(STATIC_OUTDIR
)
158 $(STATIC_OUTDIR
)/helpers
/memenv
: |
$(STATIC_OUTDIR
)
161 $(STATIC_OUTDIR
)/port
: |
$(STATIC_OUTDIR
)
164 $(STATIC_OUTDIR
)/table
: |
$(STATIC_OUTDIR
)
167 $(STATIC_OUTDIR
)/util
: |
$(STATIC_OUTDIR
)
170 .PHONY
: STATIC_OBJDIRS
172 $(STATIC_OUTDIR
)/db \
173 $(STATIC_OUTDIR
)/port \
174 $(STATIC_OUTDIR
)/table \
175 $(STATIC_OUTDIR
)/util \
176 $(STATIC_OUTDIR
)/helpers
/memenv
181 $(SHARED_OUTDIR
)/db
: |
$(SHARED_OUTDIR
)
184 $(SHARED_OUTDIR
)/helpers
/memenv
: |
$(SHARED_OUTDIR
)
187 $(SHARED_OUTDIR
)/port
: |
$(SHARED_OUTDIR
)
190 $(SHARED_OUTDIR
)/table
: |
$(SHARED_OUTDIR
)
193 $(SHARED_OUTDIR
)/util
: |
$(SHARED_OUTDIR
)
196 .PHONY
: SHARED_OBJDIRS
198 $(SHARED_OUTDIR
)/db \
199 $(SHARED_OUTDIR
)/port \
200 $(SHARED_OUTDIR
)/table \
201 $(SHARED_OUTDIR
)/util \
202 $(SHARED_OUTDIR
)/helpers
/memenv
207 $(DEVICE_OUTDIR
)/db
: |
$(DEVICE_OUTDIR
)
210 $(DEVICE_OUTDIR
)/helpers
/memenv
: |
$(DEVICE_OUTDIR
)
213 $(DEVICE_OUTDIR
)/port
: |
$(DEVICE_OUTDIR
)
216 $(DEVICE_OUTDIR
)/table
: |
$(DEVICE_OUTDIR
)
219 $(DEVICE_OUTDIR
)/util
: |
$(DEVICE_OUTDIR
)
222 .PHONY
: DEVICE_OBJDIRS
224 $(DEVICE_OUTDIR
)/db \
225 $(DEVICE_OUTDIR
)/port \
226 $(DEVICE_OUTDIR
)/table \
227 $(DEVICE_OUTDIR
)/util \
228 $(DEVICE_OUTDIR
)/helpers
/memenv
233 $(SIMULATOR_OUTDIR
)/db
: |
$(SIMULATOR_OUTDIR
)
236 $(SIMULATOR_OUTDIR
)/helpers
/memenv
: |
$(SIMULATOR_OUTDIR
)
239 $(SIMULATOR_OUTDIR
)/port
: |
$(SIMULATOR_OUTDIR
)
242 $(SIMULATOR_OUTDIR
)/table
: |
$(SIMULATOR_OUTDIR
)
245 $(SIMULATOR_OUTDIR
)/util
: |
$(SIMULATOR_OUTDIR
)
248 .PHONY
: SIMULATOR_OBJDIRS
250 $(SIMULATOR_OUTDIR
)/db \
251 $(SIMULATOR_OUTDIR
)/port \
252 $(SIMULATOR_OUTDIR
)/table \
253 $(SIMULATOR_OUTDIR
)/util \
254 $(SIMULATOR_OUTDIR
)/helpers
/memenv
256 $(STATIC_ALLOBJS
): | STATIC_OBJDIRS
257 $(DEVICE_ALLOBJS
): | DEVICE_OBJDIRS
258 $(SIMULATOR_ALLOBJS
): | SIMULATOR_OBJDIRS
259 $(SHARED_ALLOBJS
): | SHARED_OBJDIRS
261 ifeq ($(PLATFORM
), IOS
)
262 $(DEVICE_OUTDIR
)/libleveldb.a
: $(DEVICE_LIBOBJECTS
)
264 $(AR
) -rs
$@
$(DEVICE_LIBOBJECTS
)
266 $(SIMULATOR_OUTDIR
)/libleveldb.a
: $(SIMULATOR_LIBOBJECTS
)
268 $(AR
) -rs
$@
$(SIMULATOR_LIBOBJECTS
)
270 $(DEVICE_OUTDIR
)/libmemenv.a
: $(DEVICE_MEMENVOBJECTS
)
272 $(AR
) -rs
$@
$(DEVICE_MEMENVOBJECTS
)
274 $(SIMULATOR_OUTDIR
)/libmemenv.a
: $(SIMULATOR_MEMENVOBJECTS
)
276 $(AR
) -rs
$@
$(SIMULATOR_MEMENVOBJECTS
)
278 # For iOS, create universal object libraries to be used on both the simulator and
280 $(STATIC_OUTDIR
)/libleveldb.a
: $(STATIC_OUTDIR
) $(DEVICE_OUTDIR
)/libleveldb.a
$(SIMULATOR_OUTDIR
)/libleveldb.a
281 lipo
-create
$(DEVICE_OUTDIR
)/libleveldb.a
$(SIMULATOR_OUTDIR
)/libleveldb.a
-output
$@
283 $(STATIC_OUTDIR
)/libmemenv.a
: $(STATIC_OUTDIR
) $(DEVICE_OUTDIR
)/libmemenv.a
$(SIMULATOR_OUTDIR
)/libmemenv.a
284 lipo
-create
$(DEVICE_OUTDIR
)/libmemenv.a
$(SIMULATOR_OUTDIR
)/libmemenv.a
-output
$@
286 $(STATIC_OUTDIR
)/libleveldb.a
:$(STATIC_LIBOBJECTS
)
288 $(AR
) -rs
$@
$(STATIC_LIBOBJECTS
)
290 $(STATIC_OUTDIR
)/libmemenv.a
:$(STATIC_MEMENVOBJECTS
)
292 $(AR
) -rs
$@
$(STATIC_MEMENVOBJECTS
)
295 $(SHARED_MEMENVLIB
):$(SHARED_MEMENVOBJECTS
)
297 $(AR
) -rs
$@
$(SHARED_MEMENVOBJECTS
)
299 $(STATIC_OUTDIR
)/db_bench
:db
/db_bench.
cc $(STATIC_LIBOBJECTS
) $(TESTUTIL
)
300 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) db
/db_bench.
cc $(STATIC_LIBOBJECTS
) $(TESTUTIL
) -o
$@
$(LIBS
)
302 $(STATIC_OUTDIR
)/db_bench_sqlite3
:doc
/bench
/db_bench_sqlite3.
cc $(STATIC_LIBOBJECTS
) $(TESTUTIL
)
303 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) doc
/bench
/db_bench_sqlite3.
cc $(STATIC_LIBOBJECTS
) $(TESTUTIL
) -o
$@
-lsqlite3
$(LIBS
)
305 $(STATIC_OUTDIR
)/db_bench_tree_db
:doc
/bench
/db_bench_tree_db.
cc $(STATIC_LIBOBJECTS
) $(TESTUTIL
)
306 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) doc
/bench
/db_bench_tree_db.
cc $(STATIC_LIBOBJECTS
) $(TESTUTIL
) -o
$@
-lkyotocabinet
$(LIBS
)
308 $(STATIC_OUTDIR
)/leveldbutil
:db
/leveldbutil.
cc $(STATIC_LIBOBJECTS
)
309 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) db
/leveldbutil.
cc $(STATIC_LIBOBJECTS
) -o
$@
$(LIBS
)
311 $(STATIC_OUTDIR
)/arena_test
:util
/arena_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
312 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) util
/arena_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
314 $(STATIC_OUTDIR
)/autocompact_test
:db
/autocompact_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
315 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) db
/autocompact_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
317 $(STATIC_OUTDIR
)/bloom_test
:util
/bloom_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
318 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) util
/bloom_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
320 $(STATIC_OUTDIR
)/c_test
:$(STATIC_OUTDIR
)/db
/c_test.o
$(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
321 $(CXX
) $(LDFLAGS
) $(STATIC_OUTDIR
)/db
/c_test.o
$(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
323 $(STATIC_OUTDIR
)/cache_test
:util
/cache_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
324 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) util
/cache_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
326 $(STATIC_OUTDIR
)/coding_test
:util
/coding_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
327 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) util
/coding_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
329 $(STATIC_OUTDIR
)/corruption_test
:db
/corruption_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
330 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) db
/corruption_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
332 $(STATIC_OUTDIR
)/crc32c_test
:util
/crc32c_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
333 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) util
/crc32c_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
335 $(STATIC_OUTDIR
)/db_test
:db
/db_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
336 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) db
/db_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
338 $(STATIC_OUTDIR
)/dbformat_test
:db
/dbformat_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
339 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) db
/dbformat_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
341 $(STATIC_OUTDIR
)/env_posix_test
:util
/env_posix_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
342 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) util
/env_posix_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
344 $(STATIC_OUTDIR
)/env_test
:util
/env_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
345 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) util
/env_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
347 $(STATIC_OUTDIR
)/fault_injection_test
:db
/fault_injection_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
348 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) db
/fault_injection_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
350 $(STATIC_OUTDIR
)/filename_test
:db
/filename_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
351 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) db
/filename_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
353 $(STATIC_OUTDIR
)/filter_block_test
:table
/filter_block_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
354 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) table
/filter_block_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
356 $(STATIC_OUTDIR
)/hash_test
:util
/hash_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
357 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) util
/hash_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
359 $(STATIC_OUTDIR
)/issue178_test
:issues
/issue178_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
360 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) issues
/issue178_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
362 $(STATIC_OUTDIR
)/issue200_test
:issues
/issue200_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
363 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) issues
/issue200_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
365 $(STATIC_OUTDIR
)/log_test
:db
/log_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
366 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) db
/log_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
368 $(STATIC_OUTDIR
)/recovery_test
:db
/recovery_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
369 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) db
/recovery_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
371 $(STATIC_OUTDIR
)/table_test
:table
/table_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
372 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) table
/table_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
374 $(STATIC_OUTDIR
)/skiplist_test
:db
/skiplist_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
375 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) db
/skiplist_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
377 $(STATIC_OUTDIR
)/version_edit_test
:db
/version_edit_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
378 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) db
/version_edit_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
380 $(STATIC_OUTDIR
)/version_set_test
:db
/version_set_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
381 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) db
/version_set_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
383 $(STATIC_OUTDIR
)/write_batch_test
:db
/write_batch_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
)
384 $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) db
/write_batch_test.
cc $(STATIC_LIBOBJECTS
) $(TESTHARNESS
) -o
$@
$(LIBS
)
386 $(STATIC_OUTDIR
)/memenv_test
:$(STATIC_OUTDIR
)/helpers
/memenv
/memenv_test.o
$(STATIC_OUTDIR
)/libmemenv.a
$(STATIC_OUTDIR
)/libleveldb.a
$(TESTHARNESS
)
387 $(XCRUN
) $(CXX
) $(LDFLAGS
) $(STATIC_OUTDIR
)/helpers
/memenv
/memenv_test.o
$(STATIC_OUTDIR
)/libmemenv.a
$(STATIC_OUTDIR
)/libleveldb.a
$(TESTHARNESS
) -o
$@
$(LIBS
)
389 $(SHARED_OUTDIR
)/db_bench
:$(SHARED_OUTDIR
)/db
/db_bench.o
$(SHARED_LIBS
) $(TESTUTIL
)
390 $(XCRUN
) $(CXX
) $(LDFLAGS
) $(CXXFLAGS
) $(PLATFORM_SHARED_CFLAGS
) $(SHARED_OUTDIR
)/db
/db_bench.o
$(TESTUTIL
) $(SHARED_OUTDIR
)/$(SHARED_LIB3
) -o
$@
$(LIBS
)
393 run-shared
: $(SHARED_OUTDIR
)/db_bench
394 LD_LIBRARY_PATH
=$(SHARED_OUTDIR
) $(SHARED_OUTDIR
)/db_bench
396 $(SIMULATOR_OUTDIR
)/%.o
: %.
cc
397 xcrun
-sdk iphonesimulator
$(CXX
) $(CXXFLAGS
) $(SIMULATOR_CFLAGS
) -c
$< -o
$@
399 $(DEVICE_OUTDIR
)/%.o
: %.
cc
400 xcrun
-sdk iphoneos
$(CXX
) $(CXXFLAGS
) $(DEVICE_CFLAGS
) -c
$< -o
$@
402 $(SIMULATOR_OUTDIR
)/%.o
: %.c
403 xcrun
-sdk iphonesimulator
$(CC
) $(CFLAGS
) $(SIMULATOR_CFLAGS
) -c
$< -o
$@
405 $(DEVICE_OUTDIR
)/%.o
: %.c
406 xcrun
-sdk iphoneos
$(CC
) $(CFLAGS
) $(DEVICE_CFLAGS
) -c
$< -o
$@
408 $(STATIC_OUTDIR
)/%.o
: %.
cc
409 $(CXX
) $(CXXFLAGS
) -c
$< -o
$@
411 $(STATIC_OUTDIR
)/%.o
: %.c
412 $(CC
) $(CFLAGS
) -c
$< -o
$@
414 $(SHARED_OUTDIR
)/%.o
: %.
cc
415 $(CXX
) $(CXXFLAGS
) $(PLATFORM_SHARED_CFLAGS
) -c
$< -o
$@
417 $(SHARED_OUTDIR
)/%.o
: %.c
418 $(CC
) $(CFLAGS
) $(PLATFORM_SHARED_CFLAGS
) -c
$< -o
$@
420 $(STATIC_OUTDIR
)/port
/port_posix_sse.o
: port
/port_posix_sse.
cc
421 $(CXX
) $(CXXFLAGS
) $(PLATFORM_SSEFLAGS
) -c
$< -o
$@
423 $(SHARED_OUTDIR
)/port
/port_posix_sse.o
: port
/port_posix_sse.
cc
424 $(CXX
) $(CXXFLAGS
) $(PLATFORM_SHARED_CFLAGS
) $(PLATFORM_SSEFLAGS
) -c
$< -o
$@