2017-05-26 04:48:44 +08:00
|
|
|
#
|
|
|
|
# local.mk
|
|
|
|
#
|
|
|
|
# This source file is part of the FoundationDB open source project
|
|
|
|
#
|
|
|
|
# Copyright 2013-2018 Apple Inc. and the FoundationDB project authors
|
2018-02-22 02:25:11 +08:00
|
|
|
#
|
2017-05-26 04:48:44 +08:00
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
2018-02-22 02:25:11 +08:00
|
|
|
#
|
2017-05-26 04:48:44 +08:00
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
2018-02-22 02:25:11 +08:00
|
|
|
#
|
2017-05-26 04:48:44 +08:00
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
#
|
|
|
|
|
|
|
|
# -*- mode: makefile; -*-
|
|
|
|
|
2018-10-20 09:54:21 +08:00
|
|
|
fdbserver_CFLAGS := $(fdbclient_CFLAGS)
|
2017-05-26 04:48:44 +08:00
|
|
|
fdbserver_LDFLAGS := $(fdbrpc_LDFLAGS)
|
2018-07-06 04:21:10 +08:00
|
|
|
fdbserver_LIBS := lib/libfdbclient.a lib/libfdbrpc.a lib/libflow.a $(FDB_TLS_LIB)
|
2018-07-04 15:25:18 +08:00
|
|
|
fdbserver_STATIC_LIBS := $(TLS_LIBS)
|
2018-06-21 00:21:23 +08:00
|
|
|
|
2017-05-26 04:48:44 +08:00
|
|
|
ifeq ($(PLATFORM),linux)
|
2019-02-28 07:39:47 +08:00
|
|
|
fdbserver_LDFLAGS += -ldl -lpthread -lrt -static-libstdc++ -static-libgcc
|
2017-05-26 04:48:44 +08:00
|
|
|
|
|
|
|
# GPerfTools profiler (uncomment to use)
|
2019-04-02 05:40:39 +08:00
|
|
|
# fdbserver_CFLAGS += -I/opt/gperftools/include -DUSE_GPERFTOOLS=1 -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free
|
2017-05-26 04:48:44 +08:00
|
|
|
# fdbserver_LDFLAGS += -L/opt/gperftools/lib
|
|
|
|
# fdbserver_STATIC_LIBS += -ltcmalloc -lunwind -lprofiler
|
|
|
|
else ifeq ($(PLATFORM),osx)
|
|
|
|
fdbserver_LDFLAGS += -lc++
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(WORKLOADS),false)
|
|
|
|
fdbserver_ALL_SOURCES := $(filter-out fdbserver/workloads/%,$(fdbserver_ALL_SOURCES))
|
|
|
|
fdbserver_BUILD_SOURCES := $(filter-out fdbserver/workloads/%,$(fdbserver_BUILD_SOURCES))
|
|
|
|
endif
|
|
|
|
|
|
|
|
bin/fdbserver: bin/coverage.fdbserver.xml
|
|
|
|
|
|
|
|
bin/fdbserver.debug: bin/fdbserver
|
|
|
|
|
|
|
|
FORCE:
|
|
|
|
|
|
|
|
createtemplatedb: bin/fdbserver
|
|
|
|
bin/fdbserver -r createtemplatedb
|
|
|
|
python -c 'import textwrap; s=open("template.fdb", "rb").read().encode("hex").upper(); t="".join(["\\x"+x+y for (x,y) in zip(s[0::2], s[1::2])]) ; open("fdbserver/template_fdb.h","wb").write("static const char template_fdb[] = \\\n\t\"%s\";"%"\" \\\n\t\"".join(textwrap.wrap(t,80)))'
|