-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.am
248 lines (226 loc) · 7.72 KB
/
Makefile.am
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
###########################################################################
# (C) Copyright 2016-2017 Barcelona Supercomputing Center #
# Centro Nacional de Supercomputacion #
# #
# This file is part of the Echo Filesystem NG. #
# #
# See AUTHORS file in the top level directory for information #
# regarding developers and contributors. #
# #
# This library is free software; you can redistribute it and/or #
# modify it under the terms of the GNU Lesser General Public #
# License as published by the Free Software Foundation; either #
# version 3 of the License, or (at your option) any later version. #
# #
# The Echo Filesystem NG is distributed in the hope that it will #
# be useful, but WITHOUT ANY WARRANTY; without even the implied #
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR #
# PURPOSE. See the GNU Lesser General Public License for more #
# details. #
# #
# You should have received a copy of the GNU Lesser General Public #
# License along with Echo Filesystem NG; if not, write to the Free #
# Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #
# #
###########################################################################
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = lib tests doc examples
DIST_SUBDIRS = lib tests doc examples
END=
SPDLOG_INCLUDES = \
src/spdlog/async_logger.h \
src/spdlog/common.h \
src/spdlog/details/async_log_helper.h \
src/spdlog/details/async_logger_impl.h \
src/spdlog/details/file_helper.h \
src/spdlog/details/logger_impl.h \
src/spdlog/details/log_msg.h \
src/spdlog/details/mpmc_bounded_q.h \
src/spdlog/details/null_mutex.h \
src/spdlog/details/os.h \
src/spdlog/details/pattern_formatter_impl.h \
src/spdlog/details/registry.h \
src/spdlog/details/spdlog_impl.h \
src/spdlog/fmt/bundled/format.cc \
src/spdlog/fmt/bundled/format.h \
src/spdlog/fmt/bundled/ostream.cc \
src/spdlog/fmt/bundled/ostream.h \
src/spdlog/fmt/bundled/posix.cc \
src/spdlog/fmt/bundled/posix.h \
src/spdlog/fmt/bundled/time.h \
src/spdlog/fmt/fmt.h \
src/spdlog/fmt/ostr.h \
src/spdlog/formatter.h \
src/spdlog/logger.h \
src/spdlog/sinks/android_sink.h \
src/spdlog/sinks/ansicolor_sink.h \
src/spdlog/sinks/base_sink.h \
src/spdlog/sinks/dist_sink.h \
src/spdlog/sinks/file_sinks.h \
src/spdlog/sinks/msvc_sink.h \
src/spdlog/sinks/null_sink.h \
src/spdlog/sinks/ostream_sink.h \
src/spdlog/sinks/sink.h \
src/spdlog/sinks/stdout_sinks.h \
src/spdlog/sinks/syslog_sink.h \
src/spdlog/sinks/wincolor_sink.h \
src/spdlog/spdlog.h \
src/spdlog/tweakme.h \
$(END)
if FUSE3_BUILD
FUSEXX_CFLAGS=@FUSE3_CFLAGS@
FUSEXX_CPPFLAGS="-DFUSE_USE_VERSION=30"
FUSEXX_LIBS=@FUSE3_LIBS@
else
FUSEXX_CFLAGS=@FUSE_CFLAGS@
FUSEXX_CPPFLAGS="-DFUSE_USE_VERSION=28"
FUSEXX_LIBS=@FUSE_LIBS@
endif
# convenience library so that we can build both the filesystem's
# binary and all unit tests
noinst_LTLIBRARIES = src/libefs_aux.la
MOSTLYCLEANFILES = \
src/defaults.cpp \
src/api/messages.pb.cc \
src/api/messages.pb.h
BUILT_SOURCES = \
src/defaults.cpp \
src/api/messages.pb.cc \
src/api/messages.pb.h
# filesystem's source files in alphabetical order
src_libefs_aux_la_SOURCES = \
src/api.h \
src/api/listener.h \
src/api/message.h \
src/api/requests.h \
src/api/requests.cpp \
src/backends.h \
src/backends/backend-base.h \
src/backends/backend-base.cpp \
src/backends/posix-file.cpp \
src/backends/posix-file.h \
src/backends/dir.h \
src/backends/dram/dram.cpp \
src/backends/dram/dram.h \
src/backends/dram/file.cpp \
src/backends/dram/file.h \
src/backends/dram/mapping.cpp \
src/backends/dram/mapping.h \
src/backends/nvram-nvml/file.cpp \
src/backends/nvram-nvml/file.h \
src/backends/nvram-nvml/dir.cpp \
src/backends/nvram-nvml/dir.h \
src/backends/nvram-nvml/fuse_buf_copy_pmem.cpp \
src/backends/nvram-nvml/fuse_buf_copy_pmem.h \
src/backends/nvram-nvml/segment.cpp \
src/backends/nvram-nvml/segment.h \
src/backends/nvram-nvml/nvram-nvml.cpp \
src/backends/nvram-nvml/nvram-nvml.h \
src/backends/nvram-devdax/file.cpp \
src/backends/nvram-devdax/file.h \
src/backends/nvram-devdax/dir.cpp \
src/backends/nvram-devdax/dir.h \
src/backends/nvram-devdax/fuse_buf_copy_pmem.cpp \
src/backends/nvram-devdax/fuse_buf_copy_pmem.h \
src/backends/nvram-devdax/segment.cpp \
src/backends/nvram-devdax/segment.h \
src/backends/nvram-devdax/nvram-devdax.cpp \
src/backends/nvram-devdax/nvram-devdax.h \
src/context.h \
src/context.cpp \
src/defaults.h \
src/errors.h \
src/errors.cpp \
src/range_lock.hpp \
src/range_lock.cpp \
src/avl.hpp \
src/command-line.cpp \
src/command-line.h \
src/efs-common.h \
src/logger.h \
src/metadata/dirs.cpp \
src/metadata/dirs.h \
src/metadata/files.cpp \
src/metadata/files.h \
src/settings.h \
src/settings/config-schema.h \
src/settings/file-options.h \
src/settings/file_options/file-schema.h \
src/settings/file_options/options-map.h \
src/settings/file_options/yaml-parser.h \
src/settings/parsers.h \
src/settings/parsers.cpp \
src/settings/settings.cpp \
src/settings/settings.h \
src/usr-credentials.h \
src/fuse-mount-helper.cpp \
src/fuse-mount-helper.h \
src/thread-pool.h \
src/thread-pool-queue.h \
$(SPDLOG_INCLUDES) \
$(END)
nodist_src_libefs_aux_la_SOURCES = \
src/defaults.cpp \
src/api/messages.pb.cc \
src/api/messages.pb.h \
$(END)
src_libefs_aux_la_CPPFLAGS = \
$(FUSEXX_CPPFLAGS) \
@BOOST_CPPFLAGS@ \
-DBOOST_ALL_DYN_LINK \
-DSPDLOG_ENABLE_SYSLOG \
-I$(top_srcdir)/src \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/backends \
$(END)
src_libefs_aux_la_CXXFLAGS = \
$(FUSEXX_CFLAGS) \
-Wall -Wextra \
$(END)
src/defaults.cpp: Makefile
@( echo "/* This file autogenerated by Makefile */"; \
echo "#include <thread>"; \
echo "#include <cstdint>"; \
echo "#include \"defaults.h\""; \
echo ""; \
echo "namespace defaults {"; \
echo " const char* api_sockfile = \"/tmp/efs-api.socket\";"; \
echo " const uint32_t workers_in_pool = std::thread::hardware_concurrency();"; \
echo "} // namespace defaults"; \
) > $@
src/api/%.pb.cc src/api/%.pb.h: $(top_srcdir)/common/%.proto
$(PROTOC) --proto_path=$(top_srcdir)/common --cpp_out=$(builddir)/src/api $^
# filesystem's binary
bin_PROGRAMS = src/efs-ng
src_efs_ng_SOURCES = \
src/efs-ng.cpp \
src/efs-ng.h \
$(END)
EXTRA_src_efs_ng_DEPENDENCIES = \
src/libefs_aux.la
# we need -DBOOST_ALL_DYN_LINK to correctly link boost::log
src_efs_ng_CPPFLAGS = \
$(FUSEXX_CPPFLAGS) \
@BOOST_CPPFLAGS@ \
-DSPDLOG_ENABLE_SYSLOG \
-I$(top_srcdir)/src \
-I$(top_srcdir)/include \
-I$(top_srcdir)/src/backends \
$(END)
src_efs_ng_CXXFLAGS = \
$(FUSEXX_CFLAGS) \
-Wall -Wextra \
$(END)
src_efs_ng_LDFLAGS = \
src/libefs_aux.la \
$(FUSEXX_LIBS)\
@BOOST_LDFLAGS@ \
@BOOST_SYSTEM_LIB@ \
@BOOST_FILESYSTEM_LIB@ \
@BOOST_ASIO_LIB@ \
@BOOST_THREAD_LIB@ \
@LIBYAMLCPP_LIBS@ \
@LIBPMEM_LIBS@ \
@LIBPMEMOBJ_LIBS@ \
@PROTOBUF_LIBS@ \
$(END)