xref: /aoo41x/main/solenv/gbuild/platform/macosx.mk (revision 746748b1)
17871dc3eSAndrew Rist#**************************************************************
27871dc3eSAndrew Rist#
37871dc3eSAndrew Rist#  Licensed to the Apache Software Foundation (ASF) under one
47871dc3eSAndrew Rist#  or more contributor license agreements.  See the NOTICE file
57871dc3eSAndrew Rist#  distributed with this work for additional information
67871dc3eSAndrew Rist#  regarding copyright ownership.  The ASF licenses this file
77871dc3eSAndrew Rist#  to you under the Apache License, Version 2.0 (the
87871dc3eSAndrew Rist#  "License"); you may not use this file except in compliance
97871dc3eSAndrew Rist#  with the License.  You may obtain a copy of the License at
107871dc3eSAndrew Rist#
117871dc3eSAndrew Rist#    http://www.apache.org/licenses/LICENSE-2.0
127871dc3eSAndrew Rist#
137871dc3eSAndrew Rist#  Unless required by applicable law or agreed to in writing,
147871dc3eSAndrew Rist#  software distributed under the License is distributed on an
157871dc3eSAndrew Rist#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
167871dc3eSAndrew Rist#  KIND, either express or implied.  See the License for the
177871dc3eSAndrew Rist#  specific language governing permissions and limitations
187871dc3eSAndrew Rist#  under the License.
197871dc3eSAndrew Rist#
207871dc3eSAndrew Rist#**************************************************************
217871dc3eSAndrew Rist
227871dc3eSAndrew Rist
23cdf0e10cSrcweir
24cdf0e10cSrcweirGUI := UNX
251e1ac450SHerbert DürrCOM := S5ABI
261e1ac450SHerbert DürrCOMID := s5abi
276d1ed1ddSHerbert Dürr#COM := S5ABI
286d1ed1ddSHerbert Dürr#COMID := s5abi
29cdf0e10cSrcweir
30cdf0e10cSrcweir# Darwin mktemp -t expects a prefix, not a pattern
31cdf0e10cSrcweirgb_MKTEMP ?= /usr/bin/mktemp -t gbuild.
32cdf0e10cSrcweir
33cdf0e10cSrcweirgb_CC := cc
34cdf0e10cSrcweirgb_CXX := g++
35cdf0e10cSrcweirgb_GCCP := gcc
36cdf0e10cSrcweirgb_AR := ar
37cdf0e10cSrcweirgb_AWK := awk
38cdf0e10cSrcweirgb_CLASSPATHSEP := :
39cdf0e10cSrcweir
40cdf0e10cSrcweir# use CC/CXX if they are nondefaults
41cdf0e10cSrcweirifneq ($(origin CC),default)
42cdf0e10cSrcweirgb_CC := $(CC)
43cdf0e10cSrcweirgb_GCCP := $(CC)
44cdf0e10cSrcweirendif
45cdf0e10cSrcweirifneq ($(origin CXX),default)
46cdf0e10cSrcweirgb_CXX := $(CXX)
47cdf0e10cSrcweirendif
48cdf0e10cSrcweir
49cdf0e10cSrcweirgb_OSDEFS := \
50cdf0e10cSrcweir	-D$(OS) \
51cdf0e10cSrcweir	-D_PTHREADS \
52cdf0e10cSrcweir	-DUNIX \
53cdf0e10cSrcweir	-DUNX \
54cdf0e10cSrcweir	-D_REENTRANT \
55cdf0e10cSrcweir	-DNO_PTHREAD_PRIORITY \
56cdf0e10cSrcweir	-DQUARTZ \
57cdf0e10cSrcweir	$(EXTRA_CDEFS) \
58cdf0e10cSrcweir
59cdf0e10cSrcweirgb_COMPILERDEFS := \
60cdf0e10cSrcweir	-D$(COM) \
61cdf0e10cSrcweir	-DHAVE_GCC_VISIBILITY_FEATURE \
62*746748b1SJim Jagielski	-DCPPU_ENV=$(COMID)
63*746748b1SJim Jagielski#	-DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) \
64cdf0e10cSrcweir
65cdf0e10cSrcweirifeq ($(CPUNAME),POWERPC)
66cdf0e10cSrcweirgb_CPUDEFS := -DPOWERPC -DPPC
673d82938aSHerbert Dürrelse ifeq ($(CPUNAME),INTEL)
68cdf0e10cSrcweirgb_CPUDEFS := -DX86
693d82938aSHerbert Dürrelse ifeq ($(CPUNAME),X86_64)
703d82938aSHerbert Dürrgb_CPUDEFS := -DX86_64
71cdf0e10cSrcweirendif
72cdf0e10cSrcweir
73cdf0e10cSrcweirifeq ($(strip $(SYSBASE)),)
7461a3a0ffSHerbert Dürr	gb_SDKDIR := $(MACOSX_SDK_PATH)
75cdf0e10cSrcweirelse
7661a3a0ffSHerbert Dürr	gb_SDKDIR := $(SYSBASE)/MacOSX$(MACOSX_DEPLOYMENT_TARGET).sdk
77cdf0e10cSrcweirendif
78cdf0e10cSrcweir
79cdf0e10cSrcweir
80cdf0e10cSrcweirgb_CFLAGS := \
81cdf0e10cSrcweir	-isysroot $(gb_SDKDIR) \
82cdf0e10cSrcweir	-Wall \
83cdf0e10cSrcweir	-Wendif-labels \
84cdf0e10cSrcweir	-Wextra \
85cdf0e10cSrcweir	-Wshadow \
86cdf0e10cSrcweir	-fPIC \
87cdf0e10cSrcweir	-fmessage-length=0 \
88cdf0e10cSrcweir	-fno-common \
89cdf0e10cSrcweir	-fno-strict-aliasing \
90cdf0e10cSrcweir	-pipe \
91cdf0e10cSrcweir
92cdf0e10cSrcweirgb_CXXFLAGS := \
93cdf0e10cSrcweir	-isysroot $(gb_SDKDIR) \
94cdf0e10cSrcweir	-Wall \
95cdf0e10cSrcweir	-Wendif-labels \
96cdf0e10cSrcweir	-Wextra \
97cdf0e10cSrcweir	-Wno-ctor-dtor-privacy \
98cdf0e10cSrcweir	-Wno-non-virtual-dtor \
99cdf0e10cSrcweir	-fPIC \
100cdf0e10cSrcweir	-fmessage-length=0 \
101cdf0e10cSrcweir	-fno-common \
102cdf0e10cSrcweir	-fno-strict-aliasing \
103cdf0e10cSrcweir	-fsigned-char \
1043d82938aSHerbert Dürr	-pipe
105cdf0e10cSrcweir
1061e1ac450SHerbert Dürrifneq ($(COM),GCC)
1071e1ac450SHerbert Dürr	gb_CXXFLAGS += -DHAVE_STL_INCLUDE_PATH -I../v1/
1081e1ac450SHerbert Dürrendif
1091e1ac450SHerbert Dürr
110*746748b1SJim Jagielskiifeq ($(MACOSX_DEPLOYMENT_TARGET),$(filter $(MACOSX_DEPLOYMENT_TARGET), 10.7 10.8))
111*746748b1SJim Jagielski       gb_CXXFLAGS += -std=c++11 -stdlib=libc++
112*746748b1SJim Jagielski       gb_macos_LDFLAGS := -std=c++11 -stdlib=libc++
113*746748b1SJim Jagielskiendif
114*746748b1SJim Jagielski
115cdf0e10cSrcweir# these are to get g++ to switch to Objective-C++ mode
116cdf0e10cSrcweir# (see toolkit module for a case where it is necessary to do it this way)
117cdf0e10cSrcweirgb_OBJCXXFLAGS := -x objective-c++ -fobjc-exceptions
118*746748b1SJim Jagielskigb_OBJCFLAGS := -x objective-c -fobjc-exceptions
119cdf0e10cSrcweir
12033b74116SHerbert Dürrifneq ($(MACOSX_DEPLOYMENT_TARGET),)
12133b74116SHerbert Dürr	gb_CXXFLAGS += -DMAC_OS_X_VERSION_MAX_ALLOWED=MAC_OS_X_VERSION_$(subst .,_,$(MACOSX_DEPLOYMENT_TARGET))
12233b74116SHerbert Dürrendif
12333b74116SHerbert Dürr
124cdf0e10cSrcweirifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
125e0ac9675SJim Jagielskigb_CFLAGS_WERROR := -Werror -Wno-error=deprecated
126e0ac9675SJim Jagielskigb_CXXFLAGS_WERROR := -Werror -Wno-error=deprecated
127cdf0e10cSrcweirendif
128cdf0e10cSrcweir
129cdf0e10cSrcweirgb_LinkTarget_EXCEPTIONFLAGS := \
130cdf0e10cSrcweir	-DEXCEPTIONS_ON \
1313d82938aSHerbert Dürr	-fexceptions
1323d82938aSHerbert Dürr
1333d82938aSHerbert Dürrifeq ($(COM),GCC)
1343d82938aSHerbert Dürr    gb_LinkTarget_EXCEPTIONFLAGS += -fno-enforce-eh-specs
1353d82938aSHerbert Dürrendif
136cdf0e10cSrcweir
137cdf0e10cSrcweirgb_LinkTarget_NOEXCEPTIONFLAGS := \
138cdf0e10cSrcweir	-DEXCEPTIONS_OFF \
1393d82938aSHerbert Dürr	-fno-exceptions
140cdf0e10cSrcweir
141cdf0e10cSrcweirgb_LinkTarget_LDFLAGS := \
142cdf0e10cSrcweir	-Wl,-syslibroot,$(gb_SDKDIR) \
143cdf0e10cSrcweir	$(subst -L../lib , ,$(SOLARLIB)) \
144cdf0e10cSrcweir#man ld says: obsolete	-Wl,-multiply_defined,suppress \
145cdf0e10cSrcweir
146cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2)
147cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -O0
148cdf0e10cSrcweirelse
149cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -O2
150cdf0e10cSrcweirendif
151cdf0e10cSrcweir
152cdf0e10cSrcweirgb_COMPILERNOOPTFLAGS := -O0
153cdf0e10cSrcweir
154cdf0e10cSrcweir# Helper class
155cdf0e10cSrcweir
156cdf0e10cSrcweirgb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs)
157cdf0e10cSrcweir
158cdf0e10cSrcweir# convert parametters filesystem root to native notation
159cdf0e10cSrcweir# does some real work only on windows, make sure not to
160cdf0e10cSrcweir# break the dummy implementations on unx*
161cdf0e10cSrcweirdefine gb_Helper_convert_native
162cdf0e10cSrcweir$(1)
163cdf0e10cSrcweirendef
164cdf0e10cSrcweir
165cdf0e10cSrcweir
166cdf0e10cSrcweir# CObject class
167cdf0e10cSrcweir
168cdf0e10cSrcweirdefine gb_CObject__command
169cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),C  ,3)
170cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\
171cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
172cdf0e10cSrcweir	mkdir -p $(dir $(call gb_CObject_get_dep_target,$(2))) && \
173cdf0e10cSrcweir	$(gb_CC) \
174cdf0e10cSrcweir		$(DEFS) $(CFLAGS) \
175cdf0e10cSrcweir		-c $(3) \
176cdf0e10cSrcweir		-o $(1) \
177cdf0e10cSrcweir		-MMD -MT $(call gb_CObject_get_target,$(2)) \
178cdf0e10cSrcweir		-MF $(call gb_CObject_get_dep_target,$(2)) \
179cdf0e10cSrcweir		-I$(dir $(3)) \
180cdf0e10cSrcweir		$(INCLUDE))
181cdf0e10cSrcweirendef
182cdf0e10cSrcweir
183cdf0e10cSrcweir
184cdf0e10cSrcweir# CxxObject class
185cdf0e10cSrcweir
186cdf0e10cSrcweir# N.B: $(CXXFLAGS) may contain -x objective-c++, which must come before -c
187cdf0e10cSrcweirdefine gb_CxxObject__command
188cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),CXX,3)
189cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\
190cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
191cdf0e10cSrcweir	mkdir -p $(dir $(call gb_CxxObject_get_dep_target,$(2))) && \
192cdf0e10cSrcweir	$(gb_CXX) \
193cdf0e10cSrcweir		$(DEFS) $(CXXFLAGS) \
194cdf0e10cSrcweir		-c $(3) \
195cdf0e10cSrcweir		-o $(1) \
196cdf0e10cSrcweir		-MMD -MT $(call gb_CxxObject_get_target,$(2)) \
197cdf0e10cSrcweir		-MF $(call gb_CxxObject_get_dep_target,$(2)) \
198cdf0e10cSrcweir		-I$(dir $(3)) \
199cdf0e10cSrcweir		$(INCLUDE_STL) $(INCLUDE))
200cdf0e10cSrcweirendef
201cdf0e10cSrcweir
202cdf0e10cSrcweir
203cdf0e10cSrcweir# ObjCxxObject class
204cdf0e10cSrcweir
205cdf0e10cSrcweirdefine gb_ObjCxxObject__command
206cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),OCX,3)
207cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\
208cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
209cdf0e10cSrcweir	mkdir -p $(dir $(call gb_ObjCxxObject_get_dep_target,$(2))) && \
210cdf0e10cSrcweir	$(gb_CXX) \
211cdf0e10cSrcweir		$(DEFS) $(OBJCXXFLAGS) \
212cdf0e10cSrcweir		-c $(3) \
213cdf0e10cSrcweir		-o $(1) \
214cdf0e10cSrcweir		-MMD -MT $(call gb_ObjCxxObject_get_target,$(2)) \
215cdf0e10cSrcweir		-MF $(call gb_ObjCxxObject_get_dep_target,$(2)) \
216cdf0e10cSrcweir		-I$(dir $(3)) \
217cdf0e10cSrcweir		$(INCLUDE_STL) $(INCLUDE))
218cdf0e10cSrcweirendef
219cdf0e10cSrcweir
220cdf0e10cSrcweir
221cdf0e10cSrcweir# LinkTarget class
222cdf0e10cSrcweir
223cdf0e10cSrcweirdefine gb_LinkTarget__get_rpath_for_layer
224cdf0e10cSrcweir$(patsubst $(1):%,%,$(filter $(1):%,$(gb_LinkTarget__RPATHS)))
225cdf0e10cSrcweirendef
226cdf0e10cSrcweir
227cdf0e10cSrcweirgb_LinkTarget__RPATHS := \
228cdf0e10cSrcweir	URELIB:@__________________________________________________URELIB/ \
229cdf0e10cSrcweir	UREBIN: \
230cdf0e10cSrcweir	OOO:@__________________________________________________OOO/ \
231cdf0e10cSrcweir	BRAND: \
232cdf0e10cSrcweir	SDKBIN: \
233cdf0e10cSrcweir	NONEBIN: \
234cdf0e10cSrcweir
235cdf0e10cSrcweirdefine gb_LinkTarget__get_installname
236cdf0e10cSrcweir$(if $(2),-install_name '$(2)$(1)',)
237cdf0e10cSrcweirendef
238cdf0e10cSrcweir
239cdf0e10cSrcweirgb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS)
240cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR)
241cdf0e10cSrcweirgb_LinkTarget_OBJCXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR) $(gb_OBJCXXFLAGS) $(gb_COMPILEROPTFLAGS)
242cdf0e10cSrcweir
243cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2)
244cdf0e10cSrcweirgb_LinkTarget_CFLAGS += -g
245cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS += -g
246cdf0e10cSrcweirgb_LinkTarget_OBJCXXFLAGS += -g
247cdf0e10cSrcweirendif
248cdf0e10cSrcweir
249cdf0e10cSrcweirgb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC)))
250cdf0e10cSrcweirgb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC)))
251cdf0e10cSrcweir
252cdf0e10cSrcweir# FIXME framework handling very hackish
253cdf0e10cSrcweirdefine gb_LinkTarget__get_liblinkflags
254cdf0e10cSrcweir$(patsubst lib%.dylib,-l%,$(foreach lib,$(filter-out $(gb_Library__FRAMEWORKS),$(1)),$(call gb_Library_get_filename,$(lib)))) \
255cdf0e10cSrcweir$(addprefix -framework ,$(filter $(gb_Library__FRAMEWORKS),$(1)))
256cdf0e10cSrcweirendef
257cdf0e10cSrcweir
258cdf0e10cSrcweirdefine gb_LinkTarget__get_layer
259cdf0e10cSrcweir$(if $(filter Executable,$(1)),\
260cdf0e10cSrcweir	$$(call gb_Executable_get_layer,$(2)),\
261cdf0e10cSrcweir	$$(call gb_Library_get_layer,$(2)))
262cdf0e10cSrcweirendef
263cdf0e10cSrcweir
264cdf0e10cSrcweir# FIXME the DYLIB_FILE mess is only necessary because
265cdf0e10cSrcweir# solver layout is different from installation layout
266cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclink
267cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\
268cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
269cdf0e10cSrcweir	DYLIB_FILE=`$(gb_MKTEMP)` && \
270cdf0e10cSrcweir	$(PERL) $(SOLARENV)/bin/macosx-dylib-link-list.pl \
271cdf0e10cSrcweir		$(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
272cdf0e10cSrcweir		$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
273cdf0e10cSrcweir		$(subst \d,$$,$(RPATH)) $(LDFLAGS) \
274058e255aSJürgen Schmidt		$(patsubst lib%.dylib,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) \
27544c25570SAndre Fischer		$(patsubst %,-l%,$(EXTERNAL_LIBS)) \
27644c25570SAndre Fischer		> $${DYLIB_FILE} && \
277cdf0e10cSrcweir	$(gb_CXX) \
278cdf0e10cSrcweir		$(if $(filter Executable,$(TARGETTYPE)),$(gb_Executable_TARGETTYPEFLAGS)) \
279cdf0e10cSrcweir		$(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \
280cdf0e10cSrcweir		$(subst \d,$$,$(RPATH)) $(LDFLAGS) \
281cdf0e10cSrcweir		$(call gb_LinkTarget__get_liblinkflags,$(LINKED_LIBS)) \
282cdf0e10cSrcweir		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
283cdf0e10cSrcweir		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
284cdf0e10cSrcweir		$(foreach object,$(OBJCXXOBJECTS),$(call gb_ObjCxxObject_get_target,$(object))) \
285cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
286cdf0e10cSrcweir		$(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \
287cdf0e10cSrcweir		-o $(1) \
288cdf0e10cSrcweir		`cat $${DYLIB_FILE}` && \
289cdf0e10cSrcweir	$(if $(filter Library CppunitTest,$(TARGETTYPE)),\
290cdf0e10cSrcweir		$(PERL) $(SOLARENV)/bin/macosx-change-install-names.pl Library $(LAYER) $(1) && \
291cdf0e10cSrcweir		ln -sf $(1) $(patsubst %.dylib,%.jnilib,$(1)) &&) \
292cdf0e10cSrcweir	rm -f $${DYLIB_FILE})
293cdf0e10cSrcweirendef
294cdf0e10cSrcweir
295cdf0e10cSrcweir# parameters: 1-linktarget 2-cobjects 3-cxxobjects
296cdf0e10cSrcweirdefine gb_LinkTarget__command_staticlink
297cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\
298cdf0e10cSrcweir	mkdir -p $(dir $(1)) && \
299cdf0e10cSrcweir	$(gb_AR) -rsu $(1) \
300cdf0e10cSrcweir		$(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \
301cdf0e10cSrcweir		$(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \
302cdf0e10cSrcweir		$(foreach object,$(OBJCXXOBJECTS),$(call gb_ObjCxxObject_get_target,$(object))) \
303cdf0e10cSrcweir		$(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \
304cdf0e10cSrcweir		2> /dev/null)
305cdf0e10cSrcweirendef
306cdf0e10cSrcweir
307cdf0e10cSrcweirdefine gb_LinkTarget__command
308cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4)
309cdf0e10cSrcweir$(if $(filter Library CppunitTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclink,$(1),$(2)))
310cdf0e10cSrcweir$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlink,$(1)))
311cdf0e10cSrcweirendef
312cdf0e10cSrcweir
313cdf0e10cSrcweir
314cdf0e10cSrcweir# Library class
315cdf0e10cSrcweir
316cdf0e10cSrcweirgb_Library_DEFS :=
317cdf0e10cSrcweirgb_Library_TARGETTYPEFLAGS := -dynamiclib -single_module
318cdf0e10cSrcweirgb_Library_SYSPRE := lib
319cdf0e10cSrcweirgb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_
320cdf0e10cSrcweirgb_Library_PLAINEXT := .dylib
3213d82938aSHerbert Dürrgb_Library_RTEXT := $(COMID)$(gb_Library_PLAINEXT)
322cdf0e10cSrcweir
3235f9a7a39SHerbert Dürrgb_Library_OOOEXT := $(gb_Library_PLAINEXT)
324cdf0e10cSrcweirgb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT)
325cdf0e10cSrcweir
326cdf0e10cSrcweirgb_Library__FRAMEWORKS := \
327cdf0e10cSrcweir	Cocoa \
328cdf0e10cSrcweir
329cdf0e10cSrcweirgb_Library_PLAINLIBS_NONE += \
330cdf0e10cSrcweir	Cocoa \
331cdf0e10cSrcweir	objc \
332cdf0e10cSrcweir	jpeg \
333cdf0e10cSrcweir	m \
334cdf0e10cSrcweir	pthread \
335cdf0e10cSrcweir	z \
336828da808SPedro Giffuni	cppunit
337cdf0e10cSrcweir
338cdf0e10cSrcweirgb_Library_FILENAMES := \
339cdf0e10cSrcweir	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \
340cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
341cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
342cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \
343cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \
344cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \
345cdf0e10cSrcweir	$(foreach lib,$(gb_Library_STLLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_STLEXT)) \
346cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \
347cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \
348cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(gb_Library_UNOVERPRE)$(lib)$(gb_Library_PLAINEXT)) \
349cdf0e10cSrcweir
350cdf0e10cSrcweir
351cdf0e10cSrcweirgb_Library_LAYER := \
352cdf0e10cSrcweir	$(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \
353cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \
354cdf0e10cSrcweir	$(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \
355cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \
356cdf0e10cSrcweir	$(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \
357cdf0e10cSrcweir	$(foreach lib,$(gb_Library_STLLIBS),$(lib):URELIB) \
358cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \
359cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \
360cdf0e10cSrcweir	$(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \
361cdf0e10cSrcweir
362cdf0e10cSrcweirdefine gb_Library_get_rpath
363cdf0e10cSrcweir$(call gb_LinkTarget__get_installname,$(call gb_Library_get_filename,$(1)),$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1))))
364cdf0e10cSrcweirendef
365cdf0e10cSrcweir
366cdf0e10cSrcweirdefine gb_Library_Library_platform
367cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Library_get_rpath,$(1))
368cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) : LAYER := $(call gb_Library_get_layer,$(1))
369cdf0e10cSrcweir
370cdf0e10cSrcweirendef
371cdf0e10cSrcweir
372cdf0e10cSrcweir
373cdf0e10cSrcweir# StaticLibrary class
374cdf0e10cSrcweir
375cdf0e10cSrcweirgb_StaticLibrary_DEFS :=
376cdf0e10cSrcweirgb_StaticLibrary_SYSPRE := lib
377cdf0e10cSrcweirgb_StaticLibrary_PLAINEXT := .a
378cdf0e10cSrcweirgb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT)
379cdf0e10cSrcweir
380cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := \
381cdf0e10cSrcweir	$(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \
382cdf0e10cSrcweir	$(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \
383cdf0e10cSrcweir
384cdf0e10cSrcweirgb_StaticLibrary_StaticLibrary_platform =
385cdf0e10cSrcweir
386cdf0e10cSrcweir
387cdf0e10cSrcweir# Executable class
388cdf0e10cSrcweir
389cdf0e10cSrcweirgb_Executable_EXT :=
390cdf0e10cSrcweirgb_Executable_TARGETTYPEFLAGS := -bind_at_load
391cdf0e10cSrcweir
392cdf0e10cSrcweirgb_Executable_LAYER := \
393cdf0e10cSrcweir	$(foreach exe,$(gb_Executable_UREBIN),$(exe):UREBIN) \
394cdf0e10cSrcweir	$(foreach exe,$(gb_Executable_SDK),$(exe):SDKBIN) \
395cdf0e10cSrcweir	$(foreach exe,$(gb_Executable_OOO),$(exe):OOO) \
396cdf0e10cSrcweir	$(foreach exe,$(gb_Executable_BRAND),$(exe):BRAND) \
397cdf0e10cSrcweir	$(foreach exe,$(gb_Executable_NONE),$(exe):NONEBIN) \
398cdf0e10cSrcweir
399cdf0e10cSrcweir
400cdf0e10cSrcweirdefine gb_Executable_get_rpath
401cdf0e10cSrcweir$(call gb_LinkTarget__get_installname,$(1),$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1))))
402cdf0e10cSrcweirendef
403cdf0e10cSrcweir
404cdf0e10cSrcweirdefine gb_Executable_Executable_platform
405cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Executable_get_rpath,$(1))
406cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) : LAYER := $(call gb_Executable_get_layer,$(1))
407cdf0e10cSrcweir
408cdf0e10cSrcweirendef
409cdf0e10cSrcweir
410cdf0e10cSrcweir
411cdf0e10cSrcweir# CppunitTest class
412cdf0e10cSrcweir
413cdf0e10cSrcweirgb_CppunitTest_CPPTESTPRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib
414cdf0e10cSrcweirgb_CppunitTest_SYSPRE := libtest_
415cdf0e10cSrcweirgb_CppunitTest_EXT := .dylib
416cdf0e10cSrcweirgb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT)
417cdf0e10cSrcweirgb_CppunitTest_get_libfilename = $(gb_CppunitTest_get_filename)
418cdf0e10cSrcweir
419cdf0e10cSrcweirdefine gb_CppunitTest_CppunitTest_platform
420cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) : RPATH :=
421cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) : LAYER := NONE
422cdf0e10cSrcweir
423cdf0e10cSrcweirendef
424cdf0e10cSrcweir
425cdf0e10cSrcweir# JunitTest class
426cdf0e10cSrcweir
427cdf0e10cSrcweirdefine gb_JunitTest_JunitTest_platform
428cdf0e10cSrcweir$(call gb_JunitTest_get_target,$(1)) : DEFS := \
429cdf0e10cSrcweir	-Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(OUTDIR)/installation/opt/OpenOffice.org.app/Contents/MacOS/soffice}" \
430cdf0e10cSrcweir    -Dorg.openoffice.test.arg.env=DYLD_LIBRARY_PATH \
431cdf0e10cSrcweir    -Dorg.openoffice.test.arg.user=file://$(call gb_JunitTest_get_userdir,$(1)) \
432cdf0e10cSrcweir
433cdf0e10cSrcweirendef
434cdf0e10cSrcweir
435cdf0e10cSrcweir# SdiTarget class
436cdf0e10cSrcweir
437cdf0e10cSrcweirgb_SdiTarget_SVIDLPRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib
438cdf0e10cSrcweir
439cdf0e10cSrcweir# SrsPartMergeTarget
440cdf0e10cSrcweir
441cdf0e10cSrcweirgb_SrsPartMergeTarget_TRANSEXPRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib
442cdf0e10cSrcweir
443cdf0e10cSrcweir# SrsPartTarget class
444cdf0e10cSrcweir
445cdf0e10cSrcweirgb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc
446cdf0e10cSrcweirgb_SrsPartTarget_RSCCOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET)
447cdf0e10cSrcweir
448cdf0e10cSrcweirdefine gb_SrsPartTarget__command_dep
449cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\
450cdf0e10cSrcweir	$(gb_GCCP) \
451cdf0e10cSrcweir		-MM -MT $(call gb_SrsPartTarget_get_target,$(1)) \
452cdf0e10cSrcweir		$(INCLUDE) \
453cdf0e10cSrcweir		$(DEFS) \
454cdf0e10cSrcweir		-c -x c++-header $(2) \
455cdf0e10cSrcweir		-o $(call gb_SrsPartTarget_get_dep_target,$(1)))
456cdf0e10cSrcweirendef
457cdf0e10cSrcweir
458cdf0e10cSrcweir
459cdf0e10cSrcweir# ComponentTarget
460cdf0e10cSrcweir
461cdf0e10cSrcweirgb_XSLTPROCPRECOMMAND := DYLD_LIBRARY_PATH=$(OUTDIR)/lib
462cdf0e10cSrcweirgb_Library_COMPONENTPREFIXES := \
463cdf0e10cSrcweir    OOO:vnd.sun.star.expand:\dOOO_BASE_DIR/program/ \
464cdf0e10cSrcweir    URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \
465cdf0e10cSrcweir
466cdf0e10cSrcweir
467cdf0e10cSrcweir# vim: set noet sw=4 ts=4:
468