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 GiffuniCOM := GCC 24ead13252SPedro Giffuni 25*37816a14SPedro Giffuni# BSD mktemp -t expects a prefix, not a pattern 26*37816a14SPedro Giffunigb_MKTEMP ?= /usr/bin/mktemp -t gbuild. 27ead13252SPedro Giffuni 28ead13252SPedro Giffunigb_CC := cc 298969592bSPedro Giffunigb_CXX := c++ 308969592bSPedro Giffunigb_GCCP := cc 31ead13252SPedro Giffunigb_AR := ar 32ead13252SPedro Giffunigb_AWK := awk 33ead13252SPedro Giffunigb_CLASSPATHSEP := : 34ead13252SPedro Giffuni 35ead13252SPedro Giffuni# normalize setsolar and configure env. 36ead13252SPedro Giffuniifeq ($(CPU),X) 37ead13252SPedro GiffuniCPUNAME := X86_64 38ead13252SPedro Giffuniendif 39ead13252SPedro Giffuni 40ead13252SPedro Giffuni# use CC/CXX if they are nondefaults 41ead13252SPedro Giffuniifneq ($(origin CC),default) 42ead13252SPedro Giffunigb_CC := $(CC) 43ead13252SPedro Giffunigb_GCCP := $(CC) 44ead13252SPedro Giffuniendif 45ead13252SPedro Giffuniifneq ($(origin CXX),default) 46ead13252SPedro Giffunigb_CXX := $(CXX) 47ead13252SPedro Giffuniendif 48ead13252SPedro Giffuni 49ead13252SPedro Giffunigb_OSDEFS := \ 50ead13252SPedro Giffuni -D$(OS) \ 51ead13252SPedro Giffuni -D_PTHREADS \ 52ead13252SPedro Giffuni -DUNIX \ 53ead13252SPedro Giffuni -DUNX \ 54ead13252SPedro Giffuni $(PTHREAD_CFLAGS) \ 55ead13252SPedro Giffuni 56ead13252SPedro Giffuniifeq ($(GXX_INCLUDE_PATH),) 57ead13252SPedro GiffuniGXX_INCLUDE_PATH=$(COMPATH)/include/c++/$(shell gcc -dumpversion) 58ead13252SPedro Giffuniendif 59ead13252SPedro Giffuni 60ead13252SPedro Giffunigb_COMPILERDEFS := \ 61ead13252SPedro Giffuni -D$(COM) \ 62ead13252SPedro Giffuni -DHAVE_GCC_VISIBILITY_FEATURE \ 63ead13252SPedro Giffuni -DCPPU_ENV=gcc3 \ 64ead13252SPedro Giffuni -DGXX_INCLUDE_PATH=$(GXX_INCLUDE_PATH) \ 65ead13252SPedro Giffuni 66ead13252SPedro Giffuniifeq ($(CPUNAME),X86_64) 67ead13252SPedro Giffunigb_CPUDEFS := -D$(CPUNAME) 68ead13252SPedro Giffunielse 69ead13252SPedro Giffunigb_CPUDEFS := -DX86 70ead13252SPedro Giffuniendif 71ead13252SPedro Giffuni 72ead13252SPedro Giffunigb_CFLAGS := \ 73ead13252SPedro Giffuni -Wall \ 74ead13252SPedro Giffuni -Wendif-labels \ 75ead13252SPedro Giffuni -Wextra \ 76ead13252SPedro Giffuni -Wshadow \ 77ead13252SPedro Giffuni -fPIC \ 78ead13252SPedro Giffuni -fmessage-length=0 \ 79ead13252SPedro Giffuni -fno-common \ 80ead13252SPedro Giffuni -fno-strict-aliasing \ 81ead13252SPedro Giffuni -fvisibility=hidden \ 82ead13252SPedro Giffuni -pipe \ 83ead13252SPedro Giffuni 84ead13252SPedro Giffunigb_CXXFLAGS := \ 85ead13252SPedro Giffuni -Wall \ 86ead13252SPedro Giffuni -Wendif-labels \ 87ead13252SPedro Giffuni -Wextra \ 88ead13252SPedro Giffuni -Wno-ctor-dtor-privacy \ 89ead13252SPedro Giffuni -Wno-non-virtual-dtor \ 90ead13252SPedro Giffuni -Wshadow \ 91ead13252SPedro Giffuni -fPIC \ 92ead13252SPedro Giffuni -fmessage-length=0 \ 93ead13252SPedro Giffuni -fno-common \ 94ead13252SPedro Giffuni -fno-strict-aliasing \ 95ead13252SPedro Giffuni -fno-use-cxa-atexit \ 96ead13252SPedro Giffuni -fvisibility-inlines-hidden \ 97ead13252SPedro Giffuni -fvisibility=hidden \ 98ead13252SPedro Giffuni -pipe \ 99ead13252SPedro Giffuni 100ead13252SPedro Giffuniifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE) 101ead13252SPedro Giffunigb_CFLAGS_WERROR := -Werror 102ead13252SPedro Giffunigb_CXXFLAGS_WERROR := -Werror 103ead13252SPedro Giffuniendif 104ead13252SPedro Giffuni 105ead13252SPedro Giffuniifneq ($(strip $(SYSBASE)),) 10671df68dcSPedro Giffunigb_CXXFLAGS += --sysroot=$(SYSBASE) 10771df68dcSPedro Giffunigb_CFLAGS += --sysroot=$(SYSBASE) 10871df68dcSPedro Giffunigb_LinkTarget_LDFLAGS := -Wl,--sysroot=$(SYSBASE) 109ead13252SPedro Giffuniendif 110ead13252SPedro Giffunigb_LinkTarget_EXCEPTIONFLAGS := \ 111ead13252SPedro Giffuni -DEXCEPTIONS_ON \ 112ead13252SPedro Giffuni -fexceptions \ 113ead13252SPedro Giffuni -fno-enforce-eh-specs \ 114ead13252SPedro Giffuni 115ead13252SPedro Giffunigb_LinkTarget_NOEXCEPTIONFLAGS := \ 116ead13252SPedro Giffuni -DEXCEPTIONS_OFF \ 117ead13252SPedro Giffuni -fno-exceptions \ 118ead13252SPedro Giffuni 11971df68dcSPedro Giffunigb_LinkTarget_LDFLAGS += \ 12071df68dcSPedro Giffuni -Wl,-rpath-link,$(SYSBASE)/lib:$(SYSBASE)/usr/lib \ 121ead13252SPedro Giffuni -Wl,-z,combreloc \ 122ead13252SPedro Giffuni -Wl,-z,defs \ 123ead13252SPedro Giffuni $(subst -L../lib , ,$(SOLARLIB)) \ 124ead13252SPedro Giffuni 125ead13252SPedro Giffuniifeq ($(HAVE_LD_HASH_STYLE),TRUE) 126ead13252SPedro Giffunigb_LinkTarget_LDFLAGS += \ 127ead13252SPedro Giffuni -Wl,--hash-style=both \ 128ead13252SPedro Giffuni 129ead13252SPedro Giffuniendif 130ead13252SPedro Giffuni 131ead13252SPedro Giffuniifneq ($(HAVE_LD_BSYMBOLIC_FUNCTIONS),) 132ead13252SPedro Giffunigb_LinkTarget_LDFLAGS += \ 133ead13252SPedro Giffuni -Wl,--dynamic-list-cpp-new \ 134ead13252SPedro Giffuni -Wl,--dynamic-list-cpp-typeinfo \ 135ead13252SPedro Giffuni -Wl,-Bsymbolic-functions \ 136ead13252SPedro Giffuni 137ead13252SPedro Giffuniendif 138ead13252SPedro Giffuni 139ead13252SPedro Giffuniifeq ($(gb_DEBUGLEVEL),2) 140ead13252SPedro Giffunigb_COMPILEROPTFLAGS := -O0 141ead13252SPedro Giffunielse 142ead13252SPedro Giffunigb_COMPILEROPTFLAGS := -Os 143ead13252SPedro Giffuniendif 144ead13252SPedro Giffuni 145ead13252SPedro Giffunigb_COMPILERNOOPTFLAGS := -O0 146ead13252SPedro Giffuni 147ead13252SPedro Giffuni# Helper class 148ead13252SPedro Giffuni 149ead13252SPedro Giffunigb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs) 150ead13252SPedro Giffuni 1511ff5b6ebSPedro Giffuni# convert parametters filesystem root to native notation 1521ff5b6ebSPedro Giffuni# does some real work only on windows, make sure not to 1531ff5b6ebSPedro Giffuni# break the dummy implementations on unx* 1541ff5b6ebSPedro Giffunidefine gb_Helper_convert_native 1551ff5b6ebSPedro Giffuni$(1) 1561ff5b6ebSPedro Giffuniendef 157ead13252SPedro Giffuni 158ead13252SPedro Giffuni# CObject class 159ead13252SPedro Giffuni 160ead13252SPedro Giffunidefine gb_CObject__command 161ead13252SPedro Giffuni$(call gb_Output_announce,$(2),$(true),C ,3) 162ead13252SPedro Giffuni$(call gb_Helper_abbreviate_dirs,\ 163ead13252SPedro Giffuni mkdir -p $(dir $(1)) && \ 164ead13252SPedro Giffuni mkdir -p $(dir $(call gb_CObject_get_dep_target,$(2))) && \ 165ead13252SPedro Giffuni $(gb_CC) \ 166ead13252SPedro Giffuni $(DEFS) $(CFLAGS) \ 167ead13252SPedro Giffuni -c $(3) \ 168ead13252SPedro Giffuni -o $(1) \ 169ead13252SPedro Giffuni -MMD -MT $(call gb_CObject_get_target,$(2)) \ 170ead13252SPedro Giffuni -MF $(call gb_CObject_get_dep_target,$(2)) \ 171ead13252SPedro Giffuni -I$(dir $(3)) \ 172ead13252SPedro Giffuni $(INCLUDE)) 173ead13252SPedro Giffuniendef 174ead13252SPedro Giffuni 175ead13252SPedro Giffuni 176ead13252SPedro Giffuni# CxxObject class 177ead13252SPedro Giffuni 178ead13252SPedro Giffunidefine gb_CxxObject__command 179ead13252SPedro Giffuni$(call gb_Output_announce,$(2),$(true),CXX,3) 180ead13252SPedro Giffuni$(call gb_Helper_abbreviate_dirs,\ 181ead13252SPedro Giffuni mkdir -p $(dir $(1)) && \ 182ead13252SPedro Giffuni mkdir -p $(dir $(call gb_CxxObject_get_dep_target,$(2))) && \ 183ead13252SPedro Giffuni $(gb_CXX) \ 184ead13252SPedro Giffuni $(DEFS) $(CXXFLAGS) \ 185ead13252SPedro Giffuni -c $(3) \ 186ead13252SPedro Giffuni -o $(1) \ 187ead13252SPedro Giffuni -MMD -MT $(call gb_CxxObject_get_target,$(2)) \ 188ead13252SPedro Giffuni -MF $(call gb_CxxObject_get_dep_target,$(2)) \ 189ead13252SPedro Giffuni -I$(dir $(3)) \ 190ead13252SPedro Giffuni $(INCLUDE_STL) $(INCLUDE)) 191ead13252SPedro Giffuniendef 192ead13252SPedro Giffuni 193ead13252SPedro Giffuni 194ead13252SPedro Giffuni# LinkTarget class 195ead13252SPedro Giffuni 196ead13252SPedro Giffunidefine gb_LinkTarget__get_rpath_for_layer 197ead13252SPedro Giffuni$(patsubst $(1):%,%,$(filter $(1):%,$(gb_LinkTarget__RPATHS))) 198ead13252SPedro Giffuniendef 199ead13252SPedro Giffuni 200ead13252SPedro Giffunigb_LinkTarget__RPATHS := \ 201ead13252SPedro Giffuni URELIB:\dORIGIN \ 202ead13252SPedro Giffuni UREBIN:\dORIGIN/../lib:\dORIGIN \ 203ead13252SPedro Giffuni OOO:\dORIGIN:\dORIGIN/../ure-link/lib \ 204ead13252SPedro Giffuni BRAND:\dORIGIN:\dORIGIN/../basis-link/program:\dORIGIN/../basis-link/ure-link/lib \ 205ead13252SPedro Giffuni SDKBIN:\dORIGIN/../../ure-link/lib \ 206ead13252SPedro Giffuni NONEBIN:\dORIGIN/../lib:\dORIGIN \ 207ead13252SPedro Giffuni 208ead13252SPedro Giffunigb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS) 209ead13252SPedro Giffunigb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR) 210ead13252SPedro Giffuni 211ead13252SPedro Giffuniifeq ($(gb_DEBUGLEVEL),2) 212ead13252SPedro Giffunigb_LinkTarget_CXXFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline 213ead13252SPedro Giffunigb_LinkTarget_CFLAGS += -ggdb3 -finline-limit=0 -fno-inline -fno-default-inline 214ead13252SPedro Giffuni 215ead13252SPedro Giffuniendif 216ead13252SPedro Giffuni 217ead13252SPedro Giffunigb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) 218ead13252SPedro Giffunigb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC))) 219ead13252SPedro Giffuni 220ead13252SPedro Giffunidefine gb_LinkTarget__command_dynamiclink 221ead13252SPedro Giffuni$(call gb_Helper_abbreviate_dirs,\ 222ead13252SPedro Giffuni mkdir -p $(dir $(1)) && \ 223ead13252SPedro Giffuni $(gb_CXX) \ 224ead13252SPedro Giffuni $(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \ 225ead13252SPedro Giffuni $(subst \d,$$,$(RPATH)) $(LDFLAGS) \ 226ead13252SPedro Giffuni $(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) \ 22744c25570SAndre Fischer $(patsubst %,-l%,$(EXTERNAL_LIBS)) \ 228ead13252SPedro Giffuni $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 229ead13252SPedro Giffuni $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 230ead13252SPedro Giffuni $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 231ead13252SPedro Giffuni -Wl$(COMMA)--start-group $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) -Wl$(COMMA)--end-group \ 232ead13252SPedro Giffuni -o $(1)) 233ead13252SPedro Giffuniendef 234ead13252SPedro Giffuni 235ead13252SPedro Giffunidefine gb_LinkTarget__command_staticlink 236ead13252SPedro Giffuni$(call gb_Helper_abbreviate_dirs,\ 237ead13252SPedro Giffuni mkdir -p $(dir $(1)) && \ 238ead13252SPedro Giffuni $(gb_AR) -rsu $(1) \ 239ead13252SPedro Giffuni $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 240ead13252SPedro Giffuni $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 241ead13252SPedro Giffuni $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 242ead13252SPedro Giffuni 2> /dev/null) 243ead13252SPedro Giffuniendef 244ead13252SPedro Giffuni 245ead13252SPedro Giffunidefine gb_LinkTarget__command 246ead13252SPedro Giffuni$(call gb_Output_announce,$(2),$(true),LNK,4) 247ead13252SPedro Giffuni$(if $(filter Library CppunitTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclink,$(1))) 248ead13252SPedro Giffuni$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlink,$(1))) 249ead13252SPedro Giffuniendef 250ead13252SPedro Giffuni 251ead13252SPedro Giffuni 252ead13252SPedro Giffuni# Library class 253ead13252SPedro Giffuni 254ead13252SPedro Giffunigb_Library_DEFS := 255ead13252SPedro Giffunigb_Library_TARGETTYPEFLAGS := -shared -Wl,-z,noexecstack 256ead13252SPedro Giffunigb_Library_SYSPRE := lib 257ead13252SPedro Giffunigb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_ 258ead13252SPedro Giffunigb_Library_PLAINEXT := .so 259ead13252SPedro Giffunigb_Library_RTEXT := gcc3$(gb_Library_PLAINEXT) 260ead13252SPedro Giffuniifeq ($(gb_PRODUCT),$(true)) 261ead13252SPedro Giffunigb_Library_STLEXT := port_gcc$(gb_Library_PLAINEXT) 262ead13252SPedro Giffunielse 263ead13252SPedro Giffunigb_Library_STLEXT := port_gcc_stldebug$(gb_Library_PLAINEXT) 264ead13252SPedro Giffuniendif 265ead13252SPedro Giffuni 266ead13252SPedro Giffuniifeq ($(CPUNAME),X86_64) 2678969592bSPedro Giffunigb_Library_OOOEXT := $(gb_Library_PLAINEXT) 268ead13252SPedro Giffunigb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT) 269ead13252SPedro Giffunielse 2708969592bSPedro Giffunigb_Library_OOOEXT := $(gb_Library_PLAINEXT) 271ead13252SPedro Giffunigb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT) 272ead13252SPedro Giffuniendif 273ead13252SPedro Giffuni 274ead13252SPedro Giffunigb_Library_PLAINLIBS_NONE += \ 275ead13252SPedro Giffuni dl \ 2761ff5b6ebSPedro Giffuni freetype \ 277ead13252SPedro Giffuni jpeg \ 278ead13252SPedro Giffuni m \ 279ead13252SPedro Giffuni pthread \ 280ead13252SPedro Giffuni X11 \ 281828da808SPedro Giffuni Xext \ 282828da808SPedro Giffuni SM \ 283828da808SPedro Giffuni ICE \ 284828da808SPedro Giffuni z \ 285828da808SPedro Giffuni cppunit 286ead13252SPedro Giffuni 287ead13252SPedro Giffunigb_Library_FILENAMES := \ 288ead13252SPedro Giffuni $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \ 289ead13252SPedro Giffuni $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \ 290ead13252SPedro Giffuni $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \ 291ead13252SPedro Giffuni $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \ 292ead13252SPedro Giffuni $(foreach lib,$(gb_Library_RTLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \ 293ead13252SPedro Giffuni $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \ 294ead13252SPedro Giffuni $(foreach lib,$(gb_Library_STLLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_STLEXT)) \ 295ead13252SPedro Giffuni $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 296ead13252SPedro Giffuni $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 297ead13252SPedro Giffuni $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(gb_Library_UNOVERPRE)$(lib)$(gb_Library_PLAINEXT)) \ 298ead13252SPedro Giffuni 299ead13252SPedro Giffuni 300ead13252SPedro Giffunigb_Library_LAYER := \ 301ead13252SPedro Giffuni $(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \ 302ead13252SPedro Giffuni $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \ 303ead13252SPedro Giffuni $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \ 304ead13252SPedro Giffuni $(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \ 305ead13252SPedro Giffuni $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \ 306ead13252SPedro Giffuni $(foreach lib,$(gb_Library_STLLIBS),$(lib):URELIB) \ 307ead13252SPedro Giffuni $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \ 308ead13252SPedro Giffuni $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \ 309ead13252SPedro Giffuni $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \ 310ead13252SPedro Giffuni 311ead13252SPedro Giffunidefine gb_Library_get_rpath 31271df68dcSPedro Giffuni'-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1)))' \ 31371df68dcSPedro Giffuni'-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION)' 314ead13252SPedro Giffuniendef 315ead13252SPedro Giffuni 316ead13252SPedro Giffunidefine gb_Library_Library_platform 317ead13252SPedro Giffuni$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Library_get_rpath,$(1)) 318ead13252SPedro Giffuni 319ead13252SPedro Giffuniendef 320ead13252SPedro Giffuni 321ead13252SPedro Giffuni 322ead13252SPedro Giffuni# StaticLibrary class 323ead13252SPedro Giffuni 324ead13252SPedro Giffunigb_StaticLibrary_DEFS := 325ead13252SPedro Giffunigb_StaticLibrary_SYSPRE := lib 326ead13252SPedro Giffunigb_StaticLibrary_PLAINEXT := .a 327ead13252SPedro Giffunigb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT) 328ead13252SPedro Giffuni 329ead13252SPedro Giffunigb_StaticLibrary_FILENAMES := \ 330ead13252SPedro Giffuni $(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \ 331ead13252SPedro Giffuni $(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \ 332ead13252SPedro Giffuni 333ead13252SPedro Giffunigb_StaticLibrary_StaticLibrary_platform = 334ead13252SPedro Giffuni 335ead13252SPedro Giffuni 336ead13252SPedro Giffuni# Executable class 337ead13252SPedro Giffuni 338ead13252SPedro Giffunigb_Executable_EXT := 339ead13252SPedro Giffuni 340ead13252SPedro Giffunigb_Executable_LAYER := \ 341ead13252SPedro Giffuni $(foreach exe,$(gb_Executable_UREBIN),$(exe):UREBIN) \ 342ead13252SPedro Giffuni $(foreach exe,$(gb_Executable_SDK),$(exe):SDKBIN) \ 343ead13252SPedro Giffuni $(foreach exe,$(gb_Executable_OOO),$(exe):OOO) \ 344ead13252SPedro Giffuni $(foreach exe,$(gb_Executable_BRAND),$(exe):BRAND) \ 345ead13252SPedro Giffuni $(foreach exe,$(gb_Executable_NONE),$(exe):NONEBIN) \ 346ead13252SPedro Giffuni 347ead13252SPedro Giffuni 348ead13252SPedro Giffunidefine gb_Executable_get_rpath 349ead13252SPedro Giffuni'-Wl,-rpath,$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))' \ 350ead13252SPedro Giffuni-Wl,-rpath-link,$(gb_Library_OUTDIRLOCATION) 351ead13252SPedro Giffuniendef 352ead13252SPedro Giffuni 353ead13252SPedro Giffunidefine gb_Executable_Executable_platform 354ead13252SPedro Giffuni$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Executable_get_rpath,$(1)) 355ead13252SPedro Giffuni 356ead13252SPedro Giffuniendef 357ead13252SPedro Giffuni 358ead13252SPedro Giffuni 359ead13252SPedro Giffuni# CppunitTest class 360ead13252SPedro Giffuni 361ead13252SPedro Giffunigb_CppunitTest_CPPTESTPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib 362ead13252SPedro Giffunigb_CppunitTest_SYSPRE := libtest_ 363ead13252SPedro Giffunigb_CppunitTest_EXT := .so 364ead13252SPedro Giffunigb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT) 365ead13252SPedro Giffunigb_CppunitTest_get_libfilename = $(gb_CppunitTest_get_filename) 366ead13252SPedro Giffuni 367ead13252SPedro Giffunidefine gb_CppunitTest_CppunitTest_platform 368ead13252SPedro Giffuni$(call gb_LinkTarget_get_target,$(2)) : RPATH := 369ead13252SPedro Giffuni 370ead13252SPedro Giffuniendef 371ead13252SPedro Giffuni 372ead13252SPedro Giffuni# JunitTest class 373ead13252SPedro Giffuni 374ead13252SPedro Giffunidefine gb_JunitTest_JunitTest_platform 375ead13252SPedro Giffuni$(call gb_JunitTest_get_target,$(1)) : DEFS := \ 376ead13252SPedro Giffuni -Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(OUTDIR)/installation/opt/openoffice.org3/program/soffice}" \ 377ead13252SPedro Giffuni -Dorg.openoffice.test.arg.env=LD_LIBRARY_PATH \ 378ead13252SPedro Giffuni -Dorg.openoffice.test.arg.user=file://$(call gb_JunitTest_get_userdir,$(1)) \ 379ead13252SPedro Giffuni 380ead13252SPedro Giffuniendef 381ead13252SPedro Giffuni 382ead13252SPedro Giffuni# SdiTarget class 383ead13252SPedro Giffuni 384ead13252SPedro Giffunigb_SdiTarget_SVIDLPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib 385ead13252SPedro Giffuni 386ead13252SPedro Giffuni# SrsPartMergeTarget 387ead13252SPedro Giffuni 388ead13252SPedro Giffunigb_SrsPartMergeTarget_TRANSEXPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib 389ead13252SPedro Giffuni 390ead13252SPedro Giffuni# SrsPartTarget class 391ead13252SPedro Giffuni 392ead13252SPedro Giffunigb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc 393ead13252SPedro Giffunigb_SrsPartTarget_RSCCOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET) 394ead13252SPedro Giffuni 395ead13252SPedro Giffunidefine gb_SrsPartTarget__command_dep 396ead13252SPedro Giffuni$(call gb_Helper_abbreviate_dirs,\ 397ead13252SPedro Giffuni $(gb_GCCP) \ 398ead13252SPedro Giffuni -MM -MT $(call gb_SrsPartTarget_get_target,$(1)) \ 399ead13252SPedro Giffuni $(INCLUDE) \ 400ead13252SPedro Giffuni $(DEFS) \ 401ead13252SPedro Giffuni -c -x c++-header $(2) \ 402ead13252SPedro Giffuni -o $(call gb_SrsPartTarget_get_dep_target,$(1))) 403ead13252SPedro Giffuniendef 404ead13252SPedro Giffuni 405ead13252SPedro Giffuni 406ead13252SPedro Giffuni# ComponentTarget 407ead13252SPedro Giffuni 408ead13252SPedro Giffunigb_XSLTPROCPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib 409ead13252SPedro Giffunigb_Library_COMPONENTPREFIXES := \ 410ead13252SPedro Giffuni OOO:vnd.sun.star.expand:\dOOO_BASE_DIR/program/ \ 411ead13252SPedro Giffuni URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \ 412ead13252SPedro Giffuni 413ead13252SPedro Giffuni 414ead13252SPedro Giffuni# vim: set noet sw=4 ts=4: 415