2016-04-07 16:12:23 -05:00
|
|
|
SUBDIRS = . test
|
2015-10-21 05:01:47 -05:00
|
|
|
|
2016-04-15 08:23:44 -05:00
|
|
|
export ENABLE_DEBUG
|
|
|
|
|
2016-07-31 10:18:03 -05:00
|
|
|
bin_PROGRAMS = loolwsd loolforkit loolmap loolmount looltool loolstress
|
2015-03-09 04:11:15 -05:00
|
|
|
|
2016-04-14 07:43:13 -05:00
|
|
|
dist_bin_SCRIPTS = loolwsd-systemplate-setup
|
|
|
|
|
|
|
|
loolwsddatadir = @LOOLWSD_DATADIR@
|
|
|
|
|
2016-05-30 10:40:40 -05:00
|
|
|
loolwsddata_DATA = discovery.xml \
|
2016-08-26 05:57:33 -05:00
|
|
|
favicon.ico \
|
2016-05-30 10:40:40 -05:00
|
|
|
robots.txt
|
2015-05-19 05:20:16 -05:00
|
|
|
|
2016-04-14 08:06:49 -05:00
|
|
|
loolwsdconfigdir = @LOOLWSD_CONFIGDIR@
|
|
|
|
|
2016-04-19 04:42:41 -05:00
|
|
|
loolwsdconfig_DATA = loolwsd.xml \
|
|
|
|
etc/key.pem
|
2016-04-14 08:06:49 -05:00
|
|
|
|
2016-04-14 11:47:35 -05:00
|
|
|
if ENABLE_SSL
|
2016-04-19 04:42:41 -05:00
|
|
|
loolwsdconfig_DATA += etc/cert.pem \
|
2016-04-14 11:47:35 -05:00
|
|
|
etc/ca-chain.cert.pem
|
|
|
|
endif
|
|
|
|
|
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.
|
|
|
|
include_paths = -I${top_srcdir}/common -I${top_srcdir}/wsd -I${top_srcdir}/kit
|
|
|
|
|
|
|
|
AM_CPPFLAGS = -pthread -DLOOLWSD_DATADIR='"@LOOLWSD_DATADIR@"' -DLOOLWSD_CONFIGDIR='"@LOOLWSD_CONFIGDIR@"' ${include_paths}
|
2016-04-05 11:41:10 -05:00
|
|
|
AM_LDFLAGS = -pthread -Wl,-E
|
2015-12-17 11:49:34 -06:00
|
|
|
|
2016-03-22 13:26:57 -05:00
|
|
|
AM_ETAGSFLAGS = --c++-kinds=+p --fields=+iaS --extra=+q -R --totals=yes *
|
|
|
|
AM_CTAGSFLAGS = $(AM_ETAGSFLAGS)
|
|
|
|
|
2016-11-24 08:56:06 -06:00
|
|
|
shared_sources = common/FileUtil.cpp \
|
|
|
|
common/IoUtil.cpp \
|
|
|
|
common/Log.cpp \
|
|
|
|
common/Protocol.cpp \
|
|
|
|
common/Session.cpp \
|
|
|
|
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 \
|
|
|
|
common/UnitHTTP.cpp \
|
|
|
|
common/Util.cpp
|
|
|
|
|
|
|
|
loolwsd_SOURCES = wsd/Admin.cpp \
|
|
|
|
wsd/AdminModel.cpp \
|
|
|
|
wsd/Auth.cpp \
|
|
|
|
wsd/DocumentBroker.cpp \
|
|
|
|
wsd/LOOLWSD.cpp \
|
|
|
|
wsd/ClientSession.cpp \
|
|
|
|
wsd/FileServer.cpp \
|
|
|
|
wsd/PrisonerSession.cpp \
|
|
|
|
wsd/Storage.cpp \
|
|
|
|
wsd/TileCache.cpp \
|
2016-03-31 02:01:05 -05:00
|
|
|
$(shared_sources)
|
|
|
|
|
|
|
|
noinst_PROGRAMS = connect \
|
2016-04-16 14:44:53 -05:00
|
|
|
lokitclient \
|
2016-04-28 16:02:45 -05:00
|
|
|
loolforkit-nocaps
|
2016-03-31 02:01:05 -05:00
|
|
|
|
2016-11-24 08:56:06 -06:00
|
|
|
connect_SOURCES = tools/Connect.cpp \
|
|
|
|
common/Log.cpp \
|
|
|
|
common/Protocol.cpp \
|
|
|
|
common/Util.cpp
|
2016-03-31 02:01:05 -05:00
|
|
|
|
2016-11-24 08:56:06 -06:00
|
|
|
lokitclient_SOURCES = common/IoUtil.cpp \
|
|
|
|
common/Log.cpp \
|
|
|
|
tools/KitClient.cpp \
|
|
|
|
common/Protocol.cpp \
|
|
|
|
common/Util.cpp
|
2016-03-31 02:01:05 -05:00
|
|
|
|
2016-11-24 08:56:06 -06:00
|
|
|
loolforkit_SOURCES = kit/ChildSession.cpp \
|
|
|
|
kit/ForKit.cpp \
|
|
|
|
kit/Kit.cpp \
|
2016-04-05 08:32:10 -05:00
|
|
|
$(shared_sources)
|
2015-12-19 16:20:04 -06:00
|
|
|
|
2016-04-16 14:44:53 -05:00
|
|
|
# build a binary with no caps to help debugging
|
|
|
|
loolforkit_nocaps_SOURCES = $(loolforkit_SOURCES)
|
|
|
|
|
2016-11-24 08:56:06 -06:00
|
|
|
loolmount_SOURCES = tools/mount.cpp
|
|
|
|
|
|
|
|
loolmap_SOURCES = tools/map.cpp
|
|
|
|
|
|
|
|
looltool_SOURCES = tools/Tool.cpp
|
|
|
|
|
|
|
|
loolstress_CPPFLAGS = -DTDOC=\"$(abs_top_srcdir)/test/data\" ${include_paths}
|
|
|
|
loolstress_SOURCES = tools/Stress.cpp \
|
|
|
|
common/Protocol.cpp \
|
|
|
|
common/Log.cpp
|
|
|
|
|
|
|
|
wsd_headers = wsd/Admin.hpp \
|
|
|
|
wsd/AdminModel.hpp \
|
|
|
|
wsd/Auth.hpp \
|
|
|
|
wsd/ClientSession.hpp \
|
|
|
|
wsd/DocumentBroker.hpp \
|
|
|
|
wsd/Exceptions.hpp \
|
|
|
|
wsd/FileServer.hpp \
|
|
|
|
wsd/LOOLWebSocket.hpp \
|
|
|
|
wsd/LOOLWSD.hpp \
|
|
|
|
wsd/PrisonerSession.hpp \
|
|
|
|
wsd/QueueHandler.hpp \
|
|
|
|
wsd/Storage.hpp \
|
|
|
|
wsd/TileCache.hpp \
|
|
|
|
wsd/TileDesc.hpp \
|
|
|
|
wsd/TraceFile.hpp \
|
|
|
|
wsd/UserMessages.hpp
|
|
|
|
|
|
|
|
shared_headers = common/Common.hpp \
|
|
|
|
common/IoUtil.hpp \
|
2016-11-25 05:58:13 -06:00
|
|
|
common/FileUtil.hpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
common/Log.hpp \
|
|
|
|
common/Protocol.hpp \
|
|
|
|
common/Session.hpp \
|
|
|
|
common/Unit.hpp \
|
|
|
|
common/UnitHTTP.hpp \
|
|
|
|
common/Util.hpp \
|
|
|
|
common/MessageQueue.hpp \
|
|
|
|
common/Png.hpp \
|
|
|
|
common/Rectangle.hpp \
|
2016-11-25 05:55:52 -06:00
|
|
|
common/SigUtil.hpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
common/security.h
|
|
|
|
|
|
|
|
kit_headers = kit/ChildSession.hpp \
|
|
|
|
kit/Kit.hpp \
|
|
|
|
kit/KitHelper.hpp
|
|
|
|
|
|
|
|
noinst_HEADERS = $(wsd_headers) $(shared_headers) $(kit_headers) \
|
2016-03-31 02:01:05 -05:00
|
|
|
bundled/include/LibreOfficeKit/LibreOfficeKit.h \
|
2016-11-23 01:20:55 -06:00
|
|
|
bundled/include/LibreOfficeKit/LibreOfficeKit.hxx \
|
2016-03-31 02:01:05 -05:00
|
|
|
bundled/include/LibreOfficeKit/LibreOfficeKitEnums.h \
|
|
|
|
bundled/include/LibreOfficeKit/LibreOfficeKitInit.h \
|
2016-04-14 05:35:50 -05:00
|
|
|
bundled/include/LibreOfficeKit/LibreOfficeKitTypes.h \
|
2016-05-09 05:25:42 -05:00
|
|
|
test/countloolkits.hpp \
|
2016-11-24 08:56:06 -06:00
|
|
|
test/helpers.hpp
|
2016-03-31 02:01:05 -05:00
|
|
|
|
|
|
|
EXTRA_DIST = discovery.xml \
|
2016-08-26 05:57:33 -05:00
|
|
|
favicon.ico \
|
2016-04-14 08:06:49 -05:00
|
|
|
loolwsd.xml.in \
|
2016-03-31 02:01:05 -05:00
|
|
|
loolwsd.service \
|
2016-05-30 10:40:40 -05:00
|
|
|
robots.txt \
|
2016-04-14 07:50:48 -05:00
|
|
|
sysconfig.loolwsd \
|
|
|
|
etc/key.pem \
|
|
|
|
etc/cert.pem \
|
|
|
|
etc/ca-chain.cert.pem
|
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
|
|
|
|
|
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
|
|
|
|
|
2016-04-15 08:34:23 -05:00
|
|
|
run: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp
|
2016-07-18 06:45:36 -05:00
|
|
|
@echo "Launching loolwsd"
|
2016-04-14 04:36:18 -05:00
|
|
|
@cp $(abs_top_srcdir)/test/data/hello.odt $(abs_top_srcdir)/test/data/hello-world.odt
|
2016-04-13 11:31:10 -05:00
|
|
|
@echo
|
2016-06-25 19:10:48 -05:00
|
|
|
./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" --o:lo_template_path="@LO_PATH@" \
|
|
|
|
--o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \
|
|
|
|
--o:admin_console.username=admin --o:admin_console.password=admin
|
2016-05-12 06:24:38 -05:00
|
|
|
|
2016-09-30 16:53:48 -05:00
|
|
|
run-valgrind: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp
|
2016-05-12 06:24:38 -05:00
|
|
|
@echo "Launching loolwsd under valgrind (but not forkit/loolkit, yet)"
|
|
|
|
valgrind --tool=memcheck --trace-children=no -v --read-var-info=yes \
|
2016-06-27 02:45:29 -05:00
|
|
|
./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" --o:lo_template_path="@LO_PATH@" \
|
|
|
|
--o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \
|
|
|
|
--o:admin_console.username=admin --o:admin_console.password=admin
|
2016-09-30 16:53:48 -05:00
|
|
|
|
|
|
|
run-callgrind: all @JAILS_PATH@ @SYSTEMPLATE_PATH@/system_stamp
|
|
|
|
@echo "Launching loolwsd under valgrind (but not forkit/loolkit, yet)"
|
|
|
|
valgrind --tool=callgrind --simulate-cache=yes --dump-instr=yes --num-callers=50 --error-limit=no \
|
|
|
|
./loolwsd --o:sys_template_path="@SYSTEMPLATE_PATH@" --o:lo_template_path="@LO_PATH@" \
|
|
|
|
--o:child_root_path="@JAILS_PATH@" --o:storage.filesystem[@allow]=true \
|
|
|
|
--o:admin_console.username=admin --o:admin_console.password=admin
|
2016-04-12 01:29:57 -05:00
|
|
|
else
|
|
|
|
|
|
|
|
SYSTEM_STAMP =
|
|
|
|
|
2016-04-11 12:21:16 -05:00
|
|
|
endif
|
|
|
|
|
2016-04-22 06:11:57 -05:00
|
|
|
clean-cache cache-clean:
|
2015-03-17 18:56:15 -05:00
|
|
|
# Intentionally don't use "*" below... Avoid risk of accidentally running rm -rf /*
|
2015-03-27 07:52:30 -05:00
|
|
|
test -n "@LOOLWSD_CACHEDIR@" && rm -rf "@LOOLWSD_CACHEDIR@"/[0-9a-f]
|
2015-04-08 09:22:42 -05:00
|
|
|
|
2016-09-30 02:29:08 -05:00
|
|
|
clang-tidy:
|
|
|
|
for i in *.cpp; do echo $$i; clang-tidy -header-filter=^$(PWD).* $$i || break; done
|
|
|
|
|
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
|
|
|
|
2016-04-14 11:47:35 -05:00
|
|
|
all-local: loolforkit @JAILS_PATH@ $(SYSTEM_STAMP)
|
2016-09-30 03:43:04 -05:00
|
|
|
@if test "$$BUILDING_FROM_RPMBUILD" != yes; then \
|
2016-04-05 08:37:10 -05:00
|
|
|
sudo @SETCAP@ cap_fowner,cap_mknod,cap_sys_chroot=ep loolforkit; \
|
2016-04-02 13:17:22 -05:00
|
|
|
sudo @SETCAP@ cap_sys_admin=ep loolmount; \
|
2016-03-25 13:02:42 -05:00
|
|
|
echo "Set required capabilities"; \
|
|
|
|
else \
|
|
|
|
echo "Skipping capability setting"; \
|
2015-05-04 12:55:35 -05:00
|
|
|
fi
|
2016-09-30 03:43:04 -05:00
|
|
|
|
|
|
|
# just run the build without any tests
|
|
|
|
build-nocheck: all-am
|