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