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