2018-10-30 05:13:35 -05:00
|
|
|
ETAGS=ctags -e
|
|
|
|
|
2019-02-13 06:22:25 -06:00
|
|
|
if ENABLE_MOBILEAPP
|
2018-08-31 05:24:17 -05:00
|
|
|
|
2018-10-16 18:03:39 -05:00
|
|
|
if ENABLE_GTKAPP
|
2018-10-17 02:26:01 -05:00
|
|
|
SUBDIRS = gtk loleaflet
|
2019-02-13 06:22:25 -06:00
|
|
|
else
|
|
|
|
SUBDIRS = loleaflet
|
|
|
|
endif
|
2018-10-16 18:03:39 -05:00
|
|
|
|
|
|
|
else
|
|
|
|
|
2020-02-19 04:06:10 -06:00
|
|
|
SUBDIRS = . test loleaflet cypress_test
|
2015-10-21 05:01:47 -05:00
|
|
|
|
2016-04-15 08:23:44 -05:00
|
|
|
export ENABLE_DEBUG
|
|
|
|
|
2018-04-17 08:01:49 -05:00
|
|
|
bin_PROGRAMS = \
|
Add an initial libfuzzer based fuzzer
- target ClientSession::_handleInput(), since crashing there would bring
down the whole loolwsd (not just a kit process), and it deals with
input from untrusted users (browsers)
- add a --enable-fuzzers configure switch to build with
-fsanitize=fuzzer (compared to normal sanitizers build, this is the only
special flag needed)
- configuring other sanitizers is not done automatically, either use
--with-sanitizer=... or the environment variables from LODE's sanitizer
config
- run the actual fuzzer like this:
./clientsession_fuzzer -max_len=16384 fuzzer/data/
- note that at least openSUSE Leap 15.1 sadly ships with a clang with
libfuzzer static libs removed from the package, so you need a
self-built clang to run the fuzzer (either manual build or one from
LODE)
- <https://chromium.googlesource.com/chromium/src/testing/libfuzzer/+/refs/heads/master/efficient_fuzzing.md#execution-speed>
suggests that "You should aim for at least 1,000 exec/s from your fuzz
target locally" (i.e. one run should not take more than 1 ms), so try
this minimal approach first. The alternative would be to start from the
existing loolwsd_fuzzer binary, then step by step cut it down to not
fork(), not do any network traffic, etc -- till it's fast enough that
the fuzzer can find interesting input
- the various configurations start to be really complex (the matrix is
just very large), so try to use Util::isFuzzing() for fuzzer-specific
changes (this is what core.git does as well), and only resort to ifdefs
for the Util::isFuzzing() itself
Change-Id: I72dc1193b34c93eacb5d8e39cef42387d42bd72f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89226
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-21 08:52:20 -06:00
|
|
|
loolforkit \
|
2018-05-14 03:50:54 -05:00
|
|
|
loolconvert loolconfig
|
2015-03-09 04:11:15 -05:00
|
|
|
|
Add an initial libfuzzer based fuzzer
- target ClientSession::_handleInput(), since crashing there would bring
down the whole loolwsd (not just a kit process), and it deals with
input from untrusted users (browsers)
- add a --enable-fuzzers configure switch to build with
-fsanitize=fuzzer (compared to normal sanitizers build, this is the only
special flag needed)
- configuring other sanitizers is not done automatically, either use
--with-sanitizer=... or the environment variables from LODE's sanitizer
config
- run the actual fuzzer like this:
./clientsession_fuzzer -max_len=16384 fuzzer/data/
- note that at least openSUSE Leap 15.1 sadly ships with a clang with
libfuzzer static libs removed from the package, so you need a
self-built clang to run the fuzzer (either manual build or one from
LODE)
- <https://chromium.googlesource.com/chromium/src/testing/libfuzzer/+/refs/heads/master/efficient_fuzzing.md#execution-speed>
suggests that "You should aim for at least 1,000 exec/s from your fuzz
target locally" (i.e. one run should not take more than 1 ms), so try
this minimal approach first. The alternative would be to start from the
existing loolwsd_fuzzer binary, then step by step cut it down to not
fork(), not do any network traffic, etc -- till it's fast enough that
the fuzzer can find interesting input
- the various configurations start to be really complex (the matrix is
just very large), so try to use Util::isFuzzing() for fuzzer-specific
changes (this is what core.git does as well), and only resort to ifdefs
for the Util::isFuzzing() itself
Change-Id: I72dc1193b34c93eacb5d8e39cef42387d42bd72f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89226
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-21 08:52:20 -06:00
|
|
|
if ENABLE_LIBFUZZER
|
|
|
|
else
|
|
|
|
bin_PROGRAMS += loolwsd
|
|
|
|
endif
|
|
|
|
|
2020-04-23 08:55:32 -05:00
|
|
|
dist_bin_SCRIPTS = loolwsd-systemplate-setup \
|
|
|
|
loolwsd-generate-proof-key
|
2016-04-14 07:43:13 -05:00
|
|
|
|
2018-05-14 03:49:46 -05:00
|
|
|
man_MANS = man/loolwsd.1 \
|
|
|
|
man/loolforkit.1 \
|
|
|
|
man/loolconvert.1 \
|
|
|
|
man/loolconfig.1 \
|
2020-04-23 08:55:32 -05:00
|
|
|
man/loolwsd-systemplate-setup.1 \
|
|
|
|
man/loolwsd-generate-proof-key.1
|
2018-05-14 03:49:46 -05:00
|
|
|
|
2017-05-03 07:13:37 -05:00
|
|
|
dist_doc_DATA = wsd/README \
|
|
|
|
wsd/README.vars \
|
|
|
|
wsd/protocol.txt \
|
2019-11-12 03:50:33 -06:00
|
|
|
wsd/reference.md \
|
|
|
|
wsd/metrics.txt
|
2017-05-03 07:13:37 -05:00
|
|
|
|
2016-04-14 07:43:13 -05:00
|
|
|
loolwsddatadir = @LOOLWSD_DATADIR@
|
|
|
|
|
2016-05-30 10:40:40 -05:00
|
|
|
loolwsddata_DATA = discovery.xml \
|
2018-02-15 08:17:32 -06:00
|
|
|
favicon.ico
|
2015-05-19 05:20:16 -05:00
|
|
|
|
2016-04-14 08:06:49 -05:00
|
|
|
loolwsdconfigdir = @LOOLWSD_CONFIGDIR@
|
|
|
|
|
2017-03-11 13:43:26 -06:00
|
|
|
loolwsdconfig_DATA = loolwsd.xml \
|
|
|
|
loolkitconfig.xcu
|
2016-04-14 11:47:35 -05:00
|
|
|
|
2018-10-27 07:46:59 -05:00
|
|
|
apache2configdir = ${sysconfdir}/apache2/conf-available
|
|
|
|
|
|
|
|
apache2config_DATA = etc/apache2/loolwsd.conf
|
|
|
|
|
|
|
|
nginxconfigdir = ${sysconfdir}/nginx/snippets
|
|
|
|
|
|
|
|
nginxconfig_DATA = etc/nginx/loolwsd.conf
|
|
|
|
|
2016-04-12 02:39:53 -05:00
|
|
|
ACLOCAL_AMFLAGS = -I m4
|
|
|
|
|
2016-11-24 08:56:06 -06:00
|
|
|
# quick and easy for now.
|
2017-03-30 06:08:47 -05:00
|
|
|
include_paths = -I${top_srcdir}/common -I${top_srcdir}/net -I${top_srcdir}/wsd -I${top_srcdir}/kit ${ZLIB_CFLAGS}
|
2016-11-24 08:56:06 -06:00
|
|
|
|
2017-03-11 13:43:26 -06:00
|
|
|
AM_CPPFLAGS = -pthread -DLOOLWSD_DATADIR='"@LOOLWSD_DATADIR@"' \
|
|
|
|
-DLOOLWSD_CONFIGDIR='"@LOOLWSD_CONFIGDIR@"' \
|
|
|
|
-DDEBUG_ABSSRCDIR='"@abs_srcdir@"' \
|
|
|
|
${include_paths}
|
2017-03-31 04:12:10 -05:00
|
|
|
|
2017-04-05 04:57:28 -05:00
|
|
|
if !ENABLE_DEBUG
|
|
|
|
AM_CPPFLAGS += -DNDEBUG
|
|
|
|
endif
|
|
|
|
|
2019-03-15 11:27:40 -05:00
|
|
|
AM_LDFLAGS = -pthread -Wl,-E,-rpath,/snap/loolwsd/current/usr/lib -lpam $(ZLIB_LIBS)
|
2017-02-26 23:01:17 -06:00
|
|
|
|
|
|
|
if ENABLE_SSL
|
2017-03-31 04:12:10 -05:00
|
|
|
AM_LDFLAGS += -lssl -lcrypto
|
2017-06-18 13:19:10 -05:00
|
|
|
else
|
|
|
|
loolwsd_fuzzer_LDADD = -lssl -lcrypto
|
|
|
|
loolwsd_LDADD = -lssl -lcrypto
|
|
|
|
loolconfig_LDADD = -lssl -lcrypto
|
2017-02-26 23:01:17 -06:00
|
|
|
endif
|
2015-12-17 11:49:34 -06:00
|
|
|
|
2017-02-07 14:00:23 -06:00
|
|
|
loolwsd_fuzzer_CPPFLAGS = -DKIT_IN_PROCESS=1 -DFUZZER=1 -DTDOC=\"$(abs_top_srcdir)/test/data\" $(AM_CPPFLAGS)
|
2017-02-06 08:59:14 -06:00
|
|
|
|
2017-03-10 05:59:10 -06:00
|
|
|
AM_ETAGSFLAGS = --c++-kinds=+p --fields=+iaS --extra=+q -R --totals=yes --exclude=loleaflet *
|
2016-03-22 13:26:57 -05:00
|
|
|
AM_CTAGSFLAGS = $(AM_ETAGSFLAGS)
|
|
|
|
|
2016-11-24 08:56:06 -06:00
|
|
|
shared_sources = common/FileUtil.cpp \
|
|
|
|
common/Log.cpp \
|
|
|
|
common/Protocol.cpp \
|
2020-02-28 03:50:58 -06:00
|
|
|
common/StringVector.cpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
common/Session.cpp \
|
2017-04-28 05:02:06 -05:00
|
|
|
common/Seccomp.cpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
common/MessageQueue.cpp \
|
2016-11-14 07:58:04 -06:00
|
|
|
common/SigUtil.cpp \
|
2016-11-27 09:38:35 -06:00
|
|
|
common/SpookyV2.cpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
common/Unit.cpp \
|
2017-02-20 12:28:16 -06:00
|
|
|
common/Util.cpp \
|
2018-11-22 05:03:42 -06:00
|
|
|
common/Authorization.cpp \
|
2017-03-23 12:14:51 -05:00
|
|
|
net/DelaySocket.cpp \
|
2017-03-10 03:44:06 -06:00
|
|
|
net/Socket.cpp
|
2017-02-26 23:01:17 -06:00
|
|
|
if ENABLE_SSL
|
|
|
|
shared_sources += net/Ssl.cpp
|
|
|
|
endif
|
2016-11-24 08:56:06 -06:00
|
|
|
|
2020-04-04 15:19:07 -05:00
|
|
|
shared_json = $(patsubst %.cpp,%.cmd,$(shared_sources))
|
|
|
|
|
2017-10-03 14:48:28 -05:00
|
|
|
loolwsd_sources = common/Crypto.cpp \
|
|
|
|
wsd/Admin.cpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
wsd/AdminModel.cpp \
|
|
|
|
wsd/Auth.cpp \
|
|
|
|
wsd/DocumentBroker.cpp \
|
2020-03-04 07:54:04 -06:00
|
|
|
wsd/ProxyProtocol.cpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
wsd/LOOLWSD.cpp \
|
|
|
|
wsd/ClientSession.cpp \
|
|
|
|
wsd/FileServer.cpp \
|
|
|
|
wsd/Storage.cpp \
|
2019-11-07 09:24:37 -06:00
|
|
|
wsd/TileCache.cpp \
|
|
|
|
wsd/ProofKey.cpp
|
2017-02-06 08:59:14 -06:00
|
|
|
|
2020-04-04 15:19:07 -05:00
|
|
|
loolwsd_json = $(patsubst %.cpp,%.cmd,$(loolwsd_sources))
|
|
|
|
|
2017-02-06 08:59:14 -06:00
|
|
|
loolwsd_SOURCES = $(loolwsd_sources) \
|
2016-03-31 02:01:05 -05:00
|
|
|
$(shared_sources)
|
|
|
|
|
2017-02-14 16:57:03 -06:00
|
|
|
noinst_PROGRAMS = clientnb \
|
|
|
|
connect \
|
2016-04-16 14:44:53 -05:00
|
|
|
lokitclient \
|
2018-05-09 05:41:12 -05:00
|
|
|
loolmap \
|
|
|
|
loolstress \
|
2018-05-14 03:50:54 -05:00
|
|
|
loolmount \
|
|
|
|
loolsocketdump
|
2016-03-31 02:01:05 -05:00
|
|
|
|
Add an initial libfuzzer based fuzzer
- target ClientSession::_handleInput(), since crashing there would bring
down the whole loolwsd (not just a kit process), and it deals with
input from untrusted users (browsers)
- add a --enable-fuzzers configure switch to build with
-fsanitize=fuzzer (compared to normal sanitizers build, this is the only
special flag needed)
- configuring other sanitizers is not done automatically, either use
--with-sanitizer=... or the environment variables from LODE's sanitizer
config
- run the actual fuzzer like this:
./clientsession_fuzzer -max_len=16384 fuzzer/data/
- note that at least openSUSE Leap 15.1 sadly ships with a clang with
libfuzzer static libs removed from the package, so you need a
self-built clang to run the fuzzer (either manual build or one from
LODE)
- <https://chromium.googlesource.com/chromium/src/testing/libfuzzer/+/refs/heads/master/efficient_fuzzing.md#execution-speed>
suggests that "You should aim for at least 1,000 exec/s from your fuzz
target locally" (i.e. one run should not take more than 1 ms), so try
this minimal approach first. The alternative would be to start from the
existing loolwsd_fuzzer binary, then step by step cut it down to not
fork(), not do any network traffic, etc -- till it's fast enough that
the fuzzer can find interesting input
- the various configurations start to be really complex (the matrix is
just very large), so try to use Util::isFuzzing() for fuzzer-specific
changes (this is what core.git does as well), and only resort to ifdefs
for the Util::isFuzzing() itself
Change-Id: I72dc1193b34c93eacb5d8e39cef42387d42bd72f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89226
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-21 08:52:20 -06:00
|
|
|
if ENABLE_LIBFUZZER
|
2020-04-01 10:22:23 -05:00
|
|
|
noinst_PROGRAMS += \
|
|
|
|
admin_fuzzer \
|
|
|
|
clientsession_fuzzer
|
Add an initial libfuzzer based fuzzer
- target ClientSession::_handleInput(), since crashing there would bring
down the whole loolwsd (not just a kit process), and it deals with
input from untrusted users (browsers)
- add a --enable-fuzzers configure switch to build with
-fsanitize=fuzzer (compared to normal sanitizers build, this is the only
special flag needed)
- configuring other sanitizers is not done automatically, either use
--with-sanitizer=... or the environment variables from LODE's sanitizer
config
- run the actual fuzzer like this:
./clientsession_fuzzer -max_len=16384 fuzzer/data/
- note that at least openSUSE Leap 15.1 sadly ships with a clang with
libfuzzer static libs removed from the package, so you need a
self-built clang to run the fuzzer (either manual build or one from
LODE)
- <https://chromium.googlesource.com/chromium/src/testing/libfuzzer/+/refs/heads/master/efficient_fuzzing.md#execution-speed>
suggests that "You should aim for at least 1,000 exec/s from your fuzz
target locally" (i.e. one run should not take more than 1 ms), so try
this minimal approach first. The alternative would be to start from the
existing loolwsd_fuzzer binary, then step by step cut it down to not
fork(), not do any network traffic, etc -- till it's fast enough that
the fuzzer can find interesting input
- the various configurations start to be really complex (the matrix is
just very large), so try to use Util::isFuzzing() for fuzzer-specific
changes (this is what core.git does as well), and only resort to ifdefs
for the Util::isFuzzing() itself
Change-Id: I72dc1193b34c93eacb5d8e39cef42387d42bd72f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89226
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-21 08:52:20 -06:00
|
|
|
else
|
|
|
|
noinst_PROGRAMS += loolwsd_fuzzer
|
|
|
|
endif
|
|
|
|
|
2016-11-24 08:56:06 -06:00
|
|
|
connect_SOURCES = tools/Connect.cpp \
|
|
|
|
common/Log.cpp \
|
|
|
|
common/Protocol.cpp \
|
2020-02-28 03:50:58 -06:00
|
|
|
common/StringVector.cpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
common/Util.cpp
|
2016-03-31 02:01:05 -05:00
|
|
|
|
2020-04-10 06:45:14 -05:00
|
|
|
lokitclient_SOURCES = common/Log.cpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
tools/KitClient.cpp \
|
|
|
|
common/Protocol.cpp \
|
2020-02-28 03:50:58 -06:00
|
|
|
common/StringVector.cpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
common/Util.cpp
|
2016-03-31 02:01:05 -05:00
|
|
|
|
2017-02-06 08:59:14 -06:00
|
|
|
loolforkit_sources = kit/ChildSession.cpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
kit/ForKit.cpp \
|
2017-02-06 08:59:14 -06:00
|
|
|
kit/Kit.cpp
|
|
|
|
|
2020-04-04 15:19:07 -05:00
|
|
|
loolforkit_json = $(patsubst %.cpp,%.cmd,$(loolforkit_sources))
|
|
|
|
|
2017-02-06 08:59:14 -06:00
|
|
|
loolforkit_SOURCES = $(loolforkit_sources) \
|
2016-04-05 08:32:10 -05:00
|
|
|
$(shared_sources)
|
2015-12-19 16:20:04 -06:00
|
|
|
|
2017-02-06 08:59:14 -06:00
|
|
|
loolwsd_fuzzer_SOURCES = $(loolwsd_sources) \
|
|
|
|
$(loolforkit_sources) \
|
2017-02-08 04:24:19 -06:00
|
|
|
$(shared_sources) \
|
|
|
|
kit/DummyLibreOfficeKit.cpp
|
2017-02-06 08:59:14 -06:00
|
|
|
|
2020-04-01 10:22:23 -05:00
|
|
|
admin_fuzzer_CPPFLAGS = \
|
|
|
|
-DKIT_IN_PROCESS=1 \
|
|
|
|
$(AM_CPPFLAGS)
|
|
|
|
admin_fuzzer_SOURCES = \
|
|
|
|
$(loolwsd_sources) \
|
|
|
|
$(loolforkit_sources) \
|
|
|
|
$(shared_sources) \
|
|
|
|
fuzzer/Admin.cpp
|
|
|
|
admin_fuzzer_LDFLAGS = -fsanitize=fuzzer $(AM_LDFLAGS)
|
|
|
|
|
Add an initial libfuzzer based fuzzer
- target ClientSession::_handleInput(), since crashing there would bring
down the whole loolwsd (not just a kit process), and it deals with
input from untrusted users (browsers)
- add a --enable-fuzzers configure switch to build with
-fsanitize=fuzzer (compared to normal sanitizers build, this is the only
special flag needed)
- configuring other sanitizers is not done automatically, either use
--with-sanitizer=... or the environment variables from LODE's sanitizer
config
- run the actual fuzzer like this:
./clientsession_fuzzer -max_len=16384 fuzzer/data/
- note that at least openSUSE Leap 15.1 sadly ships with a clang with
libfuzzer static libs removed from the package, so you need a
self-built clang to run the fuzzer (either manual build or one from
LODE)
- <https://chromium.googlesource.com/chromium/src/testing/libfuzzer/+/refs/heads/master/efficient_fuzzing.md#execution-speed>
suggests that "You should aim for at least 1,000 exec/s from your fuzz
target locally" (i.e. one run should not take more than 1 ms), so try
this minimal approach first. The alternative would be to start from the
existing loolwsd_fuzzer binary, then step by step cut it down to not
fork(), not do any network traffic, etc -- till it's fast enough that
the fuzzer can find interesting input
- the various configurations start to be really complex (the matrix is
just very large), so try to use Util::isFuzzing() for fuzzer-specific
changes (this is what core.git does as well), and only resort to ifdefs
for the Util::isFuzzing() itself
Change-Id: I72dc1193b34c93eacb5d8e39cef42387d42bd72f
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/89226
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-21 08:52:20 -06:00
|
|
|
clientsession_fuzzer_CPPFLAGS = \
|
|
|
|
-DKIT_IN_PROCESS=1 \
|
|
|
|
$(AM_CPPFLAGS)
|
|
|
|
clientsession_fuzzer_SOURCES = \
|
|
|
|
$(loolwsd_sources) \
|
|
|
|
$(loolforkit_sources) \
|
|
|
|
$(shared_sources) \
|
|
|
|
fuzzer/ClientSession.cpp
|
|
|
|
clientsession_fuzzer_LDFLAGS = -fsanitize=fuzzer $(AM_LDFLAGS)
|
|
|
|
|
2017-02-19 11:06:45 -06:00
|
|
|
clientnb_SOURCES = net/clientnb.cpp \
|
|
|
|
common/Log.cpp \
|
2020-02-28 03:50:58 -06:00
|
|
|
common/StringVector.cpp \
|
2017-02-19 11:06:45 -06:00
|
|
|
common/Util.cpp
|
2017-02-14 16:57:03 -06:00
|
|
|
|
2016-11-24 08:56:06 -06:00
|
|
|
loolmount_SOURCES = tools/mount.cpp
|
|
|
|
|
|
|
|
loolmap_SOURCES = tools/map.cpp
|
|
|
|
|
2018-05-09 05:05:06 -05:00
|
|
|
loolconvert_SOURCES = tools/Tool.cpp
|
2016-11-24 08:56:06 -06:00
|
|
|
|
|
|
|
loolstress_CPPFLAGS = -DTDOC=\"$(abs_top_srcdir)/test/data\" ${include_paths}
|
|
|
|
loolstress_SOURCES = tools/Stress.cpp \
|
|
|
|
common/Protocol.cpp \
|
2020-02-28 03:50:58 -06:00
|
|
|
common/StringVector.cpp \
|
2017-03-30 12:14:40 -05:00
|
|
|
common/Log.cpp \
|
|
|
|
common/Util.cpp
|
2016-11-24 08:56:06 -06:00
|
|
|
|
2017-07-21 09:33:19 -05:00
|
|
|
loolconfig_SOURCES = tools/Config.cpp \
|
|
|
|
common/Crypto.cpp \
|
|
|
|
common/Log.cpp \
|
2020-02-28 03:50:58 -06:00
|
|
|
common/StringVector.cpp \
|
2017-07-21 09:33:19 -05:00
|
|
|
common/Util.cpp
|
2017-05-24 03:52:24 -05:00
|
|
|
|
2018-04-17 08:01:49 -05:00
|
|
|
loolsocketdump_SOURCES = tools/WebSocketDump.cpp \
|
|
|
|
$(shared_sources)
|
|
|
|
|
2016-11-24 08:56:06 -06:00
|
|
|
wsd_headers = wsd/Admin.hpp \
|
|
|
|
wsd/AdminModel.hpp \
|
|
|
|
wsd/Auth.hpp \
|
|
|
|
wsd/ClientSession.hpp \
|
|
|
|
wsd/DocumentBroker.hpp \
|
2020-03-04 07:54:04 -06:00
|
|
|
wsd/ProxyProtocol.hpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
wsd/Exceptions.hpp \
|
|
|
|
wsd/FileServer.hpp \
|
|
|
|
wsd/LOOLWSD.hpp \
|
2019-11-21 14:39:01 -06:00
|
|
|
wsd/ProofKey.hpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
wsd/QueueHandler.hpp \
|
2016-12-11 11:03:38 -06:00
|
|
|
wsd/SenderQueue.hpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
wsd/Storage.hpp \
|
|
|
|
wsd/TileCache.hpp \
|
|
|
|
wsd/TileDesc.hpp \
|
|
|
|
wsd/TraceFile.hpp \
|
|
|
|
wsd/UserMessages.hpp
|
|
|
|
|
|
|
|
shared_headers = common/Common.hpp \
|
2019-06-22 11:45:36 -05:00
|
|
|
common/Clipboard.hpp \
|
2017-10-03 14:48:28 -05:00
|
|
|
common/Crypto.hpp \
|
2018-03-07 05:18:57 -06:00
|
|
|
common/JsonUtil.hpp \
|
2016-11-25 05:58:13 -06:00
|
|
|
common/FileUtil.hpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
common/Log.hpp \
|
2017-03-20 13:07:01 -05:00
|
|
|
common/LOOLWebSocket.hpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
common/Protocol.hpp \
|
2020-02-28 03:50:58 -06:00
|
|
|
common/StringVector.hpp \
|
2017-04-28 05:02:06 -05:00
|
|
|
common/Seccomp.hpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
common/Session.hpp \
|
|
|
|
common/Unit.hpp \
|
|
|
|
common/UnitHTTP.hpp \
|
|
|
|
common/Util.hpp \
|
2018-11-22 05:03:42 -06:00
|
|
|
common/Authorization.hpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
common/MessageQueue.hpp \
|
2017-02-20 12:28:16 -06:00
|
|
|
common/Message.hpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
common/Png.hpp \
|
|
|
|
common/Rectangle.hpp \
|
2016-11-25 05:55:52 -06:00
|
|
|
common/SigUtil.hpp \
|
2016-12-06 07:47:48 -06:00
|
|
|
common/security.h \
|
2017-02-26 23:01:17 -06:00
|
|
|
common/SpookyV2.h \
|
2017-03-23 12:14:51 -05:00
|
|
|
net/DelaySocket.hpp \
|
2018-11-21 13:41:13 -06:00
|
|
|
net/FakeSocket.hpp \
|
2017-03-14 09:40:16 -05:00
|
|
|
net/ServerSocket.hpp \
|
2017-02-26 23:01:17 -06:00
|
|
|
net/Socket.hpp \
|
2017-03-10 03:44:06 -06:00
|
|
|
net/WebSocketHandler.hpp \
|
|
|
|
tools/Replay.hpp
|
2017-02-26 23:01:17 -06:00
|
|
|
if ENABLE_SSL
|
|
|
|
shared_headers += net/Ssl.hpp \
|
|
|
|
net/SslSocket.hpp
|
|
|
|
endif
|
2016-11-24 08:56:06 -06:00
|
|
|
|
|
|
|
kit_headers = kit/ChildSession.hpp \
|
2017-11-27 18:33:46 -06:00
|
|
|
kit/Delta.hpp \
|
2017-02-08 04:24:19 -06:00
|
|
|
kit/DummyLibreOfficeKit.hpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
kit/Kit.hpp \
|
2019-10-18 14:15:54 -05:00
|
|
|
kit/KitHelper.hpp \
|
|
|
|
kit/Watermark.hpp
|
2016-11-24 08:56:06 -06:00
|
|
|
|
|
|
|
noinst_HEADERS = $(wsd_headers) $(shared_headers) $(kit_headers) \
|
2017-09-27 08:55:44 -05:00
|
|
|
test/WopiTestServer.hpp \
|
2016-05-09 05:25:42 -05:00
|
|
|
test/countloolkits.hpp \
|
2020-03-16 06:37:43 -05:00
|
|
|
test/lokassert.hpp \
|
2017-06-06 05:14:43 -05:00
|
|
|
test/test.hpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
test/helpers.hpp
|
2016-03-31 02:01:05 -05:00
|
|
|
|
2017-04-28 04:54:18 -05:00
|
|
|
dist-hook:
|
|
|
|
git log -1 --format=%h > $(distdir)/dist_git_hash 2> /dev/null || rm $(distdir)/dist_git_hash
|
2019-12-03 08:14:57 -06:00
|
|
|
mkdir -p $(distdir)/bundled/include/LibreOfficeKit/
|
|
|
|
cp @LOKIT_PATH@/LibreOfficeKit/LibreOfficeKit.h \
|
|
|
|
@LOKIT_PATH@/LibreOfficeKit/LibreOfficeKit.hxx \
|
|
|
|
@LOKIT_PATH@/LibreOfficeKit/LibreOfficeKitEnums.h \
|
|
|
|
@LOKIT_PATH@/LibreOfficeKit/LibreOfficeKitInit.h \
|
|
|
|
@LOKIT_PATH@/LibreOfficeKit/LibreOfficeKitTypes.h \
|
|
|
|
$(distdir)/bundled/include/LibreOfficeKit/
|
2017-04-28 04:54:18 -05:00
|
|
|
|
2016-03-31 02:01:05 -05:00
|
|
|
EXTRA_DIST = discovery.xml \
|
2016-08-26 05:57:33 -05:00
|
|
|
favicon.ico \
|
2017-03-14 10:04:10 -05:00
|
|
|
loolkitconfig.xcu \
|
2019-09-12 11:33:22 -05:00
|
|
|
loolwsd.init.rhel6 \
|
2017-03-20 13:45:06 -05:00
|
|
|
loolwsd.spec \
|
2016-04-14 08:06:49 -05:00
|
|
|
loolwsd.xml.in \
|
2016-03-31 02:01:05 -05:00
|
|
|
loolwsd.service \
|
2016-04-14 07:50:48 -05:00
|
|
|
sysconfig.loolwsd \
|
2017-03-20 17:22:26 -05:00
|
|
|
debian/compat \
|
|
|
|
debian/copyright \
|
|
|
|
debian/loolwsd.cron.d \
|
|
|
|
debian/loolwsd.preinst \
|
2017-04-05 08:30:47 -05:00
|
|
|
debian/loolwsd.service \
|
2017-03-20 17:22:26 -05:00
|
|
|
debian/rules \
|
|
|
|
debian/source/format \
|
|
|
|
debian/changelog \
|
|
|
|
debian/control \
|
|
|
|
debian/loolwsd.postinst \
|
2019-11-26 15:56:58 -06:00
|
|
|
debian/loolwsd.postrm \
|
2016-04-14 07:50:48 -05:00
|
|
|
etc/key.pem \
|
|
|
|
etc/cert.pem \
|
2017-12-19 01:35:32 -06:00
|
|
|
etc/ca-chain.cert.pem \
|
2018-10-27 07:46:59 -05:00
|
|
|
etc/apache2/loolwsd.conf \
|
|
|
|
etc/nginx/loolwsd.conf \
|
2018-05-14 03:49:46 -05:00
|
|
|
scripts/unocommands.py \
|
|
|
|
$(man_MANS)
|
2015-06-09 14:33:46 -05:00
|
|
|
|
2016-04-11 12:21:16 -05:00
|
|
|
if HAVE_LO_PATH
|
|
|
|
|
2016-04-12 01:29:57 -05:00
|
|
|
SYSTEM_STAMP = @SYSTEMPLATE_PATH@/system_stamp
|
2020-03-04 07:09:47 -06:00
|
|
|
CAPABILITIES = $(if @ENABLE_SETCAP@,true,false)
|
2020-03-05 08:44:25 -06:00
|
|
|
RUN_GDB = $(if $(GDB_FRONTEND),$(GDB_FRONTEND),gdb --tui --args)
|
2016-04-12 01:29:57 -05:00
|
|
|
|
2016-04-15 08:23:44 -05:00
|
|
|
$(SYSTEM_STAMP) : ${top_srcdir}/loolwsd-systemplate-setup
|
2016-04-11 12:21:16 -05:00
|
|
|
if test "z@SYSTEMPLATE_PATH@" != "z"; then rm -rf "@SYSTEMPLATE_PATH@"; fi
|
|
|
|
${top_srcdir}/loolwsd-systemplate-setup "@SYSTEMPLATE_PATH@" "@LO_PATH@" && touch $@
|
|
|
|
|
|
|
|
@JAILS_PATH@ :
|
|
|
|
mkdir -p $@
|
|
|
|
|
|
|
|
clean-local:
|
|
|
|
if test "z@JAILS_PATH@" != "z"; then rm -rf "@JAILS_PATH@"; fi
|
|
|
|
if test "z@SYSTEMPLATE_PATH@" != "z"; then rm -rf "@SYSTEMPLATE_PATH@"; fi
|
2020-04-04 15:19:07 -05:00
|
|
|
rm -f $(abs_srcdir)/compile_commands.json
|
2016-04-11 12:21:16 -05:00
|
|
|
|
2019-05-29 01:52:01 -05:00
|
|
|
run: all @JAILS_PATH@
|
2016-07-18 06:45:36 -05:00
|
|
|
@echo "Launching loolwsd"
|
2017-04-05 08:38:33 -05:00
|
|
|
@fc-cache "@LO_PATH@"/share/fonts/truetype
|
2016-04-14 04:36:18 -05:00
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt
|
2018-11-01 05:29:23 -05:00
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.ods $(abs_top_srcdir)/test/data/hello-world.ods
|
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.odp $(abs_top_srcdir)/test/data/hello-world.odp
|
2016-04-13 11:31:10 -05:00
|
|
|
@echo
|
2019-10-01 03:35:38 -05:00
|
|
|
./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" \
|
2020-03-04 07:09:47 -06:00
|
|
|
--o:security.capabilities="$(CAPABILITIES)" \
|
2016-06-25 19:10:48 -05:00
|
|
|
--o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \
|
2017-02-28 15:53:24 -06:00
|
|
|
--o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \
|
|
|
|
--o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \
|
|
|
|
--o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \
|
2017-04-03 20:05:36 -05:00
|
|
|
--o:admin_console.username=admin --o:admin_console.password=admin \
|
2017-04-04 12:21:26 -05:00
|
|
|
--o:logging.file[@enable]=true --o:logging.level=trace
|
2016-05-12 06:24:38 -05:00
|
|
|
|
2020-03-04 13:38:17 -06:00
|
|
|
if ENABLE_DEBUG
|
|
|
|
run-one: all @JAILS_PATH@
|
|
|
|
@echo "Launching loolwsd"
|
|
|
|
@fc-cache "@LO_PATH@"/share/fonts/truetype
|
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt
|
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.ods $(abs_top_srcdir)/test/data/hello-world.ods
|
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.odp $(abs_top_srcdir)/test/data/hello-world.odp
|
|
|
|
@echo
|
|
|
|
./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" \
|
|
|
|
--o:security.capabilities="$(CAPABILITIES)" \
|
|
|
|
--o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \
|
|
|
|
--o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \
|
|
|
|
--o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \
|
|
|
|
--o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \
|
|
|
|
--o:admin_console.username=admin --o:admin_console.password=admin \
|
|
|
|
--o:logging.file[@enable]=true --o:logging.level=trace \
|
|
|
|
--singlekit
|
|
|
|
endif
|
|
|
|
|
2019-02-12 04:47:24 -06:00
|
|
|
sync-writer:
|
|
|
|
browser-sync start --config browsersync-config.js --startPath "loleaflet/96c23f663/loleaflet.html?file_path=file://$(abs_top_srcdir)/test/data/hello-world.odt"
|
|
|
|
|
|
|
|
sync-calc:
|
|
|
|
browser-sync start --config browsersync-config.js --startPath "loleaflet/96c23f663/loleaflet.html?file_path=file://$(abs_top_srcdir)/test/data/hello-world.ods"
|
|
|
|
|
|
|
|
sync-impress:
|
|
|
|
browser-sync start --config browsersync-config.js --startPath "loleaflet/96c23f663/loleaflet.html?file_path=file://$(abs_top_srcdir)/test/data/hello-world.odp"
|
|
|
|
|
2019-02-15 13:22:41 -06:00
|
|
|
run-valgrind: all @JAILS_PATH@
|
2016-05-12 06:24:38 -05:00
|
|
|
@echo "Launching loolwsd under valgrind (but not forkit/loolkit, yet)"
|
2017-04-05 08:38:33 -05:00
|
|
|
@fc-cache "@LO_PATH@"/share/fonts/truetype
|
2017-04-03 20:05:36 -05:00
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt
|
2018-11-01 05:29:23 -05:00
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.ods $(abs_top_srcdir)/test/data/hello-world.ods
|
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.odp $(abs_top_srcdir)/test/data/hello-world.odp
|
2016-05-12 06:24:38 -05:00
|
|
|
valgrind --tool=memcheck --trace-children=no -v --read-var-info=yes \
|
2019-10-01 03:35:38 -05:00
|
|
|
./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" \
|
2016-06-27 02:45:29 -05:00
|
|
|
--o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \
|
2017-02-28 15:53:24 -06:00
|
|
|
--o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \
|
|
|
|
--o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \
|
|
|
|
--o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \
|
2017-04-03 20:05:36 -05:00
|
|
|
--o:admin_console.username=admin --o:admin_console.password=admin \
|
|
|
|
--o:logging.file[@enable]=false --o:logging.level=trace
|
2016-09-30 16:53:48 -05:00
|
|
|
|
2019-02-15 13:22:41 -06:00
|
|
|
run-gdb: all @JAILS_PATH@
|
2019-04-08 08:49:55 -05:00
|
|
|
@echo "Launching loolwsd under gdb"
|
2018-04-25 06:46:48 -05:00
|
|
|
@fc-cache "@LO_PATH@"/share/fonts/truetype
|
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt
|
2018-11-01 05:29:23 -05:00
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.ods $(abs_top_srcdir)/test/data/hello-world.ods
|
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.odp $(abs_top_srcdir)/test/data/hello-world.odp
|
2020-03-05 08:44:25 -06:00
|
|
|
$(RUN_GDB) \
|
2018-08-01 12:20:05 -05:00
|
|
|
./loolwsd --o:security.capabilities="false" \
|
2019-10-01 03:35:38 -05:00
|
|
|
--o:sys_template_path="@SYSTEMPLATE_PATH@" \
|
2018-04-25 06:46:48 -05:00
|
|
|
--o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \
|
|
|
|
--o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \
|
|
|
|
--o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \
|
|
|
|
--o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \
|
|
|
|
--o:admin_console.username=admin --o:admin_console.password=admin \
|
|
|
|
--o:logging.file[@enable]=false --o:logging.level=error
|
|
|
|
|
2019-02-15 13:22:41 -06:00
|
|
|
run-callgrind: all @JAILS_PATH@
|
2017-04-06 03:25:19 -05:00
|
|
|
@echo "Launching loolwsd under valgrind's callgrind"
|
2017-04-05 08:38:33 -05:00
|
|
|
@fc-cache "@LO_PATH@"/share/fonts/truetype
|
2017-04-03 20:05:36 -05:00
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt
|
2018-11-01 05:29:23 -05:00
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.ods $(abs_top_srcdir)/test/data/hello-world.ods
|
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.odp $(abs_top_srcdir)/test/data/hello-world.odp
|
2017-04-05 13:20:47 -05:00
|
|
|
valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes --num-callers=50 --error-limit=no --trace-children=yes \
|
2018-08-01 12:20:05 -05:00
|
|
|
./loolwsd --o:security.capabilities="false" \
|
2019-10-01 03:35:38 -05:00
|
|
|
--o:sys_template_path="@SYSTEMPLATE_PATH@" \
|
2016-09-30 16:53:48 -05:00
|
|
|
--o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \
|
2017-02-28 15:53:24 -06:00
|
|
|
--o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \
|
|
|
|
--o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \
|
|
|
|
--o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \
|
2017-04-03 20:05:36 -05:00
|
|
|
--o:admin_console.username=admin --o:admin_console.password=admin \
|
2017-04-04 12:21:26 -05:00
|
|
|
--o:logging.file[@enable]=false --o:logging.level=error
|
2018-01-26 13:27:51 -06:00
|
|
|
|
2019-02-15 13:22:41 -06:00
|
|
|
run-strace: all @JAILS_PATH@
|
2018-01-26 13:27:51 -06:00
|
|
|
@echo "Launching loolwsd under strace"
|
|
|
|
@fc-cache "@LO_PATH@"/share/fonts/truetype
|
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt
|
2018-11-01 05:29:23 -05:00
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.ods $(abs_top_srcdir)/test/data/hello-world.ods
|
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.odp $(abs_top_srcdir)/test/data/hello-world.odp
|
2018-01-26 13:27:51 -06:00
|
|
|
strace -o strace.log -f -tt -s 256 \
|
2018-08-01 12:20:05 -05:00
|
|
|
./loolwsd --o:security.capabilities="false" \
|
2019-10-01 03:35:38 -05:00
|
|
|
--o:sys_template_path="@SYSTEMPLATE_PATH@" \
|
2018-01-26 13:27:51 -06:00
|
|
|
--o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \
|
|
|
|
--o:ssl.cert_file_path="$(abs_top_srcdir)/etc/cert.pem" \
|
|
|
|
--o:ssl.key_file_path="$(abs_top_srcdir)/etc/key.pem" \
|
|
|
|
--o:ssl.ca_file_path="$(abs_top_srcdir)/etc/ca-chain.cert.pem" \
|
|
|
|
--o:admin_console.username=admin --o:admin_console.password=admin \
|
|
|
|
--o:logging.file[@enable]=false --o:logging.level=error
|
|
|
|
|
2016-04-12 01:29:57 -05:00
|
|
|
else
|
|
|
|
|
|
|
|
SYSTEM_STAMP =
|
|
|
|
|
2016-04-11 12:21:16 -05:00
|
|
|
endif
|
|
|
|
|
2016-04-05 08:37:10 -05:00
|
|
|
# After building loolforkit, set its capabilities as required. Do it
|
2016-04-04 00:26:05 -05:00
|
|
|
# already after a plain 'make' to allow for testing without
|
|
|
|
# installing. When building for packaging, no need for this, as the
|
|
|
|
# capabilities won't survive packaging anyway. Instead, handle it when
|
|
|
|
# installing the RPM or Debian package.
|
2016-03-07 05:08:02 -06:00
|
|
|
|
2019-02-15 13:22:41 -06:00
|
|
|
all-local: loolforkit loolmount @JAILS_PATH@ $(SYSTEM_STAMP)
|
2018-02-01 07:49:44 -06:00
|
|
|
if ENABLE_SETCAP
|
|
|
|
sudo @SETCAP@ cap_fowner,cap_mknod,cap_sys_chroot=ep loolforkit
|
|
|
|
sudo @SETCAP@ cap_sys_admin=ep loolmount
|
|
|
|
else
|
|
|
|
echo "Skipping capability setting"
|
|
|
|
endif
|
2016-09-30 03:43:04 -05:00
|
|
|
|
|
|
|
# just run the build without any tests
|
|
|
|
build-nocheck: all-am
|
2018-08-31 05:24:17 -05:00
|
|
|
|
|
|
|
endif
|
2020-04-04 15:19:07 -05:00
|
|
|
|
|
|
|
define file_target
|
|
|
|
$(1): $(2)
|
|
|
|
|
|
|
|
endef
|
|
|
|
|
|
|
|
define file_targets
|
|
|
|
$(foreach file,$(1),$(call file_target,$(file),$(patsubst %.cmd,%.cpp,$(file))))
|
|
|
|
endef
|
|
|
|
|
|
|
|
CLANGXX_COMPILE_FLAGS=clang++ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
|
|
|
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
|
|
|
|
|
|
|
|
JSON_COMPILE_FLAGS=$(subst ",\",$(subst \,\\,$(CLANGXX_COMPILE_FLAGS)))
|
|
|
|
|
|
|
|
JSON_COMPILE_SRC = $(loolwsd_json) $(loolforkit_json) $(shared_json)
|
|
|
|
|
|
|
|
$(eval $(call file_targets,$(JSON_COMPILE_SRC)))
|
|
|
|
|
|
|
|
.cpp.cmd:
|
|
|
|
@echo -n "{\"directory\":\"$(abs_builddir)\",\"command\":\"" > $@
|
|
|
|
@echo -n $(JSON_COMPILE_FLAGS) >> $@
|
|
|
|
@echo -n "\",\"file\":\"$<\"}" >> $@
|
|
|
|
|
|
|
|
$(abs_srcdir)/compile_commands.json: $(JSON_COMPILE_SRC)
|
|
|
|
@echo -n "[" > $@
|
|
|
|
@for file in $(JSON_COMPILE_SRC) ; \
|
|
|
|
do \
|
|
|
|
cat $$file; \
|
|
|
|
echo ","; \
|
|
|
|
rm -f $$file; \
|
|
|
|
done >> $@
|
|
|
|
@echo -n "]" >> $@
|
|
|
|
|
|
|
|
compile_commands: $(abs_srcdir)/compile_commands.json
|