Merge #11667: Add scripts to dumpwallet RPC
[bitcoinplatinum.git] / src / leveldb / Makefile
blobf7cc7d736c4f20d6cab6e760d43b76e880b80e95
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)
10 OPT ?= -O2 -DNDEBUG
11 # (B) Debug mode, w/ full line-level debugging symbols
12 # OPT ?= -g2
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
23 TESTS = \
24 db/autocompact_test \
25 db/c_test \
26 db/corruption_test \
27 db/db_test \
28 db/dbformat_test \
29 db/fault_injection_test \
30 db/filename_test \
31 db/log_test \
32 db/recovery_test \
33 db/skiplist_test \
34 db/version_edit_test \
35 db/version_set_test \
36 db/write_batch_test \
37 helpers/memenv/memenv_test \
38 issues/issue178_test \
39 issues/issue200_test \
40 table/filter_block_test \
41 table/table_test \
42 util/arena_test \
43 util/bloom_test \
44 util/cache_test \
45 util/coding_test \
46 util/crc32c_test \
47 util/env_posix_test \
48 util/env_test \
49 util/hash_test
51 UTILS = \
52 db/db_bench \
53 db/leveldbutil
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.
59 BENCHMARKS = \
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.
74 AR=xcrun 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
80 else
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)
85 endif
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)
108 default: all
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
122 else
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
135 endif
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
147 clean:
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
152 $(STATIC_OUTDIR):
153 mkdir $@
155 $(STATIC_OUTDIR)/db: | $(STATIC_OUTDIR)
156 mkdir $@
158 $(STATIC_OUTDIR)/helpers/memenv: | $(STATIC_OUTDIR)
159 mkdir -p $@
161 $(STATIC_OUTDIR)/port: | $(STATIC_OUTDIR)
162 mkdir $@
164 $(STATIC_OUTDIR)/table: | $(STATIC_OUTDIR)
165 mkdir $@
167 $(STATIC_OUTDIR)/util: | $(STATIC_OUTDIR)
168 mkdir $@
170 .PHONY: STATIC_OBJDIRS
171 STATIC_OBJDIRS: \
172 $(STATIC_OUTDIR)/db \
173 $(STATIC_OUTDIR)/port \
174 $(STATIC_OUTDIR)/table \
175 $(STATIC_OUTDIR)/util \
176 $(STATIC_OUTDIR)/helpers/memenv
178 $(SHARED_OUTDIR):
179 mkdir $@
181 $(SHARED_OUTDIR)/db: | $(SHARED_OUTDIR)
182 mkdir $@
184 $(SHARED_OUTDIR)/helpers/memenv: | $(SHARED_OUTDIR)
185 mkdir -p $@
187 $(SHARED_OUTDIR)/port: | $(SHARED_OUTDIR)
188 mkdir $@
190 $(SHARED_OUTDIR)/table: | $(SHARED_OUTDIR)
191 mkdir $@
193 $(SHARED_OUTDIR)/util: | $(SHARED_OUTDIR)
194 mkdir $@
196 .PHONY: SHARED_OBJDIRS
197 SHARED_OBJDIRS: \
198 $(SHARED_OUTDIR)/db \
199 $(SHARED_OUTDIR)/port \
200 $(SHARED_OUTDIR)/table \
201 $(SHARED_OUTDIR)/util \
202 $(SHARED_OUTDIR)/helpers/memenv
204 $(DEVICE_OUTDIR):
205 mkdir $@
207 $(DEVICE_OUTDIR)/db: | $(DEVICE_OUTDIR)
208 mkdir $@
210 $(DEVICE_OUTDIR)/helpers/memenv: | $(DEVICE_OUTDIR)
211 mkdir -p $@
213 $(DEVICE_OUTDIR)/port: | $(DEVICE_OUTDIR)
214 mkdir $@
216 $(DEVICE_OUTDIR)/table: | $(DEVICE_OUTDIR)
217 mkdir $@
219 $(DEVICE_OUTDIR)/util: | $(DEVICE_OUTDIR)
220 mkdir $@
222 .PHONY: DEVICE_OBJDIRS
223 DEVICE_OBJDIRS: \
224 $(DEVICE_OUTDIR)/db \
225 $(DEVICE_OUTDIR)/port \
226 $(DEVICE_OUTDIR)/table \
227 $(DEVICE_OUTDIR)/util \
228 $(DEVICE_OUTDIR)/helpers/memenv
230 $(SIMULATOR_OUTDIR):
231 mkdir $@
233 $(SIMULATOR_OUTDIR)/db: | $(SIMULATOR_OUTDIR)
234 mkdir $@
236 $(SIMULATOR_OUTDIR)/helpers/memenv: | $(SIMULATOR_OUTDIR)
237 mkdir -p $@
239 $(SIMULATOR_OUTDIR)/port: | $(SIMULATOR_OUTDIR)
240 mkdir $@
242 $(SIMULATOR_OUTDIR)/table: | $(SIMULATOR_OUTDIR)
243 mkdir $@
245 $(SIMULATOR_OUTDIR)/util: | $(SIMULATOR_OUTDIR)
246 mkdir $@
248 .PHONY: SIMULATOR_OBJDIRS
249 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)
263 rm -f $@
264 $(AR) -rs $@ $(DEVICE_LIBOBJECTS)
266 $(SIMULATOR_OUTDIR)/libleveldb.a: $(SIMULATOR_LIBOBJECTS)
267 rm -f $@
268 $(AR) -rs $@ $(SIMULATOR_LIBOBJECTS)
270 $(DEVICE_OUTDIR)/libmemenv.a: $(DEVICE_MEMENVOBJECTS)
271 rm -f $@
272 $(AR) -rs $@ $(DEVICE_MEMENVOBJECTS)
274 $(SIMULATOR_OUTDIR)/libmemenv.a: $(SIMULATOR_MEMENVOBJECTS)
275 rm -f $@
276 $(AR) -rs $@ $(SIMULATOR_MEMENVOBJECTS)
278 # For iOS, create universal object libraries to be used on both the simulator and
279 # a device.
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 $@
285 else
286 $(STATIC_OUTDIR)/libleveldb.a:$(STATIC_LIBOBJECTS)
287 rm -f $@
288 $(AR) -rs $@ $(STATIC_LIBOBJECTS)
290 $(STATIC_OUTDIR)/libmemenv.a:$(STATIC_MEMENVOBJECTS)
291 rm -f $@
292 $(AR) -rs $@ $(STATIC_MEMENVOBJECTS)
293 endif
295 $(SHARED_MEMENVLIB):$(SHARED_MEMENVOBJECTS)
296 rm -f $@
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)
392 .PHONY: run-shared
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 $@