blob: 51d6924aef0e768b816688f9354210f104015166 [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
25gb_Executable_FILENAMES := $(patsubst uno:uno,uno:uno.bin,$(gb_Executable_FILENAMES))
Matúš Kukan9555b5b2013-06-14 12:48:20 +020026gb_Executable_FILENAMES := $(patsubst gengal:gengal,gengal:gengal.bin,$(gb_Executable_FILENAMES))
Matúš Kukan944f3a62013-06-14 12:48:20 +020027
28gb_Executable_FILENAMES_FOR_BUILD := $(subst $(gb_Executable_EXT),$(gb_Executable_EXT_for_build),$(gb_Executable_FILENAMES))
29
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010030# fixes for all the libraries that are named with too much creativity and do
31# not follow any of the established nameschemes
32
Francois Tigeotfaae7932011-03-21 23:21:20 +010033# Make has no support for 'or' clauses in conditionals,
34# we use a filter expression instead.
Matúš Kukan43617912011-08-26 16:25:45 +020035ifneq (,$(filter SOLARIS GCC,$(OS) $(COM)))
Matúš Kukan051fdda2011-12-17 14:55:08 +010036gb_Library_FILENAMES := $(patsubst affine_uno:libaffine_uno%,affine_uno:libaffine_uno_uno%,$(gb_Library_FILENAMES))
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010037gb_Library_FILENAMES := $(patsubst cppuhelper:libcppuhelper%,cppuhelper:libuno_cppuhelper%,$(gb_Library_FILENAMES))
Matúš Kukan051fdda2011-12-17 14:55:08 +010038gb_Library_FILENAMES := $(patsubst log_uno:liblog_uno%,log_uno:liblog_uno_uno%,$(gb_Library_FILENAMES))
39gb_Library_FILENAMES := $(patsubst purpenvhelper:libpurpen%,purpenvhelper:libuno_purpen%,$(gb_Library_FILENAMES))
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010040gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES))
David Ostrovskye16ac692012-05-27 22:50:41 +020041
42ifeq ($(OS),MACOSX)
Stephan Bergmannfa200682012-06-15 16:46:44 +020043# libpyuno_wrapper.dylib => pyuno.so
44gb_Library_FILENAMES := $(patsubst pyuno_wrapper:libpyuno_wrapper.dylib,pyuno_wrapper:pyuno.so,$(gb_Library_FILENAMES))
David Ostrovskye16ac692012-05-27 22:50:41 +020045else
46# libpyuno_wrapper.so => pyuno.so
47gb_Library_FILENAMES := $(patsubst pyuno_wrapper:libpyuno_wrapper.so,pyuno_wrapper:pyuno.so,$(gb_Library_FILENAMES))
48endif
49
Tor Lillqvist31826312012-02-20 11:15:02 +020050ifneq ($(OS),ANDROID)
Caolán McNamara8d7e8a02012-04-13 11:13:19 +010051gb_Library_FILENAMES := $(patsubst unobootstrapprotector:libuno%,unobootstrapprotector:uno%,$(gb_Library_FILENAMES))
Matúš Kukand06a78c2012-02-10 00:16:55 +010052gb_Library_FILENAMES := $(patsubst unoexceptionprotector:libuno%,unoexceptionprotector:uno%,$(gb_Library_FILENAMES))
Tor Lillqvist31826312012-02-20 11:15:02 +020053endif
Matúš Kukan051fdda2011-12-17 14:55:08 +010054gb_Library_FILENAMES := $(patsubst unsafe_uno:libunsafe_uno%,unsafe_uno:libunsafe_uno_uno%,$(gb_Library_FILENAMES))
Bjoern Michaelsen902f9da2011-06-20 13:24:08 +020055endif
Mathias Bauer90485912011-03-16 10:26:30 +010056
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010057ifeq ($(OS),WNT)
Matúš Kukanad4c6132011-12-19 10:13:24 +010058gb_Library_DLLFILENAMES := $(patsubst affine_uno:affine_uno%,affine_uno:affine_uno_uno%,$(gb_Library_DLLFILENAMES))
Matúš Kukan43617912011-08-26 16:25:45 +020059gb_Library_DLLFILENAMES := $(patsubst icuuc:icuuc%,icuuc:icuuc40%,$(gb_Library_DLLFILENAMES))
Matúš Kukanad4c6132011-12-19 10:13:24 +010060gb_Library_DLLFILENAMES := $(patsubst log_uno:log_uno%,log_uno:log_uno_uno%,$(gb_Library_DLLFILENAMES))
Matúš Kukanad4c6132011-12-19 10:13:24 +010061gb_Library_DLLFILENAMES := $(patsubst unsafe_uno:unsafe_uno%,unsafe_uno:unsafe_uno_uno%,$(gb_Library_DLLFILENAMES))
Caolán McNamara3934efe2012-04-13 14:06:05 +010062gb_Library_DLLFILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_DLLFILENAMES))
Peter Foley18bd1e72012-12-27 18:04:21 -050063gb_Library_DLLFILENAMES := $(patsubst rdf:rdf%,rdf:librdf%,$(gb_Library_DLLFILENAMES))
Mathias Bauer90485912011-03-16 10:26:30 +010064
David Ostrovskye16ac692012-05-27 22:50:41 +020065# libpyuno_wrapper.dll => pyuno.pyd
Michael Stahl849f87d2013-04-20 00:51:21 +020066gb_Library_DLLFILENAMES := $(patsubst pyuno:pyuno.dll,pyuno:pyuno$(if $(MSVC_USE_DEBUG_RUNTIME),_d).pyd,$(gb_Library_DLLFILENAMES))
David Ostrovskye16ac692012-05-27 22:50:41 +020067
Matúš Kukan43617912011-08-26 16:25:45 +020068ifeq ($(COM),GCC)
Daniel Rentz [dr]493b5942011-03-07 13:07:44 +010069gb_Library_FILENAMES := $(patsubst crypto:icrypto%,crypto:crypto%,$(gb_Library_FILENAMES))
Stephan Bergmannebc6b412012-09-10 15:00:51 +020070gb_Library_FILENAMES := $(patsubst exslt:iexslt%,exslt:libexslt$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
Matúš Kukan4258f022011-12-23 13:26:56 +010071gb_Library_FILENAMES := $(patsubst libexttextcat:liblibext%,libexttextcat:libilibext%,$(gb_Library_FILENAMES))
Matúš Kukan43617912011-08-26 16:25:45 +020072gb_Library_FILENAMES := $(patsubst rdf:irdf%,rdf:librdf.dll$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
Daniel Rentz [dr]493b5942011-03-07 13:07:44 +010073gb_Library_FILENAMES := $(patsubst ssl:issl%,ssl:ssl%,$(gb_Library_FILENAMES))
tono087e9122011-01-05 22:55:15 +090074gb_Library_FILENAMES := $(patsubst xml2:ixml2%,xml2:libxml2$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
Michael Stahlcbc756f2011-02-14 14:19:23 +010075gb_Library_FILENAMES := $(patsubst xslt:ixslt%,xslt:libxslt$(gb_Library_IARCEXT),$(gb_Library_FILENAMES))
Caolán McNamara3934efe2012-04-13 14:06:05 +010076gb_Library_FILENAMES := $(patsubst z:iz%,z:zlib%,$(gb_Library_FILENAMES))
Michael Stahld78b18f2011-04-13 12:44:29 +000077
Tor Lillqvist1780e952011-06-20 23:52:40 +030078# Libraries not provided by mingw(-w64), available only in the Windows
79# SDK. So if these actually are liked with somewhere, we can't
80# cross-compile that module then using MinGW. That needs to be fixed
81# then, and we need to use these libraries through run-time lookup of
82# APIs. Or something.
Norbert Thiebaudddc28b82011-09-30 08:11:10 -050083gb_Library_SDKLIBFILENAMES:=
tono087e9122011-01-05 22:55:15 +090084
Tor Lillqvist1780e952011-06-20 23:52:40 +030085gb_Library_DLLFILENAMES := $(filter-out $(foreach lib,$(gb_Library_SDKLIBFILENAMES),$(lib):%),$(gb_Library_DLLFILENAMES))
86gb_Library_DLLFILENAMES += $(foreach lib,$(gb_Library_SDKLIBFILENAMES),$(lib):$(WINDOWS_SDK_HOME)/lib/$(lib).lib)
tono087e9122011-01-05 22:55:15 +090087
David Tardonb3387392011-04-18 12:40:45 +020088gb_Library_DLLFILENAMES := $(patsubst crypto:crypto%,crypto:libeay32%,$(gb_Library_DLLFILENAMES))
David Tardonb3387392011-04-18 12:40:45 +020089gb_Library_DLLFILENAMES := $(patsubst ssl:ssl%,ssl:ssleay32%,$(gb_Library_DLLFILENAMES))
tono087e9122011-01-05 22:55:15 +090090
Matúš Kukan43617912011-08-26 16:25:45 +020091else # $(COM) != GCC
Mathias Bauer90485912011-03-16 10:26:30 +010092
Mathias Bauer368bae72011-01-20 19:32:26 +010093gb_Library_FILENAMES := $(patsubst cppunit:icppunit%,cppunit:icppunit_dll%,$(gb_Library_FILENAMES))
Tor Lillqvistc77e4442011-08-18 12:08:58 +030094gb_Library_FILENAMES := $(patsubst crypto:icrypto%,crypto:libeay32%,$(gb_Library_FILENAMES))
David Tardon373b55a2011-04-18 12:27:39 +020095gb_Library_FILENAMES := $(patsubst crypto:libcrypto%,crypto:libcrypto_static%,$(gb_Library_FILENAMES))
Tor Lillqvistc77e4442011-08-18 12:08:58 +030096gb_Library_FILENAMES := $(patsubst ssl:issl%,ssl:ssleay32%,$(gb_Library_FILENAMES))
David Tardon373b55a2011-04-18 12:27:39 +020097gb_Library_FILENAMES := $(patsubst ssl:libssl%,ssl:libssl_static%,$(gb_Library_FILENAMES))
Caolán McNamara79a2a322011-08-23 09:29:33 +010098gb_Library_FILENAMES := $(patsubst xmlsec1:ixmlsec1%,xmlsec1:libxmlsec%,$(gb_Library_FILENAMES))
99gb_Library_FILENAMES := $(patsubst xmlsec1-mscrypto:ixmlsec1-mscrypto%,xmlsec1-mscrypto:libxmlsec-mscrypto%,$(gb_Library_FILENAMES))
100gb_Library_FILENAMES := $(patsubst xmlsec1-nss:ixmlsec1-nss%,xmlsec1-nss:libxmlsec-nss%,$(gb_Library_FILENAMES))
Caolán McNamara3934efe2012-04-13 14:06:05 +0100101gb_Library_FILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_FILENAMES))
Bjoern Michaelsen6f0d3f22011-06-18 14:12:16 +0200102
Mathias Bauer90485912011-03-16 10:26:30 +0100103
Michael Stahl4811c2d2013-04-14 13:52:56 +0200104gb_Library_NOILIBFILENAMES_D := \
Khaled Hosny1733e4a2013-05-13 19:52:39 +0200105 icudt icuin icuuc \
Michael Stahl4811c2d2013-04-14 13:52:56 +0200106 lcms2 \
107
Mathias Bauer90485912011-03-16 10:26:30 +0100108# change the names of all import libraries that don't have an "i" prefix as in our standard naming schema
Michael Stahldc397aae2012-09-28 15:31:46 +0200109gb_Library_NOILIBFILENAMES := \
Eike Rathke15b95b22012-08-06 19:23:09 +0200110 langtag \
Michael Stahl01df12e2013-04-09 12:33:46 +0200111 lpsolve55 \
Andras Timar06ec1c02012-11-11 18:24:14 +0100112 xpcom \
113 xpcom_core \
Caolán McNamaracebaf592011-08-16 13:32:51 +0100114 nspr4 \
115 nss3 \
Stephan Bergmann066cf162012-08-13 11:46:21 +0200116 smime3 \
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +0100117
Michael Stahl01df12e2013-04-09 12:33:46 +0200118# these have prefix "lib" instead of "i"
119gb_Library_LIBLIBFILENAMES := \
120 curl \
121 exslt \
122 rdf \
123 xml2 \
124 xslt \
125
126gb_Library_FILENAMES := \
127 $(filter-out $(foreach lib,$(gb_Library_NOILIBFILENAMES),$(lib):%) \
Michael Stahl4811c2d2013-04-14 13:52:56 +0200128 $(foreach lib,$(gb_Library_NOILIBFILENAMES_D),$(lib):%) \
Michael Stahl01df12e2013-04-09 12:33:46 +0200129 $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):%) \
130 ,$(gb_Library_FILENAMES))
131gb_Library_FILENAMES += \
132 $(foreach lib,$(gb_Library_NOILIBFILENAMES),$(lib):$(lib)$(gb_Library_PLAINEXT)) \
Michael Stahlfaaccdc2013-04-15 19:17:15 +0200133 $(foreach lib,$(gb_Library_NOILIBFILENAMES_D),$(lib):$(lib)$(if $(MSVC_USE_DEBUG_RUNTIME),d)$(gb_Library_PLAINEXT)) \
Michael Stahl01df12e2013-04-09 12:33:46 +0200134 $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):lib$(lib)$(gb_Library_PLAINEXT))
Mathias Bauer90485912011-03-16 10:26:30 +0100135
Matúš Kukan43617912011-08-26 16:25:45 +0200136endif # ifeq ($(COM),GCC)
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +0100137
Mathias Bauer90485912011-03-16 10:26:30 +0100138endif # ifeq ($(OS),WNT)
Bjoern Michaelsen56070c62010-11-13 09:41:56 +0100139
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +0100140# vim: set noet sw=4 ts=4: