1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval
$(call gb_Executable_Executable
,soffice_bin
))
12 $(eval
$(call gb_Executable_set_include
,soffice_bin
,\
14 -I
$(SRCDIR
)/desktop
/source
/inc \
17 $(eval
$(call gb_Executable_add_defs
,soffice_bin
,\
18 $(if
$(DISABLE_DYNLOADING
),$(if
$(SYSTEM_LIBXML
),,-DNOTEST_xmlCleanupParser
)) \
21 $(eval
$(call gb_Executable_use_libraries
,soffice_bin
,\
26 $(eval
$(call gb_Executable_add_cobjects
,soffice_bin
,\
27 desktop
/source
/app
/main \
30 ifeq ($(OS
)-$(ENABLE_QT5
),EMSCRIPTEN-TRUE
)
31 $(eval
$(call gb_Executable_add_prejs
,soffice_bin
,$(SRCDIR
)/static
/emscripten
/soffice_args.js
))
36 $(eval
$(call gb_Executable_set_targettype_gui
,soffice_bin
,NO
))
38 $(eval
$(call gb_Executable_add_nativeres
,soffice_bin
,sofficebin
/officeloader
))
40 $(eval
$(call gb_Executable_add_default_nativeres
,soffice_bin
,$(PRODUCTNAME
)))
44 $(eval
$(call gb_Executable_add_ldflags
,soffice_bin
,\
52 ifeq ($(OS
),EMSCRIPTEN
)
53 $(call gb_LinkTarget_get_target
,$(call gb_Executable_get_linktarget
,soffice_bin
)) : $(call gb_StaticLibrary_get_linktarget_target
,unoembind
)
54 $(call gb_LinkTarget_get_headers_target
,$(call gb_Executable_get_linktarget
,soffice_bin
)) : $(call gb_StaticLibrary_get_headers_target
,unoembind
)
55 $(call gb_LinkTarget__static_lib_dummy_depend
,unoembind
)
57 $(eval
$(call gb_Executable_add_ldflags
,soffice_bin
,\
58 -s EXPORTED_FUNCTIONS
=["_main"$(COMMA
)"_libreofficekit_hook"$(COMMA
)"_libreofficekit_hook_2"$(COMMA
)"_lok_preinit"$(COMMA
)"_lok_preinit_2"$(COMMA
)"_malloc"$(COMMA
)"_free"] -Wl
$(COMMA
)--whole-archive
$(call gb_StaticLibrary_get_target
,unoembind
) -Wl
$(COMMA
)--no-whole-archive \
60 ifeq ($(ENABLE_QT6
),TRUE
)
61 $(eval
$(call gb_Executable_add_ldflags
,soffice_bin
, \
63 -s EXPORT_NAME
=soffice_entry \
67 ifneq ($(ENABLE_DBGUTIL
),)
69 $(call gb_Executable_get_linktarget_target
,soffice_bin
): \
70 $(call gb_CustomTarget_get_workdir
,static
/unoembind
)/bindings_uno.js \
71 $(SRCDIR
)/unotest
/source
/embindtest
/embindtest.js
73 $(eval
$(call gb_Executable_add_ldflags
,soffice_bin
, \
74 --post-js
$(call gb_CustomTarget_get_workdir
,static
/unoembind
)/bindings_uno.js \
75 --post-js
$(SRCDIR
)/unotest
/source
/embindtest
/embindtest.js \
82 # vim: set ts=4 sw=4 et: