xref: /aoo42x/main/solenv/gbuild/platform/linux.mk (revision 5f9a7a39)
1cdf0e10cSrcweir#*************************************************************************
2cdf0e10cSrcweir#
3cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4cdf0e10cSrcweir#
5cdf0e10cSrcweir# Copyright 2000, 2011 Oracle and/or its affiliates.
6cdf0e10cSrcweir#
7cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite
8cdf0e10cSrcweir#
9cdf0e10cSrcweir# This file is part of OpenOffice.org.
10cdf0e10cSrcweir#
11cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify
12cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3
13cdf0e10cSrcweir# only, as published by the Free Software Foundation.
14cdf0e10cSrcweir#
15cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful,
16cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of
17cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details
19cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code).
20cdf0e10cSrcweir#
21cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License
22cdf0e10cSrcweir# version 3 along with OpenOffice.org.  If not, see
23cdf0e10cSrcweir# <http://www.openoffice.org/license.html>
24cdf0e10cSrcweir# for a copy of the LGPLv3 License.
25cdf0e10cSrcweir#
26cdf0e10cSrcweir#*************************************************************************
27cdf0e10cSrcweir
28cdf0e10cSrcweirGUI := UNX
29cdf0e10cSrcweirCOM := GCC
30cdf0e10cSrcweir
31cdf0e10cSrcweirgb_MKTEMP := mktemp -t gbuild.XXXXXX
32cdf0e10cSrcweir
33cdf0e10cSrcweirgb_CC := gcc
34cdf0e10cSrcweirgb_CXX := g++
35cdf0e10cSrcweirgb_GCCP := gcc
36cdf0e10cSrcweirgb_AR := ar
37cdf0e10cSrcweirgb_AWK := awk
38cdf0e10cSrcweirgb_CLASSPATHSEP := :
39cdf0e10cSrcweir
40cdf0e10cSrcweir# normalize setsolar and configure env.
41cdf0e10cSrcweirifeq ($(CPU),X)
42cdf0e10cSrcweirCPUNAME := X86_64
43cdf0e10cSrcweirendif
44cdf0e10cSrcweir
45cdf0e10cSrcweir# use CC/CXX if they are nondefaults
46cdf0e10cSrcweirifneq ($(origin CC),default)
47cdf0e10cSrcweirgb_CC := $(CC)
48cdf0e10cSrcweirgb_GCCP := $(CC)
49cdf0e10cSrcweirendif
50cdf0e10cSrcweirifneq ($(origin CXX),default)
51cdf0e10cSrcweirgb_CXX := $(CXX)
52cdf0e10cSrcweirendif
53cdf0e10cSrcweir
54cdf0e10cSrcweirgb_OSDEFS := \
55cdf0e10cSrcweir	-D$(OS) \
56cdf0e10cSrcweir	-D_PTHREADS \
57cdf0e10cSrcweir	-DUNIX \
58cdf0e10cSrcweir	-DUNX \
59cdf0e10cSrcweir	$(PTHREAD_CFLAGS) \
60cdf0e10cSrcweir
61cdf0e10cSrcweirifeq ($(GXX_INCLUDE_PATH),)
62cdf0e10cSrcweirGXX_INCLUDE_PATH=$(COMPATH)/include/c++/$(shell gcc -dumpversion)
63cdf0e10cSrcweirendif
64cdf0e10cSrcweir
65cdf0e10cSrcweirgb_COMPILERDEFS := \
66cdf0e10cSrcweir	-D$(COM) \
67cdf0e10cSrcweir	-DHAVE_GCC_VISIBILITY_FEATURE \
68cdf0e10cSrcweir	-DCPPU_ENV=gcc3 \
69cdf0e10cSrcweir	-DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) \
70cdf0e10cSrcweir
71cdf0e10cSrcweirifeq ($(CPUNAME),X86_64)
72cdf0e10cSrcweirgb_CPUDEFS := -D$(CPUNAME)
73cdf0e10cSrcweirelse
74cdf0e10cSrcweirgb_CPUDEFS := -DX86
75cdf0e10cSrcweirendif
76cdf0e10cSrcweir
77cdf0e10cSrcweirgb_CFLAGS := \
78cdf0e10cSrcweir	-Wall \
79cdf0e10cSrcweir	-Wendif-labels \
80cdf0e10cSrcweir	-Wextra \
81cdf0e10cSrcweir	-Wshadow \
82cdf0e10cSrcweir	-fPIC \
83cdf0e10cSrcweir	-fmessage-length=0 \
84cdf0e10cSrcweir	-fno-common \
85cdf0e10cSrcweir	-fno-strict-aliasing \
86cdf0e10cSrcweir	-fvisibility=hidden \
87cdf0e10cSrcweir	-pipe \
88cdf0e10cSrcweir
89cdf0e10cSrcweirgb_CXXFLAGS := \
90cdf0e10cSrcweir	-Wall \
91cdf0e10cSrcweir	-Wendif-labels \
92cdf0e10cSrcweir	-Wextra \
93cdf0e10cSrcweir	-Wno-ctor-dtor-privacy \
94cdf0e10cSrcweir	-Wno-non-virtual-dtor \
95cdf0e10cSrcweir	-Wshadow \
96cdf0e10cSrcweir	-fPIC \
97cdf0e10cSrcweir	-fmessage-length=0 \
98cdf0e10cSrcweir	-fno-common \
99cdf0e10cSrcweir	-fno-strict-aliasing \
100cdf0e10cSrcweir	-fno-use-cxa-atexit \
101cdf0e10cSrcweir	-fvisibility-inlines-hidden \
102cdf0e10cSrcweir	-fvisibility=hidden \
103cdf0e10cSrcweir	-pipe \
104cdf0e10cSrcweir
105cdf0e10cSrcweirifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
106cdf0e10cSrcweirgb_CFLAGS_WERROR := -Werror
107cdf0e10cSrcweirgb_CXXFLAGS_WERROR := -Werror
108cdf0e10cSrcweirendif
109cdf0e10cSrcweir
110cdf0e10cSrcweirifneq ($(strip $(SYSBASE)),)
111cdf0e10cSrcweirgb_CXXFLAGS += --sysroot=$(SYSBASE)
112cdf0e10cSrcweirgb_CFLAGS += --sysroot=$(SYSBASE)
113cdf0e10cSrcweirendif
114cdf0e10cSrcweirgb_LinkTarget_EXCEPTIONFLAGS := \
115cdf0e10cSrcweir	-DEXCEPTIONS_ON \
116cdf0e10cSrcweir	-fexceptions \
117cdf0e10cSrcweir	-fno-enforce-eh-specs \
118cdf0e10cSrcweir
119cdf0e10cSrcweirgb_LinkTarget_NOEXCEPTIONFLAGS := \
120cdf0e10cSrcweir	-DEXCEPTIONS_OFF \
121cdf0e10cSrcweir	-fno-exceptions \
122cdf0e10cSrcweir
123cdf0e10cSrcweirgb_LinkTarget_LDFLAGS := \
124cdf0e10cSrcweir	-Wl,--sysroot=$(SYSBASE) \
125cdf0e10cSrcweir	-Wl,-rpath-link,$(SYSBASE)/lib:$(SYSBASE)/usr/lib \
126cdf0e10cSrcweir	-Wl,-z,combreloc \
127cdf0e10cSrcweir	-Wl,-z,defs \
128cdf0e10cSrcweir	$(subst -L../lib , ,$(SOLARLIB)) \
129cdf0e10cSrcweir
130cdf0e10cSrcweirifeq ($(HAVE_LD_HASH_STYLE),TRUE)
131cdf0e10cSrcweirgb_LinkTarget_LDFLAGS += \
132cdf0e10cSrcweir	-Wl,--hash-style=both \
133cdf0e10cSrcweir
134cdf0e10cSrcweirendif
135cdf0e10cSrcweir
136cdf0e10cSrcweirifneq ($(HAVE_LD_BSYMBOLIC_FUNCTIONS),)
137cdf0e10cSrcweirgb_LinkTarget_LDFLAGS += \
138cdf0e10cSrcweir	-Wl,--dynamic-list-cpp-new \
139cdf0e10cSrcweir	-Wl,--dynamic-list-cpp-typeinfo \
140cdf0e10cSrcweir	-Wl,-Bsymbolic-functions \
141cdf0e10cSrcweir
142cdf0e10cSrcweirendif
143cdf0e10cSrcweir
144cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2)
145cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -O0
146cdf0e10cSrcweirelse
147cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -Os
148cdf0e10cSrcweirendif
149cdf0e10cSrcweir
150cdf0e10cSrcweirgb_COMPILERNOOPTFLAGS := -O0
151cdf0e10cSrcweir
152cdf0e10cSrcweir# Helper class
153cdf0e10cSrcweir
154cdf0e10cSrcweirgb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
155cdf0e10cSrcweir
156cdf0e10cSrcweir# convert parametters filesystem root to native notation
157cdf0e10cSrcweir# does some real work only on windows, make sure not to
158cdf0e10cSrcweir# break the dummy implementations on unx*
159cdf0e10cSrcweirdefine gb_Helper_convert_native
160cdf0e10cSrcweir$(1)
161cdf0e10cSrcweirendef
162cdf0e10cSrcweir
163cdf0e10cSrcweir# CObject class
164cdf0e10cSrcweir
165cdf0e10cSrcweirdefine gb_CObject__command
166cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),C  ,3)
167cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\
168cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
169cdf0e10cSrcweir	mkdir -p $(dir $(call gb_CObject_get_dep_target,$(2))) && \
170cdf0e10cSrcweir	$(gb_CC) \
171cdf0e10cSrcweir		$(DEFS) $(CFLAGS) \
172cdf0e10cSrcweir		-c $(3) \
173cdf0e10cSrcweir		-o $(1) \
174cdf0e10cSrcweir		-MMD -MT $(call gb_CObject_get_target,$(2)) \
175cdf0e10cSrcweir		-MF $(call gb_CObject_get_dep_target,$(2)) \
176cdf0e10cSrcweir		-I$(dir $(3)) \
177cdf0e10cSrcweir		$(INCLUDE))
178cdf0e10cSrcweirendef
179cdf0e10cSrcweir
180cdf0e10cSrcweir
181cdf0e10cSrcweir# CxxObject class
182cdf0e10cSrcweir
183cdf0e10cSrcweirdefine gb_CxxObject__command
184cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),CXX,3)
185cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\
186cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
187cdf0e10cSrcweir	mkdir -p $(dir $(call gb_CxxObject_get_dep_target,$(2))) && \
188cdf0e10cSrcweir	$(gb_CXX) \
189cdf0e10cSrcweir		$(DEFS) $(CXXFLAGS) \
190cdf0e10cSrcweir		-c $(3) \
191cdf0e10cSrcweir		-o $(1) \
192cdf0e10cSrcweir		-MMD -MT $(call gb_CxxObject_get_target,$(2)) \
193cdf0e10cSrcweir		-MF $(call gb_CxxObject_get_dep_target,$(2)) \
194cdf0e10cSrcweir		-I$(dir $(3)) \
195cdf0e10cSrcweir		$(INCLUDE_STL) $(INCLUDE))
196cdf0e10cSrcweirendef
197cdf0e10cSrcweir
198cdf0e10cSrcweir
199cdf0e10cSrcweir# LinkTarget class
200cdf0e10cSrcweir
201cdf0e10cSrcweirdefine gb_LinkTarget__get_rpath_for_layer
202cdf0e10cSrcweir$(patsubst $(1):%,%,$(filter $(1):%,$(gb_LinkTarget__RPATHS)))
203cdf0e10cSrcweirendef
204cdf0e10cSrcweir
205cdf0e10cSrcweirgb_LinkTarget__RPATHS := \
206cdf0e10cSrcweir	URELIB:\dORIGIN \
207cdf0e10cSrcweir	UREBIN:\dORIGIN/../lib:\dORIGIN \
208cdf0e10cSrcweir	OOO:\dORIGIN:\dORIGIN/../ure-link/lib \
209cdf0e10cSrcweir	BRAND:\dORIGIN:\dORIGIN/../basis-link/program:\dORIGIN/../basis-link/ure-link/lib \
210cdf0e10cSrcweir	SDKBIN:\dORIGIN/../../ure-link/lib \
211cdf0e10cSrcweir	NONEBIN:\dORIGIN/../lib:\dORIGIN \
212cdf0e10cSrcweir
213cdf0e10cSrcweirgb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
214cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
215cdf0e10cSrcweir
216cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2)
217cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
218cdf0e10cSrcweirgb_LinkTarget_CFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline
219cdf0e10cSrcweir
220cdf0e10cSrcweirendif
221cdf0e10cSrcweir
222cdf0e10cSrcweirgb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC)))
223cdf0e10cSrcweirgb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
224cdf0e10cSrcweir
225cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclink
226cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\
227cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
228cdf0e10cSrcweir	$(gb_CXX) \
229cdf0e10cSrcweir		$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
230cdf0e10cSrcweir		$(subst \d,$$,$(RPATH)) $(LDFLAGS) \
231cdf0e10cSrcweir		$(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) \
232cdf0e10cSrcweir		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
233cdf0e10cSrcweir		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
234cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
235cdf0e10cSrcweir		-Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) -Wl$(COMMA)--end-group \
236cdf0e10cSrcweir		-o $(1))
237cdf0e10cSrcweirendef
238cdf0e10cSrcweir
239cdf0e10cSrcweirdefine gb_LinkTarget__command_staticlink
240cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\
241cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
242cdf0e10cSrcweir	$(gb_AR) -rsu $(1) \
243cdf0e10cSrcweir		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
244cdf0e10cSrcweir		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
245cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
246cdf0e10cSrcweir		2> /dev/null)
247cdf0e10cSrcweirendef
248cdf0e10cSrcweir
249cdf0e10cSrcweirdefine gb_LinkTarget__command
250cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4)
251cdf0e10cSrcweir$(if $(filter Library CppunitTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclink,$(1)))
252cdf0e10cSrcweir$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlink,$(1)))
253cdf0e10cSrcweirendef
254cdf0e10cSrcweir
255cdf0e10cSrcweir
256cdf0e10cSrcweir# Library class
257cdf0e10cSrcweir
258cdf0e10cSrcweirgb_Library_DEFS :=
259cdf0e10cSrcweirgb_Library_TARGETTYPEFLAGS := -shared -Wl,-z,noexecstack
260cdf0e10cSrcweirgb_Library_SYSPRE := lib
261cdf0e10cSrcweirgb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_
262cdf0e10cSrcweirgb_Library_PLAINEXT := .so
263cdf0e10cSrcweirgb_Library_RTEXT := gcc3$(gb_Library_PLAINEXT)
264cdf0e10cSrcweirifeq ($(gb_PRODUCT),$(true))
265cdf0e10cSrcweirgb_Library_STLEXT := port_gcc$(gb_Library_PLAINEXT)
266cdf0e10cSrcweirelse
267cdf0e10cSrcweirgb_Library_STLEXT := port_gcc_stldebug$(gb_Library_PLAINEXT)
268cdf0e10cSrcweirendif
269cdf0e10cSrcweir
270cdf0e10cSrcweirifeq ($(CPUNAME),X86_64)
271*5f9a7a39SHerbert Dürrgb_Library_OOOEXT := $(gb_Library_PLAINEXT)
272cdf0e10cSrcweirgb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT)
273cdf0e10cSrcweirelse
274*5f9a7a39SHerbert Dürrgb_Library_OOOEXT := $(gb_Library_PLAINEXT)
275cdf0e10cSrcweirgb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT)
276cdf0e10cSrcweirendif
277cdf0e10cSrcweir
278cdf0e10cSrcweirgb_Library_PLAINLIBS_NONE += \
279cdf0e10cSrcweir	dl \
280cdf0e10cSrcweir    freetype \
281cdf0e10cSrcweir	jpeg \
282cdf0e10cSrcweir	m \
283cdf0e10cSrcweir	pthread \
284cdf0e10cSrcweir	X11 \
285cdf0e10cSrcweir    Xext \
286cdf0e10cSrcweir    SM \
287cdf0e10cSrcweir    ICE \
288cdf0e10cSrcweir	z
289cdf0e10cSrcweir
290cdf0e10cSrcweirgb_Library_FILENAMES := \
291cdf0e10cSrcweir	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \
292cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
293cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
294cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
295cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \
296cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \
297cdf0e10cSrcweir	$(foreach lib,$(gb_Library_STLLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_STLEXT)) \
298cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \
299cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \
300cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(gb_Library_UNOVERPRE)$(lib)$(gb_Library_PLAINEXT)) \
301cdf0e10cSrcweir
302cdf0e10cSrcweir
303cdf0e10cSrcweirgb_Library_LAYER := \
304cdf0e10cSrcweir	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \
305cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \
306cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \
307cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \
308cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \
309cdf0e10cSrcweir	$(foreach lib,$(gb_Library_STLLIBS),$(lib):URELIB) \
310cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \
311cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \
312cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \
313cdf0e10cSrcweir
314cdf0e10cSrcweirdefine gb_Library_get_rpath
315cdf0e10cSrcweir'-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1)))' \
316cdf0e10cSrcweir'-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)'
317cdf0e10cSrcweirendef
318cdf0e10cSrcweir
319cdf0e10cSrcweirdefine gb_Library_Library_platform
320cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Library_get_rpath,$(1))
321cdf0e10cSrcweir
322cdf0e10cSrcweirendef
323cdf0e10cSrcweir
324cdf0e10cSrcweir
325cdf0e10cSrcweir# StaticLibrary class
326cdf0e10cSrcweir
327cdf0e10cSrcweirgb_StaticLibrary_DEFS :=
328cdf0e10cSrcweirgb_StaticLibrary_SYSPRE := lib
329cdf0e10cSrcweirgb_StaticLibrary_PLAINEXT := .a
330cdf0e10cSrcweirgb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT)
331cdf0e10cSrcweir
332cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := \
333cdf0e10cSrcweir	$(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \
334cdf0e10cSrcweir	$(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \
335cdf0e10cSrcweir
336cdf0e10cSrcweirgb_StaticLibrary_StaticLibrary_platform =
337cdf0e10cSrcweir
338cdf0e10cSrcweir
339cdf0e10cSrcweir# Executable class
340cdf0e10cSrcweir
341cdf0e10cSrcweirgb_Executable_EXT :=
342cdf0e10cSrcweir
343cdf0e10cSrcweirgb_Executable_LAYER := \
344cdf0e10cSrcweir	$(foreach exe,$(gb_Executable_UREBIN),$(exe):UREBIN) \
345cdf0e10cSrcweir	$(foreach exe,$(gb_Executable_SDK),$(exe):SDKBIN) \
346cdf0e10cSrcweir	$(foreach exe,$(gb_Executable_OOO),$(exe):OOO) \
347cdf0e10cSrcweir	$(foreach exe,$(gb_Executable_BRAND),$(exe):BRAND) \
348cdf0e10cSrcweir	$(foreach exe,$(gb_Executable_NONE),$(exe):NONEBIN) \
349cdf0e10cSrcweir
350cdf0e10cSrcweir
351cdf0e10cSrcweirdefine gb_Executable_get_rpath
352cdf0e10cSrcweir'-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))' \
353cdf0e10cSrcweir-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)
354cdf0e10cSrcweirendef
355cdf0e10cSrcweir
356cdf0e10cSrcweirdefine gb_Executable_Executable_platform
357cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Executable_get_rpath,$(1))
358cdf0e10cSrcweir
359cdf0e10cSrcweirendef
360cdf0e10cSrcweir
361cdf0e10cSrcweir
362cdf0e10cSrcweir# CppunitTest class
363cdf0e10cSrcweir
364cdf0e10cSrcweirgb_CppunitTest_CPPTESTPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib
365cdf0e10cSrcweirgb_CppunitTest_SYSPRE := libtest_
366cdf0e10cSrcweirgb_CppunitTest_EXT := .so
367cdf0e10cSrcweirgb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT)
368cdf0e10cSrcweirgb_CppunitTest_get_libfilename = $(gb_CppunitTest_get_filename)
369cdf0e10cSrcweir
370cdf0e10cSrcweirdefine gb_CppunitTest_CppunitTest_platform
371cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) : RPATH :=
372cdf0e10cSrcweir
373cdf0e10cSrcweirendef
374cdf0e10cSrcweir
375cdf0e10cSrcweir# JunitTest class
376cdf0e10cSrcweir
377cdf0e10cSrcweirdefine gb_JunitTest_JunitTest_platform
378cdf0e10cSrcweir$(call gb_JunitTest_get_target,$(1)) : DEFS := \
379cdf0e10cSrcweir	-Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(OUTDIR)/installation/opt/openoffice.org3/program/soffice}" \
380cdf0e10cSrcweir    -Dorg.openoffice.test.arg.env=LD_LIBRARY_PATH \
381cdf0e10cSrcweir    -Dorg.openoffice.test.arg.user=file://$(call gb_JunitTest_get_userdir,$(1)) \
382cdf0e10cSrcweir
383cdf0e10cSrcweirendef
384cdf0e10cSrcweir
385cdf0e10cSrcweir# SdiTarget class
386cdf0e10cSrcweir
387cdf0e10cSrcweirgb_SdiTarget_SVIDLPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib
388cdf0e10cSrcweir
389cdf0e10cSrcweir# SrsPartMergeTarget
390cdf0e10cSrcweir
391cdf0e10cSrcweirgb_SrsPartMergeTarget_TRANSEXPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib
392cdf0e10cSrcweir
393cdf0e10cSrcweir# SrsPartTarget class
394cdf0e10cSrcweir
395cdf0e10cSrcweirgb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc
396cdf0e10cSrcweirgb_SrsPartTarget_RSCCOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
397cdf0e10cSrcweir
398cdf0e10cSrcweirdefine gb_SrsPartTarget__command_dep
399cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\
400cdf0e10cSrcweir	$(gb_GCCP) \
401cdf0e10cSrcweir		-MM -MT $(call gb_SrsPartTarget_get_target,$(1)) \
402cdf0e10cSrcweir		$(INCLUDE) \
403cdf0e10cSrcweir		$(DEFS) \
404cdf0e10cSrcweir		-c -x c++-header $(2) \
405cdf0e10cSrcweir		-o $(call gb_SrsPartTarget_get_dep_target,$(1)))
406cdf0e10cSrcweirendef
407cdf0e10cSrcweir
408cdf0e10cSrcweir
409cdf0e10cSrcweir# ComponentTarget
410cdf0e10cSrcweir
411cdf0e10cSrcweirgb_XSLTPROCPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib
412cdf0e10cSrcweirgb_Library_COMPONENTPREFIXES := \
413cdf0e10cSrcweir    OOO:vnd.sun.star.expand:\dOOO_BASE_DIR/program/ \
414cdf0e10cSrcweir    URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \
415cdf0e10cSrcweir
416cdf0e10cSrcweir
417cdf0e10cSrcweir# vim: set noet sw=4 ts=4:
418