blob: 0cbb5ad93e6cd2b1df9f1b6deb577b99db7aed19 [file] [log] [blame]
Takeshi Abeb2bd33e2011-08-10 02:12:48 +09001# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +01002#
Michael Meeks1e4422a2013-05-16 21:56:04 +01003# This file is part of the LibreOffice project.
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +01004#
Michael Meeks1e4422a2013-05-16 21:56:04 +01005# 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/.
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +01008#
Michael Meeks1e4422a2013-05-16 21:56:04 +01009# This file incorporates work covered by the following license notice:
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010010#
Michael Meeks1e4422a2013-05-16 21:56:04 +010011# Licensed to the Apache Software Foundation (ASF) under one or more
12# contributor license agreements. See the NOTICE file distributed
13# with this work for additional information regarding copyright
14# ownership. The ASF licenses this file to you under the Apache
15# License, Version 2.0 (the "License"); you may not use this file
16# except in compliance with the License. You may obtain a copy of
17# the License at http://www.apache.org/licenses/LICENSE-2.0 .
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010018#
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010019
Matúš Kukan944f3a62013-06-14 12:48:20 +020020# fixes for executables
21
22gb_Executable_FILENAMES := $(foreach group,$(gb_Executable_VALIDGROUPS),\
23 $(foreach exe,$(gb_Executable_$(group)),$(exe):$(exe)$(gb_Executable_EXT)))
24
Tor Lillqvist59622da2014-08-08 11:28:49 +030025ifneq (,$(filter-out MACOSX WNT,$(OS)))
Matúš Kukan944f3a62013-06-14 12:48:20 +020026gb_Executable_FILENAMES := $(patsubst uno:uno,uno:uno.bin,$(gb_Executable_FILENAMES))
Tor Lillqvist59622da2014-08-08 11:28:49 +030027endif
Stephan Bergmann57e6d742015-02-09 18:06:48 +010028gb_Executable_FILENAMES := $(patsubst unopkg_bin:unopkg_bin%,unopkg_bin:unopkg$(if $(filter-out MACOSX,$(OS)),.bin),$(gb_Executable_FILENAMES))
Michael Stahl764e6882013-09-21 01:34:26 +020029gb_Executable_FILENAMES := $(patsubst unopkg_com:unopkg_com%,unopkg_com:unopkg.com,$(gb_Executable_FILENAMES))
Stephan Bergmann69858a92015-11-27 15:43:37 +010030ifneq ($(OS),MACOSX)
Matúš Kukan9555b5b2013-06-14 12:48:20 +020031gb_Executable_FILENAMES := $(patsubst gengal:gengal,gengal:gengal.bin,$(gb_Executable_FILENAMES))
Stephan Bergmann69858a92015-11-27 15:43:37 +010032endif
Matúš Kukan944f3a62013-06-14 12:48:20 +020033
Stephan Bergmann07ec7b12013-09-11 09:05:31 +020034ifeq ($(OS),MACOSX)
Michael Stahl764e6882013-09-21 01:34:26 +020035gb_Executable_FILENAMES := $(patsubst soffice_bin:soffice_bin,soffice_bin:soffice,$(gb_Executable_FILENAMES))
36else
Jan-Marek Glogowski599cbdb2021-05-21 15:41:15 +020037ifeq ($(OS),EMSCRIPTEN)
38gb_Executable_FILENAMES := $(patsubst soffice_bin:soffice_bin%,soffice_bin:soffice.html,$(gb_Executable_FILENAMES))
39else
Michael Stahl764e6882013-09-21 01:34:26 +020040gb_Executable_FILENAMES := $(patsubst soffice_bin:soffice_bin%,soffice_bin:soffice.bin,$(gb_Executable_FILENAMES))
Stephan Bergmann07ec7b12013-09-11 09:05:31 +020041endif
Jan-Marek Glogowski599cbdb2021-05-21 15:41:15 +020042endif
Stephan Bergmann07ec7b12013-09-11 09:05:31 +020043
Mike Kaganski506173a2018-11-19 13:07:20 +030044gb_Executable_FILENAMES := $(patsubst soffice_exe:soffice_exe%,soffice_exe:soffice.exe,$(gb_Executable_FILENAMES))
45gb_Executable_FILENAMES := $(patsubst soffice_com:soffice_com%,soffice_com:soffice.com,$(gb_Executable_FILENAMES))
46
Bartosz Kosiorek9c0d40f2018-11-27 11:40:49 +010047# fixes for .jnilibs on macOS that are not also needed as .dylibs:
Stephan Bergmanna382dad2013-09-14 18:08:57 +020048ifeq ($(OS),MACOSX)
49gb_Library_FILENAMES := \
50 $(subst jpipe:libjpipe.dylib,jpipe:libjpipe.jnilib,$(gb_Library_FILENAMES))
51gb_Library_FILENAMES := \
52 $(subst juh:libjuh.dylib,juh:libjuh.jnilib,$(gb_Library_FILENAMES))
Sophia Schröderf4fc28a2018-04-11 15:39:57 +010053gb_Library_FILENAMES := \
54 $(subst hsqldb:libhsqldb.dylib,hsqldb:libhsqldb.jnilib,$(gb_Library_FILENAMES))
Stephan Bergmanna382dad2013-09-14 18:08:57 +020055endif
56
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010057# fixes for all the libraries that are named with too much creativity and do
58# not follow any of the established nameschemes
59
Francois Tigeotfaae7932011-03-21 23:21:20 +010060# Make has no support for 'or' clauses in conditionals,
61# we use a filter expression instead.
Matúš Kukan43617912011-08-26 16:25:45 +020062ifneq (,$(filter SOLARIS GCC,$(OS) $(COM)))
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010063gb_Library_FILENAMES := $(patsubst cppuhelper:libcppuhelper%,cppuhelper:libuno_cppuhelper%,$(gb_Library_FILENAMES))
Matúš Kukan051fdda2011-12-17 14:55:08 +010064gb_Library_FILENAMES := $(patsubst purpenvhelper:libpurpen%,purpenvhelper:libuno_purpen%,$(gb_Library_FILENAMES))
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010065gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES))
David Ostrovskye16ac692012-05-27 22:50:41 +020066
67ifeq ($(OS),MACOSX)
Stephan Bergmannfa200682012-06-15 16:46:44 +020068# libpyuno_wrapper.dylib => pyuno.so
69gb_Library_FILENAMES := $(patsubst pyuno_wrapper:libpyuno_wrapper.dylib,pyuno_wrapper:pyuno.so,$(gb_Library_FILENAMES))
David Ostrovskye16ac692012-05-27 22:50:41 +020070else
71# libpyuno_wrapper.so => pyuno.so
72gb_Library_FILENAMES := $(patsubst pyuno_wrapper:libpyuno_wrapper.so,pyuno_wrapper:pyuno.so,$(gb_Library_FILENAMES))
73endif
74
Tor Lillqvist31826312012-02-20 11:15:02 +020075ifneq ($(OS),ANDROID)
Caolán McNamara8d7e8a02012-04-13 11:13:19 +010076gb_Library_FILENAMES := $(patsubst unobootstrapprotector:libuno%,unobootstrapprotector:uno%,$(gb_Library_FILENAMES))
Matúš Kukand06a78c2012-02-10 00:16:55 +010077gb_Library_FILENAMES := $(patsubst unoexceptionprotector:libuno%,unoexceptionprotector:uno%,$(gb_Library_FILENAMES))
Tor Lillqvist31826312012-02-20 11:15:02 +020078endif
Bjoern Michaelsen902f9da2011-06-20 13:24:08 +020079endif
Mathias Bauer90485912011-03-16 10:26:30 +010080
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010081ifeq ($(OS),WNT)
Michael Stahld263c222013-09-17 19:50:20 +020082gb_Library_FILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_FILENAMES))
83gb_Library_FILENAMES := $(patsubst rdf:rdf%,rdf:librdf%,$(gb_Library_FILENAMES))
Mathias Bauer90485912011-03-16 10:26:30 +010084
David Ostrovskye16ac692012-05-27 22:50:41 +020085# libpyuno_wrapper.dll => pyuno.pyd
Michael Stahld263c222013-09-17 19:50:20 +020086gb_Library_FILENAMES := $(patsubst pyuno:pyuno.dll,pyuno:pyuno$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd,$(gb_Library_FILENAMES))
David Ostrovskye16ac692012-05-27 22:50:41 +020087
Michael Stahld263c222013-09-17 19:50:20 +020088gb_Library_ILIBFILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_ILIBFILENAMES))
Bjoern Michaelsen6f0d3f22011-06-18 14:12:16 +020089
Michael Stahl01df12e2013-04-09 12:33:46 +020090# these have prefix "lib" instead of "i"
91gb_Library_LIBLIBFILENAMES := \
Michael Stahl01df12e2013-04-09 12:33:46 +020092 rdf \
Michael Stahl01df12e2013-04-09 12:33:46 +020093
Michael Stahld263c222013-09-17 19:50:20 +020094gb_Library_ILIBFILENAMES := \
Michael Stahl5f9cda22013-11-01 15:43:47 +010095 $(filter-out $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):%) \
Michael Stahld263c222013-09-17 19:50:20 +020096 ,$(gb_Library_ILIBFILENAMES))
97gb_Library_ILIBFILENAMES += \
Michael Stahl01df12e2013-04-09 12:33:46 +020098 $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):lib$(lib)$(gb_Library_PLAINEXT))
Mathias Bauer90485912011-03-16 10:26:30 +010099
Michael Stahld263c222013-09-17 19:50:20 +0200100gb_Library_FILENAMES := $(filter-out $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):%),$(gb_Library_FILENAMES))
101gb_Library_FILENAMES += $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):lib$(lib).dll)
Michael Stahld263c222013-09-17 19:50:20 +0200102
Mathias Bauer90485912011-03-16 10:26:30 +0100103endif # ifeq ($(OS),WNT)
Bjoern Michaelsen56070c62010-11-13 09:41:56 +0100104
Jan-Marek Glogowskie9301742021-05-22 02:41:58 +0200105gb_Executable_FILENAMES_FOR_BUILD := $(subst $(gb_Executable_EXT),$(gb_Executable_EXT_for_build),$(gb_Executable_FILENAMES))
106gb_Library_FILENAMES_FOR_BUILD := $(subst $(gb_Library_PLAINEXT),$(gb_Library_PLAINEXT_FOR_BUILD),$(gb_Library_FILENAMES))
107
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +0100108# vim: set noet sw=4 ts=4: