1ead13252SPedro Giffuni#************************************************************************* 2ead13252SPedro Giffuni# 37fcdd55bSPedro Giffuni# Licensed to the Apache Software Foundation (ASF) under one 47fcdd55bSPedro Giffuni# or more contributor license agreements. See the NOTICE file 57fcdd55bSPedro Giffuni# distributed with this work for additional information 67fcdd55bSPedro Giffuni# regarding copyright ownership. The ASF licenses this file 77fcdd55bSPedro Giffuni# to you under the Apache License, Version 2.0 (the 87fcdd55bSPedro Giffuni# "License"); you may not use this file except in compliance 97fcdd55bSPedro Giffuni# with the License. You may obtain a copy of the License at 107fcdd55bSPedro Giffuni# 117fcdd55bSPedro Giffuni# http://www.apache.org/licenses/LICENSE-2.0 127fcdd55bSPedro Giffuni# 137fcdd55bSPedro Giffuni# Unless required by applicable law or agreed to in writing, 147fcdd55bSPedro Giffuni# software distributed under the License is distributed on an 157fcdd55bSPedro Giffuni# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 167fcdd55bSPedro Giffuni# KIND, either express or implied. See the License for the 177fcdd55bSPedro Giffuni# specific language governing permissions and limitations 187fcdd55bSPedro Giffuni# under the License. 19ead13252SPedro Giffuni# 20ead13252SPedro Giffuni#************************************************************************* 21ead13252SPedro Giffuni 22ead13252SPedro GiffuniGUI := UNX 23ead13252SPedro Giffuni 2437816a14SPedro Giffuni# BSD mktemp -t expects a prefix, not a pattern 2537816a14SPedro Giffunigb_MKTEMP ?= /usr/bin/mktemp -t gbuild. 26ead13252SPedro Giffuni 27ead13252SPedro Giffunigb_CC := cc 288969592bSPedro Giffunigb_CXX := c++ 298969592bSPedro Giffunigb_GCCP := cc 30ead13252SPedro Giffunigb_AR := ar 31ead13252SPedro Giffunigb_AWK := awk 32ead13252SPedro Giffunigb_CLASSPATHSEP := : 33ead13252SPedro Giffuni 34ead13252SPedro Giffuni# normalize setsolar and configure env. 35ead13252SPedro Giffuniifeq ($(CPU),X) 36ead13252SPedro GiffuniCPUNAME := X86_64 37ead13252SPedro Giffuniendif 38ead13252SPedro Giffuni 39e15a4534Spfgifeq ($(CPU),P) 40e15a4534SpfgCPUNAME := POWERPC64 41e15a4534Spfgendif 42e15a4534Spfg 43ead13252SPedro Giffuni# use CC/CXX if they are nondefaults 44ead13252SPedro Giffuniifneq ($(origin CC),default) 45ead13252SPedro Giffunigb_CC := $(CC) 46ead13252SPedro Giffunigb_GCCP := $(CC) 47ead13252SPedro Giffuniendif 48ead13252SPedro Giffuniifneq ($(origin CXX),default) 49ead13252SPedro Giffunigb_CXX := $(CXX) 50ead13252SPedro Giffuniendif 51ead13252SPedro Giffuni 52ead13252SPedro Giffunigb_OSDEFS := \ 53ead13252SPedro Giffuni -D$(OS) \ 54ead13252SPedro Giffuni -D_PTHREADS \ 55ead13252SPedro Giffuni -DUNIX \ 56ead13252SPedro Giffuni -DUNX \ 57ead13252SPedro Giffuni $(PTHREAD_CFLAGS) \ 58ead13252SPedro Giffuni 59ead13252SPedro Giffuniifeq ($(GXX_INCLUDE_PATH),) 60ead13252SPedro GiffuniGXX_INCLUDE_PATH=$(COMPATH)/include/c++/$(shell gcc -dumpversion) 61ead13252SPedro Giffuniendif 62ead13252SPedro Giffuni 63ead13252SPedro Giffunigb_COMPILERDEFS := \ 64ead13252SPedro Giffuni -D$(COM) \ 65ead13252SPedro Giffuni -DHAVE_GCC_VISIBILITY_FEATURE \ 66ead13252SPedro Giffuni -DCPPU_ENV=gcc3 \ 67ead13252SPedro Giffuni -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) \ 68ead13252SPedro Giffuni 69ead13252SPedro Giffuniifeq ($(CPUNAME),X86_64) 70ead13252SPedro Giffunigb_CPUDEFS := -D$(CPUNAME) 71*8f07f855SDamjan Jovanovicelse ifeq ($(CPUNAME),POWERPC64) 72e15a4534Spfggb_CPUDEFS := -D$(CPUNAME) 73e15a4534Spfgelse 74*8f07f855SDamjan Jovanovicgb_CPUDEFS := -DX86 75e15a4534Spfgendif 76e15a4534Spfg 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 \ 103c25219e0SPedro Giffuni -pipe 104c25219e0SPedro Giffuniifeq ($(COM),CLANG) 105c25219e0SPedro Giffunigb_CXXFLAGS += -DHAVE_STL_INCLUDE_PATH 106c25219e0SPedro Giffunielse 107c25219e0SPedro Giffunigb_CXXFLAGS += -DBOOST_TR1_DISABLE_INCLUDE_NEXT -DBOOST_TR1_GCC_INCLUDE_PATH=c++ 108c25219e0SPedro Giffuniendif 109ead13252SPedro Giffuni 110ead13252SPedro Giffuniifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE) 111ead13252SPedro Giffunigb_CFLAGS_WERROR := -Werror 112ead13252SPedro Giffunigb_CXXFLAGS_WERROR := -Werror 113ead13252SPedro Giffuniendif 114ead13252SPedro Giffuni 115ead13252SPedro Giffuniifneq ($(strip $(SYSBASE)),) 11671df68dcSPedro Giffunigb_CXXFLAGS += --sysroot=$(SYSBASE) 11771df68dcSPedro Giffunigb_CFLAGS += --sysroot=$(SYSBASE) 11871df68dcSPedro Giffunigb_LinkTarget_LDFLAGS := -Wl,--sysroot=$(SYSBASE) 119ead13252SPedro Giffuniendif 120ead13252SPedro Giffunigb_LinkTarget_EXCEPTIONFLAGS := \ 121ead13252SPedro Giffuni -DEXCEPTIONS_ON \ 122c25219e0SPedro Giffuni -fexceptions 123c25219e0SPedro Giffuniifeq ($(COM),GCC) 124c25219e0SPedro Giffunigb_LinkTarget_EXCEPTIONFLAGS += -fno-enforce-eh-specs 125c25219e0SPedro Giffuniendif 126ead13252SPedro Giffuni 127ead13252SPedro Giffunigb_LinkTarget_NOEXCEPTIONFLAGS := \ 128ead13252SPedro Giffuni -DEXCEPTIONS_OFF \ 129ead13252SPedro Giffuni -fno-exceptions \ 130ead13252SPedro Giffuni 13171df68dcSPedro Giffunigb_LinkTarget_LDFLAGS += \ 13271df68dcSPedro Giffuni -Wl,-rpath-link,$(SYSBASE)/lib:$(SYSBASE)/usr/lib \ 133ead13252SPedro Giffuni -Wl,-z,combreloc \ 134ead13252SPedro Giffuni -Wl,-z,defs \ 135ead13252SPedro Giffuni $(subst -L../lib , ,$(SOLARLIB)) \ 136c25219e0SPedro Giffuni ${FBSD_GCC_RPATH} \ 137a8e4828dSPedro Giffuni \ 138ead13252SPedro Giffuni 139ead13252SPedro Giffuniifeq ($(HAVE_LD_HASH_STYLE),TRUE) 140ead13252SPedro Giffunigb_LinkTarget_LDFLAGS += \ 141ead13252SPedro Giffuni -Wl,--hash-style=both \ 142ead13252SPedro Giffuni 143ead13252SPedro Giffuniendif 144ead13252SPedro Giffuni 145ead13252SPedro Giffuniifneq ($(HAVE_LD_BSYMBOLIC_FUNCTIONS),) 146ead13252SPedro Giffunigb_LinkTarget_LDFLAGS += \ 147ead13252SPedro Giffuni -Wl,--dynamic-list-cpp-new \ 148ead13252SPedro Giffuni -Wl,--dynamic-list-cpp-typeinfo \ 149ead13252SPedro Giffuni -Wl,-Bsymbolic-functions \ 150ead13252SPedro Giffuni 151ead13252SPedro Giffuniendif 152ead13252SPedro Giffuni 153ead13252SPedro Giffuniifeq ($(gb_DEBUGLEVEL),2) 154ead13252SPedro Giffunigb_COMPILEROPTFLAGS := -O0 155ead13252SPedro Giffunielse 156ead13252SPedro Giffunigb_COMPILEROPTFLAGS := -Os 157ead13252SPedro Giffuniendif 158ead13252SPedro Giffuni 159ead13252SPedro Giffunigb_COMPILERNOOPTFLAGS := -O0 160ead13252SPedro Giffuni 161ead13252SPedro Giffuni# Helper class 162ead13252SPedro Giffuni 163ead13252SPedro Giffunigb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs) 164ead13252SPedro Giffuni 1651ff5b6ebSPedro Giffuni# convert parametters filesystem root to native notation 1661ff5b6ebSPedro Giffuni# does some real work only on windows, make sure not to 1671ff5b6ebSPedro Giffuni# break the dummy implementations on unx* 1681ff5b6ebSPedro Giffunidefine gb_Helper_convert_native 1691ff5b6ebSPedro Giffuni$(1) 1701ff5b6ebSPedro Giffuniendef 171ead13252SPedro Giffuni 172ead13252SPedro Giffuni# CObject class 173ead13252SPedro Giffuni 174b63233d8Sdamjan# $(call gb_CObject__command,object,relative-source,source,dep-file) 175ead13252SPedro Giffunidefine gb_CObject__command 176ead13252SPedro Giffuni$(call gb_Output_announce,$(2),$(true),C ,3) 177ead13252SPedro Giffuni$(call gb_Helper_abbreviate_dirs,\ 178b63233d8Sdamjan mkdir -p $(dir $(1)) $(dir $(4)) && \ 179ead13252SPedro Giffuni $(gb_CC) \ 180b63233d8Sdamjan $(DEFS) \ 181b63233d8Sdamjan $(T_CFLAGS) \ 182ead13252SPedro Giffuni -c $(3) \ 183ead13252SPedro Giffuni -o $(1) \ 184b63233d8Sdamjan -MMD -MT $(1) \ 185b63233d8Sdamjan -MF $(4) \ 186ead13252SPedro Giffuni -I$(dir $(3)) \ 187ead13252SPedro Giffuni $(INCLUDE)) 188ead13252SPedro Giffuniendef 189ead13252SPedro Giffuni 190a8e4828dSPedro Giffuni# convert parametters filesystem root to native notation 191a8e4828dSPedro Giffuni# does some real work only on windows, make sure not to 192a8e4828dSPedro Giffuni# break the dummy implementations on unx* 193a8e4828dSPedro Giffunidefine gb_Helper_convert_native 194a8e4828dSPedro Giffuni$(1) 195a8e4828dSPedro Giffuniendef 196ead13252SPedro Giffuni 197ead13252SPedro Giffuni# CxxObject class 198ead13252SPedro Giffuni 199b63233d8Sdamjan# $(call gb_CxxObject__command,object,relative-source,source,dep-file) 200ead13252SPedro Giffunidefine gb_CxxObject__command 201ead13252SPedro Giffuni$(call gb_Output_announce,$(2),$(true),CXX,3) 202ead13252SPedro Giffuni$(call gb_Helper_abbreviate_dirs,\ 203b63233d8Sdamjan mkdir -p $(dir $(1)) $(dir $(4)) && \ 204ead13252SPedro Giffuni $(gb_CXX) \ 205b63233d8Sdamjan $(DEFS) \ 206b63233d8Sdamjan $(T_CXXFLAGS) \ 207ead13252SPedro Giffuni -c $(3) \ 208ead13252SPedro Giffuni -o $(1) \ 209b63233d8Sdamjan -MMD -MT $(1) \ 210b63233d8Sdamjan -MF $(4) \ 211ead13252SPedro Giffuni -I$(dir $(3)) \ 212ead13252SPedro Giffuni $(INCLUDE_STL) $(INCLUDE)) 213ead13252SPedro Giffuniendef 214ead13252SPedro Giffuni 215ead13252SPedro Giffuni 216ead13252SPedro Giffuni# LinkTarget class 217ead13252SPedro Giffuni 218ead13252SPedro Giffunidefine gb_LinkTarget__get_rpath_for_layer 219ead13252SPedro Giffuni$(patsubst $(1):%,%,$(filter $(1):%,$(gb_LinkTarget__RPATHS))) 220ead13252SPedro Giffuniendef 221ead13252SPedro Giffuni 222ead13252SPedro Giffunigb_LinkTarget__RPATHS := \ 223ead13252SPedro Giffuni URELIB:\dORIGIN \ 224ead13252SPedro Giffuni UREBIN:\dORIGIN/../lib:\dORIGIN \ 225ead13252SPedro Giffuni OOO:\dORIGIN:\dORIGIN/../ure-link/lib \ 226ead13252SPedro Giffuni BRAND:\dORIGIN:\dORIGIN/../basis-link/program:\dORIGIN/../basis-link/ure-link/lib \ 227ead13252SPedro Giffuni SDKBIN:\dORIGIN/../../ure-link/lib \ 228ead13252SPedro Giffuni NONEBIN:\dORIGIN/../lib:\dORIGIN \ 229ead13252SPedro Giffuni 230b63233d8Sdamjangb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) 231ead13252SPedro Giffunigb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR) 232ead13252SPedro Giffuni 233a8e4828dSPedro Giffuniifeq ($(gb_DEBUGLEVEL),0) 234a8e4828dSPedro Giffunigb_LinkTarget_LDFLAGS += -Wl,-O1 235a8e4828dSPedro Giffuniendif 236a8e4828dSPedro Giffuni 237ead13252SPedro Giffuniifeq ($(gb_DEBUGLEVEL),2) 23858303369SDamjan Jovanovicifeq ($(COM),CLANG) 239b63233d8Sdamjangb_DEBUG_CFLAGS := -ggdb3 -fno-inline 24058303369SDamjan Jovanovicelse 241b63233d8Sdamjangb_DEBUG_CFLAGS := -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline 24258303369SDamjan Jovanovicendif 243ead13252SPedro Giffuniendif 244ead13252SPedro Giffuni 245ead13252SPedro Giffunigb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) 246ead13252SPedro Giffunigb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC))) 247ead13252SPedro Giffuni 248ead13252SPedro Giffunidefine gb_LinkTarget__command_dynamiclink 249ead13252SPedro Giffuni$(call gb_Helper_abbreviate_dirs,\ 250ead13252SPedro Giffuni mkdir -p $(dir $(1)) && \ 251ead13252SPedro Giffuni $(gb_CXX) \ 252dfce871fSDamjan Jovanovic $(if $(filter Library,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \ 253b63233d8Sdamjan $(subst \d,$$,$(RPATH)) \ 254b63233d8Sdamjan $(T_LDFLAGS) \ 255ead13252SPedro Giffuni $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 256ead13252SPedro Giffuni $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 257ead13252SPedro Giffuni $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 2589168f84aSdamjan -Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) -Wl$(COMMA)--end-group \ 2599168f84aSdamjan $(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) \ 2609168f84aSdamjan $(patsubst %,-l%,$(EXTERNAL_LIBS)) \ 261b63233d8Sdamjan $(LIBS) \ 262ead13252SPedro Giffuni -o $(1)) 263ead13252SPedro Giffuniendef 264ead13252SPedro Giffuni 265ead13252SPedro Giffunidefine gb_LinkTarget__command_staticlink 266ead13252SPedro Giffuni$(call gb_Helper_abbreviate_dirs,\ 267ead13252SPedro Giffuni mkdir -p $(dir $(1)) && \ 268ead13252SPedro Giffuni $(gb_AR) -rsu $(1) \ 269ead13252SPedro Giffuni $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 270ead13252SPedro Giffuni $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 271ead13252SPedro Giffuni $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 272ead13252SPedro Giffuni 2> /dev/null) 273ead13252SPedro Giffuniendef 274ead13252SPedro Giffuni 275ead13252SPedro Giffunidefine gb_LinkTarget__command 276ead13252SPedro Giffuni$(call gb_Output_announce,$(2),$(true),LNK,4) 277dfce871fSDamjan Jovanovic$(if $(filter Library GoogleTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclink,$(1))) 278ead13252SPedro Giffuni$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlink,$(1))) 279ead13252SPedro Giffuniendef 280ead13252SPedro Giffuni 281ead13252SPedro Giffuni 282ead13252SPedro Giffuni# Library class 283ead13252SPedro Giffuni 284ead13252SPedro Giffunigb_Library_DEFS := 285ead13252SPedro Giffunigb_Library_TARGETTYPEFLAGS := -shared -Wl,-z,noexecstack 286ead13252SPedro Giffunigb_Library_SYSPRE := lib 287ead13252SPedro Giffunigb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_ 288ead13252SPedro Giffunigb_Library_PLAINEXT := .so 289ead13252SPedro Giffunigb_Library_RTEXT := gcc3$(gb_Library_PLAINEXT) 290ead13252SPedro Giffuniifeq ($(gb_PRODUCT),$(true)) 291ead13252SPedro Giffunigb_Library_STLEXT := port_gcc$(gb_Library_PLAINEXT) 292ead13252SPedro Giffunielse 293ead13252SPedro Giffunigb_Library_STLEXT := port_gcc_stldebug$(gb_Library_PLAINEXT) 294ead13252SPedro Giffuniendif 295ead13252SPedro Giffuni 296ead13252SPedro Giffuniifeq ($(CPUNAME),X86_64) 2978969592bSPedro Giffunigb_Library_OOOEXT := $(gb_Library_PLAINEXT) 298ead13252SPedro Giffunigb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT) 299ead13252SPedro Giffunielse 3008969592bSPedro Giffunigb_Library_OOOEXT := $(gb_Library_PLAINEXT) 301ead13252SPedro Giffunigb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT) 302ead13252SPedro Giffuniendif 303ead13252SPedro Giffuni 304ead13252SPedro Giffunigb_Library_PLAINLIBS_NONE += \ 305b63233d8Sdamjan fontconfig \ 306b63233d8Sdamjan Xrender \ 307ead13252SPedro Giffuni dl \ 3081ff5b6ebSPedro Giffuni freetype \ 309ead13252SPedro Giffuni m \ 310ead13252SPedro Giffuni pthread \ 311ead13252SPedro Giffuni X11 \ 312828da808SPedro Giffuni Xext \ 313828da808SPedro Giffuni SM \ 314b63233d8Sdamjan ICE 315ead13252SPedro Giffuni 316ead13252SPedro Giffunigb_Library_FILENAMES := \ 317ead13252SPedro Giffuni $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \ 318ead13252SPedro Giffuni $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \ 319ead13252SPedro Giffuni $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \ 320ead13252SPedro Giffuni $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \ 321ead13252SPedro Giffuni $(foreach lib,$(gb_Library_RTLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \ 322ead13252SPedro Giffuni $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \ 323ead13252SPedro Giffuni $(foreach lib,$(gb_Library_STLLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_STLEXT)) \ 324ead13252SPedro Giffuni $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 325ead13252SPedro Giffuni $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 326ead13252SPedro Giffuni $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(gb_Library_UNOVERPRE)$(lib)$(gb_Library_PLAINEXT)) \ 327ead13252SPedro Giffuni 328ead13252SPedro Giffuni 329ead13252SPedro Giffunigb_Library_LAYER := \ 330ead13252SPedro Giffuni $(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \ 331ead13252SPedro Giffuni $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \ 332ead13252SPedro Giffuni $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \ 333ead13252SPedro Giffuni $(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \ 334ead13252SPedro Giffuni $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \ 335ead13252SPedro Giffuni $(foreach lib,$(gb_Library_STLLIBS),$(lib):URELIB) \ 336ead13252SPedro Giffuni $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \ 337ead13252SPedro Giffuni $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \ 338ead13252SPedro Giffuni $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \ 339ead13252SPedro Giffuni 340ead13252SPedro Giffunidefine gb_Library_get_rpath 341a8e4828dSPedro Giffuni-Wl,-z,origin '-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1)))' \ 34271df68dcSPedro Giffuni'-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)' 343ead13252SPedro Giffuniendef 344ead13252SPedro Giffuni 345ead13252SPedro Giffunidefine gb_Library_Library_platform 346ead13252SPedro Giffuni$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Library_get_rpath,$(1)) 347ead13252SPedro Giffuni 348ead13252SPedro Giffuniendef 349ead13252SPedro Giffuni 350ead13252SPedro Giffuni 351ead13252SPedro Giffuni# StaticLibrary class 352ead13252SPedro Giffuni 353ead13252SPedro Giffunigb_StaticLibrary_DEFS := 354ead13252SPedro Giffunigb_StaticLibrary_SYSPRE := lib 355ead13252SPedro Giffunigb_StaticLibrary_PLAINEXT := .a 356ead13252SPedro Giffunigb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT) 357ead13252SPedro Giffuni 358ead13252SPedro Giffunigb_StaticLibrary_FILENAMES := \ 359ead13252SPedro Giffuni $(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \ 360ead13252SPedro Giffuni $(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \ 361ead13252SPedro Giffuni 362ead13252SPedro Giffunigb_StaticLibrary_StaticLibrary_platform = 363ead13252SPedro Giffuni 364ead13252SPedro Giffuni 365ead13252SPedro Giffuni# Executable class 366ead13252SPedro Giffuni 367ead13252SPedro Giffunigb_Executable_EXT := 368ead13252SPedro Giffuni 369ead13252SPedro Giffunigb_Executable_LAYER := \ 370ead13252SPedro Giffuni $(foreach exe,$(gb_Executable_UREBIN),$(exe):UREBIN) \ 371ead13252SPedro Giffuni $(foreach exe,$(gb_Executable_SDK),$(exe):SDKBIN) \ 372ead13252SPedro Giffuni $(foreach exe,$(gb_Executable_OOO),$(exe):OOO) \ 373ead13252SPedro Giffuni $(foreach exe,$(gb_Executable_BRAND),$(exe):BRAND) \ 374ead13252SPedro Giffuni $(foreach exe,$(gb_Executable_NONE),$(exe):NONEBIN) \ 375ead13252SPedro Giffuni 376ead13252SPedro Giffuni 377ead13252SPedro Giffunidefine gb_Executable_get_rpath 378ead13252SPedro Giffuni'-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))' \ 379ead13252SPedro Giffuni-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION) 380ead13252SPedro Giffuniendef 381ead13252SPedro Giffuni 382ead13252SPedro Giffunidefine gb_Executable_Executable_platform 383ead13252SPedro Giffuni$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Executable_get_rpath,$(1)) 384ead13252SPedro Giffuni 385ead13252SPedro Giffuniendef 386ead13252SPedro Giffuni 387ead13252SPedro Giffuni 388e75d772dSDamjan Jovanovic# GoogleTest class 389e75d772dSDamjan Jovanovic 390e75d772dSDamjan Jovanovicgb_GoogleTest_GTESTPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib 391e75d772dSDamjan Jovanovicgb_GoogleTest_get_filename = $(1)$(gb_Executable_EXT) 392e75d772dSDamjan Jovanovic 393e75d772dSDamjan Jovanovicdefine gb_GoogleTest_GoogleTest_platform 394e75d772dSDamjan Jovanovic$(call gb_LinkTarget_get_target,$(2)) : RPATH := -Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION) 395e75d772dSDamjan Jovanovicendef 396e75d772dSDamjan Jovanovic 397ead13252SPedro Giffuni# JunitTest class 398ead13252SPedro Giffuni 399ead13252SPedro Giffunidefine gb_JunitTest_JunitTest_platform 400ead13252SPedro Giffuni$(call gb_JunitTest_get_target,$(1)) : DEFS := \ 40164c5c8b7SDamjan Jovanovic -Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(SRCDIR)/instsetoo_native/$(INPATH)/Apache_OpenOffice/installed/install/en-US/openoffice4/program/soffice}" \ 402ead13252SPedro Giffuni -Dorg.openoffice.test.arg.env=LD_LIBRARY_PATH \ 403ead13252SPedro Giffuni -Dorg.openoffice.test.arg.user=file://$(call gb_JunitTest_get_userdir,$(1)) \ 404ead13252SPedro Giffuni 405ead13252SPedro Giffuniendef 406ead13252SPedro Giffuni 407ead13252SPedro Giffuni# SdiTarget class 408ead13252SPedro Giffuni 409ead13252SPedro Giffunigb_SdiTarget_SVIDLPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib 410ead13252SPedro Giffuni 411ead13252SPedro Giffuni# SrsPartMergeTarget 412ead13252SPedro Giffuni 413ead13252SPedro Giffunigb_SrsPartMergeTarget_TRANSEXPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib 414ead13252SPedro Giffuni 415ead13252SPedro Giffuni# SrsPartTarget class 416ead13252SPedro Giffuni 417ead13252SPedro Giffunigb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc 418ead13252SPedro Giffunigb_SrsPartTarget_RSCCOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET) 419ead13252SPedro Giffuni 420ead13252SPedro Giffunidefine gb_SrsPartTarget__command_dep 421ead13252SPedro Giffuni$(call gb_Helper_abbreviate_dirs,\ 422ead13252SPedro Giffuni $(gb_GCCP) \ 423ead13252SPedro Giffuni -MM -MT $(call gb_SrsPartTarget_get_target,$(1)) \ 424ead13252SPedro Giffuni $(INCLUDE) \ 425ead13252SPedro Giffuni $(DEFS) \ 426ead13252SPedro Giffuni -c -x c++-header $(2) \ 427ead13252SPedro Giffuni -o $(call gb_SrsPartTarget_get_dep_target,$(1))) 428ead13252SPedro Giffuniendef 429ead13252SPedro Giffuni 430ead13252SPedro Giffuni 431ead13252SPedro Giffuni# ComponentTarget 432ead13252SPedro Giffuni 433ead13252SPedro Giffunigb_XSLTPROCPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib 434ead13252SPedro Giffunigb_Library_COMPONENTPREFIXES := \ 435ead13252SPedro Giffuni OOO:vnd.sun.star.expand:\dOOO_BASE_DIR/program/ \ 436ead13252SPedro Giffuni URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \ 437a8e4828dSPedro Giffuni NONE:vnd.sun.star.expand:\dOOO_INBUILD_SHAREDLIB_DIR/ \ 438a8e4828dSPedro Giffuni 439a8e4828dSPedro Giffuni# UnoApiTarget 440a8e4828dSPedro Giffuni 441a8e4828dSPedro Giffunigb_UnoApiTarget_IDLCTARGET := $(OUTDIR)/bin/idlc 442a8e4828dSPedro Giffunigb_UnoApiTarget_IDLCCOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_IDLCTARGET) 443a8e4828dSPedro Giffunigb_UnoApiTarget_REGMERGETARGET := $(OUTDIR)/bin/regmerge 444a8e4828dSPedro Giffunigb_UnoApiTarget_REGMERGECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGMERGETARGET) 445a8e4828dSPedro Giffunigb_UnoApiTarget_REGCOMPARETARGET := $(OUTDIR)/bin/regcompare 446a8e4828dSPedro Giffunigb_UnoApiTarget_REGCOMPARECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGCOMPARETARGET) 447a8e4828dSPedro Giffunigb_UnoApiTarget_CPPUMAKERTARGET := $(OUTDIR)/bin/cppumaker 448a8e4828dSPedro Giffunigb_UnoApiTarget_CPPUMAKERCOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_CPPUMAKERTARGET) 449a8e4828dSPedro Giffunigb_UnoApiTarget_REGVIEWTARGET := $(OUTDIR)/bin/regview 450a8e4828dSPedro Giffunigb_UnoApiTarget_REGVIEWCOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_UnoApiTarget_REGVIEWTARGET) 451ead13252SPedro Giffuni 452ead13252SPedro Giffuni# vim: set noet sw=4 ts=4: 453