blob: cc37c50349f5eccb28accf6cb397d229849f5cb2 [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))
Michael Stahl764e6882013-09-21 01:34:26 +020026gb_Executable_FILENAMES := $(patsubst unopkg_bin:unopkg_bin%,unopkg_bin:unopkg.bin,$(gb_Executable_FILENAMES))
27gb_Executable_FILENAMES := $(patsubst unopkg_com:unopkg_com%,unopkg_com:unopkg.com,$(gb_Executable_FILENAMES))
28gb_Executable_FILENAMES := $(patsubst crashrep_com:crashrep_com%,crashrep_com:crashrep.com,$(gb_Executable_FILENAMES))
Matúš Kukan9555b5b2013-06-14 12:48:20 +020029gb_Executable_FILENAMES := $(patsubst gengal:gengal,gengal:gengal.bin,$(gb_Executable_FILENAMES))
Matúš Kukan944f3a62013-06-14 12:48:20 +020030
Stephan Bergmann07ec7b12013-09-11 09:05:31 +020031ifeq ($(OS),MACOSX)
Michael Stahl764e6882013-09-21 01:34:26 +020032gb_Executable_FILENAMES := $(patsubst soffice_bin:soffice_bin,soffice_bin:soffice,$(gb_Executable_FILENAMES))
33else
34gb_Executable_FILENAMES := $(patsubst soffice_bin:soffice_bin%,soffice_bin:soffice.bin,$(gb_Executable_FILENAMES))
Stephan Bergmann07ec7b12013-09-11 09:05:31 +020035endif
36
Matúš Kukan944f3a62013-06-14 12:48:20 +020037gb_Executable_FILENAMES_FOR_BUILD := $(subst $(gb_Executable_EXT),$(gb_Executable_EXT_for_build),$(gb_Executable_FILENAMES))
38
Stephan Bergmanna382dad2013-09-14 18:08:57 +020039# fixes for .jnilibs on Mac OS X that are not also needed as .dylibs:
40ifeq ($(OS),MACOSX)
41gb_Library_FILENAMES := \
42 $(subst jpipe:libjpipe.dylib,jpipe:libjpipe.jnilib,$(gb_Library_FILENAMES))
43gb_Library_FILENAMES := \
44 $(subst juh:libjuh.dylib,juh:libjuh.jnilib,$(gb_Library_FILENAMES))
45gb_Library_FILENAMES := \
46 $(subst hsqldb:libhsqldb.dylib,hsqldb:libhsqldb.jnilib,$(gb_Library_FILENAMES))
47endif
48
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010049# fixes for all the libraries that are named with too much creativity and do
50# not follow any of the established nameschemes
51
Francois Tigeotfaae7932011-03-21 23:21:20 +010052# Make has no support for 'or' clauses in conditionals,
53# we use a filter expression instead.
Matúš Kukan43617912011-08-26 16:25:45 +020054ifneq (,$(filter SOLARIS GCC,$(OS) $(COM)))
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010055gb_Library_FILENAMES := $(patsubst cppuhelper:libcppuhelper%,cppuhelper:libuno_cppuhelper%,$(gb_Library_FILENAMES))
Matúš Kukan051fdda2011-12-17 14:55:08 +010056gb_Library_FILENAMES := $(patsubst purpenvhelper:libpurpen%,purpenvhelper:libuno_purpen%,$(gb_Library_FILENAMES))
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010057gb_Library_FILENAMES := $(patsubst salhelper:libsalhelper%,salhelper:libuno_salhelper%,$(gb_Library_FILENAMES))
David Ostrovskye16ac692012-05-27 22:50:41 +020058
59ifeq ($(OS),MACOSX)
Stephan Bergmannfa200682012-06-15 16:46:44 +020060# libpyuno_wrapper.dylib => pyuno.so
61gb_Library_FILENAMES := $(patsubst pyuno_wrapper:libpyuno_wrapper.dylib,pyuno_wrapper:pyuno.so,$(gb_Library_FILENAMES))
David Ostrovskye16ac692012-05-27 22:50:41 +020062else
63# libpyuno_wrapper.so => pyuno.so
64gb_Library_FILENAMES := $(patsubst pyuno_wrapper:libpyuno_wrapper.so,pyuno_wrapper:pyuno.so,$(gb_Library_FILENAMES))
65endif
66
Tor Lillqvist31826312012-02-20 11:15:02 +020067ifneq ($(OS),ANDROID)
Caolán McNamara8d7e8a02012-04-13 11:13:19 +010068gb_Library_FILENAMES := $(patsubst unobootstrapprotector:libuno%,unobootstrapprotector:uno%,$(gb_Library_FILENAMES))
Matúš Kukand06a78c2012-02-10 00:16:55 +010069gb_Library_FILENAMES := $(patsubst unoexceptionprotector:libuno%,unoexceptionprotector:uno%,$(gb_Library_FILENAMES))
Tor Lillqvist31826312012-02-20 11:15:02 +020070endif
Bjoern Michaelsen902f9da2011-06-20 13:24:08 +020071endif
Mathias Bauer90485912011-03-16 10:26:30 +010072
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +010073ifeq ($(OS),WNT)
Michael Stahld263c222013-09-17 19:50:20 +020074gb_Library_FILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_FILENAMES))
75gb_Library_FILENAMES := $(patsubst rdf:rdf%,rdf:librdf%,$(gb_Library_FILENAMES))
Mathias Bauer90485912011-03-16 10:26:30 +010076
David Ostrovskye16ac692012-05-27 22:50:41 +020077# libpyuno_wrapper.dll => pyuno.pyd
Michael Stahld263c222013-09-17 19:50:20 +020078gb_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 +020079
Matúš Kukan43617912011-08-26 16:25:45 +020080ifeq ($(COM),GCC)
Michael Stahld263c222013-09-17 19:50:20 +020081gb_Library_ILIBFILENAMES := $(patsubst libexttextcat:liblibext%,libexttextcat:libilibext%,$(gb_Library_ILIBFILENAMES))
Michael Stahld263c222013-09-17 19:50:20 +020082gb_Library_ILIBFILENAMES := $(patsubst z:iz%,z:zlib%,$(gb_Library_ILIBFILENAMES))
Michael Stahld78b18f2011-04-13 12:44:29 +000083
Tor Lillqvist1780e952011-06-20 23:52:40 +030084# Libraries not provided by mingw(-w64), available only in the Windows
85# SDK. So if these actually are liked with somewhere, we can't
86# cross-compile that module then using MinGW. That needs to be fixed
87# then, and we need to use these libraries through run-time lookup of
88# APIs. Or something.
Norbert Thiebaudddc28b82011-09-30 08:11:10 -050089gb_Library_SDKLIBFILENAMES:=
tono087e9122011-01-05 22:55:15 +090090
Michael Stahld263c222013-09-17 19:50:20 +020091gb_Library_FILENAMES := $(filter-out $(foreach lib,$(gb_Library_SDKLIBFILENAMES),$(lib):%),$(gb_Library_FILENAMES))
92gb_Library_FILENAMES += $(foreach lib,$(gb_Library_SDKLIBFILENAMES),$(lib):$(WINDOWS_SDK_HOME)/lib/$(lib).lib)
tono087e9122011-01-05 22:55:15 +090093
Matúš Kukan43617912011-08-26 16:25:45 +020094else # $(COM) != GCC
Michael Stahld263c222013-09-17 19:50:20 +020095gb_Library_ILIBFILENAMES := $(patsubst z:z%,z:zlib%,$(gb_Library_ILIBFILENAMES))
Bjoern Michaelsen6f0d3f22011-06-18 14:12:16 +020096
Michael Stahl01df12e2013-04-09 12:33:46 +020097# these have prefix "lib" instead of "i"
98gb_Library_LIBLIBFILENAMES := \
Michael Stahl01df12e2013-04-09 12:33:46 +020099 rdf \
Michael Stahl01df12e2013-04-09 12:33:46 +0200100
Michael Stahld263c222013-09-17 19:50:20 +0200101gb_Library_ILIBFILENAMES := \
Michael Stahl5f9cda22013-11-01 15:43:47 +0100102 $(filter-out $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):%) \
Michael Stahld263c222013-09-17 19:50:20 +0200103 ,$(gb_Library_ILIBFILENAMES))
104gb_Library_ILIBFILENAMES += \
Michael Stahl01df12e2013-04-09 12:33:46 +0200105 $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):lib$(lib)$(gb_Library_PLAINEXT))
Mathias Bauer90485912011-03-16 10:26:30 +0100106
Michael Stahld263c222013-09-17 19:50:20 +0200107gb_Library_FILENAMES := $(filter-out $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):%),$(gb_Library_FILENAMES))
108gb_Library_FILENAMES += $(foreach lib,$(gb_Library_LIBLIBFILENAMES),$(lib):lib$(lib).dll)
Michael Stahld263c222013-09-17 19:50:20 +0200109
Matúš Kukan43617912011-08-26 16:25:45 +0200110endif # ifeq ($(COM),GCC)
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +0100111
Mathias Bauer90485912011-03-16 10:26:30 +0100112endif # ifeq ($(OS),WNT)
Bjoern Michaelsen56070c62010-11-13 09:41:56 +0100113
Bjoern Michaelsen549d68a2010-11-11 00:30:49 +0100114# vim: set noet sw=4 ts=4: