blob: 19a57323249a097035f3186a01c73aceedb6b7b2 [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))
Matúš Kukan9555b5b2013-06-14 12:48:20 +020030gb_Executable_FILENAMES := $(patsubst gengal:gengal,gengal:gengal.bin,$(gb_Executable_FILENAMES))
Matúš Kukan944f3a62013-06-14 12:48:20 +020031
Stephan Bergmann07ec7b12013-09-11 09:05:31 +020032ifeq ($(OS),MACOSX)
Michael Stahl764e6882013-09-21 01:34:26 +020033gb_Executable_FILENAMES := $(patsubst soffice_bin:soffice_bin,soffice_bin:soffice,$(gb_Executable_FILENAMES))
34else
35gb_Executable_FILENAMES := $(patsubst soffice_bin:soffice_bin%,soffice_bin:soffice.bin,$(gb_Executable_FILENAMES))
Stephan Bergmann07ec7b12013-09-11 09:05:31 +020036endif
37
Matúš Kukan944f3a62013-06-14 12:48:20 +020038gb_Executable_FILENAMES_FOR_BUILD := $(subst $(gb_Executable_EXT),$(gb_Executable_EXT_for_build),$(gb_Executable_FILENAMES))
39
Stephan Bergmanna382dad2013-09-14 18:08:57 +020040# fixes for .jnilibs on Mac OS X that are not also needed as .dylibs:
41ifeq ($(OS),MACOSX)
42gb_Library_FILENAMES := \
43 $(subst jpipe:libjpipe.dylib,jpipe:libjpipe.jnilib,$(gb_Library_FILENAMES))
44gb_Library_FILENAMES := \
45 $(subst juh:libjuh.dylib,juh:libjuh.jnilib,$(gb_Library_FILENAMES))
46gb_Library_FILENAMES := \
47 $(subst hsqldb:libhsqldb.dylib,hsqldb:libhsqldb.jnilib,$(gb_Library_FILENAMES))
48endif
49
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010050# fixes for all the libraries that are named with too much creativity and do
51# not follow any of the established nameschemes
52
Francois Tigeotfaae7932011-03-21 23:21:20 +010053# Make has no support for 'or' clauses in conditionals,
54# we use a filter expression instead.
Matúš Kukan43617912011-08-26 16:25:45 +020055ifneq (,$(filter SOLARIS GCC,$(OS) $(COM)))
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010056gb_Library_FILENAMES := $(patsubst cppuhelper:libcppuhelper%,cppuhelper:libuno_cppuhelper%,$(gb_Library_FILENAMES))
Matúš Kukan051fdda2011-12-17 14:55:08 +010057gb_Library_FILENAMES := $(patsubst purpenvhelper:libpurpen%,purpenvhelper:libuno_purpen%,$(gb_Library_FILENAMES))
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010058gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES))
David Ostrovskye16ac692012-05-27 22:50:41 +020059
60ifeq ($(OS),MACOSX)
Stephan Bergmannfa200682012-06-15 16:46:44 +020061# libpyuno_wrapper.dylib => pyuno.so
62gb_Library_FILENAMES := $(patsubst pyuno_wrapper:libpyuno_wrapper.dylib,pyuno_wrapper:pyuno.so,$(gb_Library_FILENAMES))
David Ostrovskye16ac692012-05-27 22:50:41 +020063else
64# libpyuno_wrapper.so => pyuno.so
65gb_Library_FILENAMES := $(patsubst pyuno_wrapper:libpyuno_wrapper.so,pyuno_wrapper:pyuno.so,$(gb_Library_FILENAMES))
66endif
67
Tor Lillqvist31826312012-02-20 11:15:02 +020068ifneq ($(OS),ANDROID)
Caolán McNamara8d7e8a02012-04-13 11:13:19 +010069gb_Library_FILENAMES := $(patsubst unobootstrapprotector:libuno%,unobootstrapprotector:uno%,$(gb_Library_FILENAMES))
Matúš Kukand06a78c2012-02-10 00:16:55 +010070gb_Library_FILENAMES := $(patsubst unoexceptionprotector:libuno%,unoexceptionprotector:uno%,$(gb_Library_FILENAMES))
Tor Lillqvist31826312012-02-20 11:15:02 +020071endif
Bjoern Michaelsen902f9da2011-06-20 13:24:08 +020072endif
Mathias Bauer90485912011-03-16 10:26:30 +010073
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010074ifeq ($(OS),WNT)
Michael Stahld263c222013-09-17 19:50:20 +020075gb_Library_FILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_FILENAMES))
76gb_Library_FILENAMES := $(patsubst rdf:rdf%,rdf:librdf%,$(gb_Library_FILENAMES))
Mathias Bauer90485912011-03-16 10:26:30 +010077
David Ostrovskye16ac692012-05-27 22:50:41 +020078# libpyuno_wrapper.dll => pyuno.pyd
Michael Stahld263c222013-09-17 19:50:20 +020079gb_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 +020080
Matúš Kukan43617912011-08-26 16:25:45 +020081ifeq ($(COM),GCC)
Michael Stahld263c222013-09-17 19:50:20 +020082gb_Library_ILIBFILENAMES := $(patsubst libexttextcat:liblibext%,libexttextcat:libilibext%,$(gb_Library_ILIBFILENAMES))
Michael Stahld263c222013-09-17 19:50:20 +020083gb_Library_ILIBFILENAMES := $(patsubst z:iz%,z:zlib%,$(gb_Library_ILIBFILENAMES))
Michael Stahld78b18f2011-04-13 12:44:29 +000084
Tor Lillqvist1780e952011-06-20 23:52:40 +030085# Libraries not provided by mingw(-w64), available only in the Windows
86# SDK. So if these actually are liked with somewhere, we can't
87# cross-compile that module then using MinGW. That needs to be fixed
88# then, and we need to use these libraries through run-time lookup of
89# APIs. Or something.
Norbert Thiebaudddc28b82011-09-30 08:11:10 -050090gb_Library_SDKLIBFILENAMES:=
tono087e9122011-01-05 22:55:15 +090091
Michael Stahld263c222013-09-17 19:50:20 +020092gb_Library_FILENAMES := $(filter-out $(foreach lib,$(gb_Library_SDKLIBFILENAMES),$(lib):%),$(gb_Library_FILENAMES))
93gb_Library_FILENAMES += $(foreach lib,$(gb_Library_SDKLIBFILENAMES),$(lib):$(WINDOWS_SDK_HOME)/lib/$(lib).lib)
tono087e9122011-01-05 22:55:15 +090094
Matúš Kukan43617912011-08-26 16:25:45 +020095else # $(COM) != GCC
Michael Stahld263c222013-09-17 19:50:20 +020096gb_Library_ILIBFILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_ILIBFILENAMES))
Bjoern Michaelsen6f0d3f22011-06-18 14:12:16 +020097
Michael Stahl01df12e2013-04-09 12:33:46 +020098# these have prefix "lib" instead of "i"
99gb_Library_LIBLIBFILENAMES := \
Michael Stahl01df12e2013-04-09 12:33:46 +0200100 rdf \
Michael Stahl01df12e2013-04-09 12:33:46 +0200101
Michael Stahld263c222013-09-17 19:50:20 +0200102gb_Library_ILIBFILENAMES := \
Michael Stahl5f9cda22013-11-01 15:43:47 +0100103 $(filter-out $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):%) \
Michael Stahld263c222013-09-17 19:50:20 +0200104 ,$(gb_Library_ILIBFILENAMES))
105gb_Library_ILIBFILENAMES += \
Michael Stahl01df12e2013-04-09 12:33:46 +0200106 $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):lib$(lib)$(gb_Library_PLAINEXT))
Mathias Bauer90485912011-03-16 10:26:30 +0100107
Michael Stahld263c222013-09-17 19:50:20 +0200108gb_Library_FILENAMES := $(filter-out $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):%),$(gb_Library_FILENAMES))
109gb_Library_FILENAMES += $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):lib$(lib).dll)
Michael Stahld263c222013-09-17 19:50:20 +0200110
Matúš Kukan43617912011-08-26 16:25:45 +0200111endif # ifeq ($(COM),GCC)
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +0100112
Mathias Bauer90485912011-03-16 10:26:30 +0100113endif # ifeq ($(OS),WNT)
Bjoern Michaelsen56070c62010-11-13 09:41:56 +0100114
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +0100115# vim: set noet sw=4 ts=4: