1cdf0e10cSrcweir#************************************************************************* 2cdf0e10cSrcweir# 3cdf0e10cSrcweir# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4cdf0e10cSrcweir# 5cdf0e10cSrcweir# Copyright 2000, 2011 Oracle and/or its affiliates. 6cdf0e10cSrcweir# 7cdf0e10cSrcweir# OpenOffice.org - a multi-platform office productivity suite 8cdf0e10cSrcweir# 9cdf0e10cSrcweir# This file is part of OpenOffice.org. 10cdf0e10cSrcweir# 11cdf0e10cSrcweir# OpenOffice.org is free software: you can redistribute it and/or modify 12cdf0e10cSrcweir# it under the terms of the GNU Lesser General Public License version 3 13cdf0e10cSrcweir# only, as published by the Free Software Foundation. 14cdf0e10cSrcweir# 15cdf0e10cSrcweir# OpenOffice.org is distributed in the hope that it will be useful, 16cdf0e10cSrcweir# but WITHOUT ANY WARRANTY; without even the implied warranty of 17cdf0e10cSrcweir# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18cdf0e10cSrcweir# GNU Lesser General Public License version 3 for more details 19cdf0e10cSrcweir# (a copy is included in the LICENSE file that accompanied this code). 20cdf0e10cSrcweir# 21cdf0e10cSrcweir# You should have received a copy of the GNU Lesser General Public License 22cdf0e10cSrcweir# version 3 along with OpenOffice.org. If not, see 23cdf0e10cSrcweir# <http://www.openoffice.org/license.html> 24cdf0e10cSrcweir# for a copy of the LGPLv3 License. 25cdf0e10cSrcweir# 26cdf0e10cSrcweir#************************************************************************* 27cdf0e10cSrcweir 28cdf0e10cSrcweirGUI := UNX 29cdf0e10cSrcweirCOM := C52 30cdf0e10cSrcweir 31cdf0e10cSrcweirgb_MKTEMP := mktemp -t gbuild.XXXXXX 32cdf0e10cSrcweir 33cdf0e10cSrcweirgb_CC := cc 34cdf0e10cSrcweirgb_CXX := CC 35cdf0e10cSrcweirgb_GCCP := cc 36cdf0e10cSrcweirgb_AR := ar 37cdf0e10cSrcweirgb_AWK := /usr/xpg4/bin/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$(GUI) \ 52cdf0e10cSrcweir -DSYSV \ 53cdf0e10cSrcweir -DSUN \ 54cdf0e10cSrcweir -DSUN4 \ 55cdf0e10cSrcweir -D_REENTRANT \ 56cdf0e10cSrcweir -D_POSIX_PTHREAD_SEMANTICS \ 57cdf0e10cSrcweir -D_PTHREADS \ 58cdf0e10cSrcweir -DUNIX \ 59cdf0e10cSrcweir 60cdf0e10cSrcweirgb_COMPILERDEFS := \ 61cdf0e10cSrcweir -D$(COM) \ 62cdf0e10cSrcweir -DCPPU_ENV=sunpro5 \ 63cdf0e10cSrcweir 64cdf0e10cSrcweirgb_CPUDEFS := -D$(CPUNAME) 65cdf0e10cSrcweirifeq ($(CPUNAME),SPARC) 66cdf0e10cSrcweirgb_CPUDEFS += -D__sparcv8plus 67cdf0e10cSrcweirendif 68cdf0e10cSrcweir 69cdf0e10cSrcweirgb_CFLAGS := \ 70cdf0e10cSrcweir -temp=/tmp \ 71cdf0e10cSrcweir -KPIC \ 72cdf0e10cSrcweir -mt \ 73cdf0e10cSrcweir -xldscope=hidden \ 74cdf0e10cSrcweir -xCC \ 75cdf0e10cSrcweir -xc99=none \ 76cdf0e10cSrcweir 77cdf0e10cSrcweirgb_CXXFLAGS := \ 78cdf0e10cSrcweir -temp=/tmp \ 79cdf0e10cSrcweir -KPIC \ 80cdf0e10cSrcweir -mt \ 81cdf0e10cSrcweir -xldscope=hidden \ 82cdf0e10cSrcweir -features=no%altspell \ 83cdf0e10cSrcweir -library=no%Cstd \ 84cdf0e10cSrcweir +w2 \ 85cdf0e10cSrcweir -erroff=doubunder,identexpected,inllargeuse,inllargeint,notemsource,reftotemp,truncwarn,wnoretvalue,anonnotype \ 86cdf0e10cSrcweir 87cdf0e10cSrcweirifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE) 88cdf0e10cSrcweirgb_CFLAGS_WERROR := -errwarn=%all 89cdf0e10cSrcweirgb_CXXFLAGS_WERROR := -xwe 90cdf0e10cSrcweirendif 91cdf0e10cSrcweir 92cdf0e10cSrcweirgb_LinkTarget_EXCEPTIONFLAGS := \ 93cdf0e10cSrcweir -DEXCEPTIONS_ON \ 94cdf0e10cSrcweir 95cdf0e10cSrcweirgb_LinkTarget_NOEXCEPTIONFLAGS := \ 96cdf0e10cSrcweir -DEXCEPTIONS_OFF \ 97cdf0e10cSrcweir -noex \ 98cdf0e10cSrcweir 99cdf0e10cSrcweirgb_LinkTarget_LDFLAGS := \ 100cdf0e10cSrcweir $(subst -L../lib , ,$(SOLARLIB)) \ 101cdf0e10cSrcweir -temp=/tmp \ 102cdf0e10cSrcweir -w \ 103cdf0e10cSrcweir -mt \ 104cdf0e10cSrcweir -Bdirect \ 105cdf0e10cSrcweir -z defs \ 106cdf0e10cSrcweir -z combreloc \ 107cdf0e10cSrcweir -norunpath \ 108cdf0e10cSrcweir -PIC \ 109cdf0e10cSrcweir -library=no%Cstd \ 110cdf0e10cSrcweir 111cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2) 112cdf0e10cSrcweirgb_COMPILEROPTFLAGS := 113cdf0e10cSrcweirelse 114cdf0e10cSrcweirifeq ($(CPUNAME),INTEL) 115cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -xarch=generic -xO3 116cdf0e10cSrcweirelse # ifeq ($(CPUNAME),SPARC) 117cdf0e10cSrcweir# -m32 -xarch=sparc restrict target to 32 bit sparc 118cdf0e10cSrcweir# -xO3 optimization level 3 119cdf0e10cSrcweir# -xspace don't do optimizations which do increase binary size 120cdf0e10cSrcweir# -xprefetch=yes do prefetching (helps on UltraSparc III) 121cdf0e10cSrcweirgb_COMPILEROPTFLAGS := -m32 -xarch=sparc -xO3 -xspace -xprefetch=yes 122cdf0e10cSrcweirendif 123cdf0e10cSrcweirendif 124cdf0e10cSrcweir 125cdf0e10cSrcweirgb_COMPILERNOOPTFLAGS := 126cdf0e10cSrcweir 127cdf0e10cSrcweir# Helper class 128cdf0e10cSrcweir 129cdf0e10cSrcweirgb_Helper_abbreviate_dirs_native = $(gb_Helper_abbreviate_dirs) 130cdf0e10cSrcweir 131cdf0e10cSrcweir# convert parametters filesystem root to native notation 132cdf0e10cSrcweir# does some real work only on windows, make sure not to 133cdf0e10cSrcweir# break the dummy implementations on unx* 134cdf0e10cSrcweirdefine gb_Helper_convert_native 135cdf0e10cSrcweir$(1) 136cdf0e10cSrcweirendef 137cdf0e10cSrcweir 138cdf0e10cSrcweir 139cdf0e10cSrcweir# CObject class 140cdf0e10cSrcweir 141cdf0e10cSrcweirdefine gb_CObject__command 142cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),C ,3) 143cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\ 144cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 145cdf0e10cSrcweir rm -f $(call gb_CObject_get_dep_target,$(2)) && \ 146cdf0e10cSrcweir mkdir -p $(dir $(call gb_CObject_get_dep_target,$(2))) && \ 147cdf0e10cSrcweir $(gb_CC) \ 148cdf0e10cSrcweir -c $(3) \ 149cdf0e10cSrcweir -o $(1) \ 150cdf0e10cSrcweir -xMMD \ 151cdf0e10cSrcweir -xMF $(call gb_CObject_get_dep_target,$(2)) \ 152cdf0e10cSrcweir $(DEFS) $(CFLAGS) \ 153cdf0e10cSrcweir -I$(dir $(3)) \ 154cdf0e10cSrcweir $(INCLUDE)) 155cdf0e10cSrcweirendef 156cdf0e10cSrcweir 157cdf0e10cSrcweir 158cdf0e10cSrcweir# CxxObject class 159cdf0e10cSrcweir 160cdf0e10cSrcweirdefine gb_CxxObject__command 161cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),CXX,3) 162cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\ 163cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 164cdf0e10cSrcweir mkdir -p $(dir $(call gb_CxxObject_get_dep_target,$(2))) && \ 165cdf0e10cSrcweir $(gb_CXX) \ 166cdf0e10cSrcweir $(DEFS) $(CXXFLAGS) \ 167cdf0e10cSrcweir -c $(3) \ 168cdf0e10cSrcweir -o $(1) \ 169cdf0e10cSrcweir -xMMD \ 170cdf0e10cSrcweir -xMF $(call gb_CxxObject_get_dep_target,$(2)) \ 171cdf0e10cSrcweir -I$(dir $(3)) \ 172cdf0e10cSrcweir $(INCLUDE_STL) $(INCLUDE)) 173cdf0e10cSrcweirendef 174cdf0e10cSrcweir 175cdf0e10cSrcweir 176cdf0e10cSrcweir# LinkTarget class 177cdf0e10cSrcweir 178cdf0e10cSrcweirdefine gb_LinkTarget__get_rpath_for_layer 179cdf0e10cSrcweir$(patsubst $(1):%,%,$(filter $(1):%,$(gb_LinkTarget__RPATHS))) 180cdf0e10cSrcweirendef 181cdf0e10cSrcweir 182cdf0e10cSrcweirgb_LinkTarget__RPATHS := \ 183cdf0e10cSrcweir URELIB:\dORIGIN \ 184cdf0e10cSrcweir UREBIN:\dORIGIN/../lib:\dORIGIN \ 185cdf0e10cSrcweir OOO:\dORIGIN:\dORIGIN/../ure-link/lib \ 186cdf0e10cSrcweir BRAND:\dORIGIN:\dORIGIN/../basis-link/program:\dORIGIN/../basis-link/ure-link/lib \ 187cdf0e10cSrcweir SDKBIN:\dORIGIN/../../ure-link/lib \ 188cdf0e10cSrcweir NONEBIN:\dORIGIN/../lib:\dORIGIN \ 189cdf0e10cSrcweir 190cdf0e10cSrcweirgb_LinkTarget_CFLAGS := $(gb_CFLAGS) $(gb_CFLAGS_WERROR) $(gb_COMPILEROPTFLAGS) 191cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS) $(gb_CXXFLAGS_WERROR) 192cdf0e10cSrcweir 193cdf0e10cSrcweirifeq ($(gb_DEBUGLEVEL),2) 194cdf0e10cSrcweirgb_LinkTarget_CXXFLAGS += -g 195cdf0e10cSrcweirgb_LinkTarget_CFLAGS += -g 196cdf0e10cSrcweirendif 197cdf0e10cSrcweir 198cdf0e10cSrcweirgb_LinkTarget_INCLUDE := $(filter-out %/stl, $(subst -I. , ,$(SOLARINC))) 199cdf0e10cSrcweirgb_LinkTarget_INCLUDE_STL := $(filter %/stl, $(subst -I. , ,$(SOLARINC))) 200cdf0e10cSrcweir 201cdf0e10cSrcweirdefine gb_LinkTarget__command_dynamiclink 202cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\ 203cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 204cdf0e10cSrcweir $(gb_CXX) \ 205cdf0e10cSrcweir $(if $(filter Library CppunitTest,$(TARGETTYPE)),$(gb_Library_TARGETTYPEFLAGS)) \ 206cdf0e10cSrcweir $(subst \d,$$,$(RPATH)) $(LDFLAGS) \ 207cdf0e10cSrcweir $(patsubst lib%.so,-l%,$(foreach lib,$(LINKED_LIBS),$(call gb_Library_get_filename,$(lib)))) \ 208cdf0e10cSrcweir $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 209cdf0e10cSrcweir $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 210cdf0e10cSrcweir $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 211cdf0e10cSrcweir $(foreach lib,$(LINKED_STATIC_LIBS),$(call gb_StaticLibrary_get_target,$(lib))) \ 212cdf0e10cSrcweir -o $(1)) 213cdf0e10cSrcweirendef 214cdf0e10cSrcweir 215cdf0e10cSrcweirdefine gb_LinkTarget__command_staticlink 216cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs,\ 217cdf0e10cSrcweir mkdir -p $(dir $(1)) && \ 218cdf0e10cSrcweir $(gb_AR) -rsu $(1) \ 219cdf0e10cSrcweir $(foreach object,$(COBJECTS),$(call gb_CObject_get_target,$(object))) \ 220cdf0e10cSrcweir $(foreach object,$(CXXOBJECTS),$(call gb_CxxObject_get_target,$(object))) \ 221cdf0e10cSrcweir $(foreach object,$(GENCXXOBJECTS),$(call gb_GenCxxObject_get_target,$(object))) \ 222cdf0e10cSrcweir 2> /dev/null) 223cdf0e10cSrcweirendef 224cdf0e10cSrcweir 225cdf0e10cSrcweirdefine gb_LinkTarget__command 226cdf0e10cSrcweir$(call gb_Output_announce,$(2),$(true),LNK,4) 227cdf0e10cSrcweir$(if $(filter Library CppunitTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclink,$(1))) 228cdf0e10cSrcweir$(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlink,$(1))) 229cdf0e10cSrcweirendef 230cdf0e10cSrcweir 231cdf0e10cSrcweir# Library class 232cdf0e10cSrcweir 233cdf0e10cSrcweirgb_Library_DEFS := 234cdf0e10cSrcweirgb_Library_TARGETTYPEFLAGS := -Bdynamic -z text -G 235cdf0e10cSrcweirgb_Library_SYSPRE := lib 236cdf0e10cSrcweirgb_Library_UNOVERPRE := $(gb_Library_SYSPRE)uno_ 237cdf0e10cSrcweirgb_Library_PLAINEXT := .so 238cdf0e10cSrcweirgb_Library_RTEXT := C52$(gb_Library_PLAINEXT) 239cdf0e10cSrcweirifeq ($(gb_PRODUCT),$(true)) 240cdf0e10cSrcweirgb_Library_STLEXT := port_sunpro$(gb_Library_PLAINEXT) 241cdf0e10cSrcweirelse 242cdf0e10cSrcweirgb_Library_STLEXT := port_sunpro_debug$(gb_Library_PLAINEXT) 243cdf0e10cSrcweirendif 244cdf0e10cSrcweir 245cdf0e10cSrcweirifeq ($(CPUNAME),INTEL) 2465f9a7a39SHerbert Dürrgb_Library_OOOEXT := $(gb_Library_PLAINEXT) 247cdf0e10cSrcweirgb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT) 248cdf0e10cSrcweirelse # ifeq ($(CPUNAME),SPARC) 2495f9a7a39SHerbert Dürrgb_Library_OOOEXT := $(gb_Library_PLAINEXT) 250cdf0e10cSrcweirgb_Library_UNOEXT := .uno$(gb_Library_PLAINEXT) 251cdf0e10cSrcweirendif 252cdf0e10cSrcweir 253cdf0e10cSrcweirgb_STDLIBS := \ 254cdf0e10cSrcweir Crun \ 255cdf0e10cSrcweir m \ 256cdf0e10cSrcweir c \ 257cdf0e10cSrcweir 258cdf0e10cSrcweirgb_Library_PLAINLIBS_NONE += \ 259cdf0e10cSrcweir $(gb_STDLIBS) \ 260cdf0e10cSrcweir dl \ 261cdf0e10cSrcweir freetype \ 262cdf0e10cSrcweir jpeg \ 263cdf0e10cSrcweir pthread \ 264cdf0e10cSrcweir X11 \ 265cdf0e10cSrcweir Xext \ 266cdf0e10cSrcweir SM \ 267cdf0e10cSrcweir ICE \ 268*828da808SPedro Giffuni z \ 269*828da808SPedro Giffuni cppunit 270cdf0e10cSrcweir 271cdf0e10cSrcweirgb_Library_FILENAMES := \ 272cdf0e10cSrcweir $(foreach lib,$(gb_Library_OOOLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_OOOEXT)) \ 273cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_NONE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \ 274cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \ 275cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_PLAINEXT)) \ 276cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \ 277cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_RTEXT)) \ 278cdf0e10cSrcweir $(foreach lib,$(gb_Library_STLLIBS),$(lib):$(gb_Library_SYSPRE)$(lib)$(gb_Library_STLEXT)) \ 279cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 280cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):$(lib)$(gb_Library_UNOEXT)) \ 281cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):$(gb_Library_UNOVERPRE)$(lib)$(gb_Library_PLAINEXT)) \ 282cdf0e10cSrcweir 283cdf0e10cSrcweir 284cdf0e10cSrcweirgb_Library_LAYER := \ 285cdf0e10cSrcweir $(foreach lib,$(gb_Library_OOOLIBS),$(lib):OOO) \ 286cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_URE),$(lib):URELIB) \ 287cdf0e10cSrcweir $(foreach lib,$(gb_Library_PLAINLIBS_OOO),$(lib):OOO) \ 288cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTLIBS),$(lib):OOO) \ 289cdf0e10cSrcweir $(foreach lib,$(gb_Library_RTVERLIBS),$(lib):URELIB) \ 290cdf0e10cSrcweir $(foreach lib,$(gb_Library_STLLIBS),$(lib):URELIB) \ 291cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_URE),$(lib):URELIB) \ 292cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOLIBS_OOO),$(lib):OOO) \ 293cdf0e10cSrcweir $(foreach lib,$(gb_Library_UNOVERLIBS),$(lib):URELIB) \ 294cdf0e10cSrcweir 295cdf0e10cSrcweirdefine gb_Library_get_rpath 296cdf0e10cSrcweir'-R$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Library_get_layer,$(1)))' 297cdf0e10cSrcweirendef 298cdf0e10cSrcweir 299cdf0e10cSrcweirdefine gb_Library_Library_platform 300cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Library_get_rpath,$(1)) 301cdf0e10cSrcweir 302cdf0e10cSrcweirendef 303cdf0e10cSrcweir 304cdf0e10cSrcweir 305cdf0e10cSrcweir# StaticLibrary class 306cdf0e10cSrcweir 307cdf0e10cSrcweirgb_StaticLibrary_DEFS := 308cdf0e10cSrcweirgb_StaticLibrary_SYSPRE := lib 309cdf0e10cSrcweirgb_StaticLibrary_PLAINEXT := .a 310cdf0e10cSrcweirgb_StaticLibrary_JPEGEXT := lib$(gb_StaticLibrary_PLAINEXT) 311cdf0e10cSrcweir 312cdf0e10cSrcweirgb_StaticLibrary_FILENAMES := \ 313cdf0e10cSrcweir $(foreach lib,$(gb_StaticLibrary_JPEGLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_JPEGEXT)) \ 314cdf0e10cSrcweir $(foreach lib,$(gb_StaticLibrary_PLAINLIBS),$(lib):$(gb_StaticLibrary_SYSPRE)$(lib)$(gb_StaticLibrary_PLAINEXT)) \ 315cdf0e10cSrcweir 316cdf0e10cSrcweirgb_StaticLibrary_StaticLibrary_platform = 317cdf0e10cSrcweir 318cdf0e10cSrcweir 319cdf0e10cSrcweir# Executable class 320cdf0e10cSrcweir 321cdf0e10cSrcweirgb_Executable_EXT := 322cdf0e10cSrcweir 323cdf0e10cSrcweirgb_Executable_LAYER := \ 324cdf0e10cSrcweir $(foreach exe,$(gb_Executable_UREBIN),$(exe):UREBIN) \ 325cdf0e10cSrcweir $(foreach exe,$(gb_Executable_SDK),$(exe):SDKBIN) \ 326cdf0e10cSrcweir $(foreach exe,$(gb_Executable_OOO),$(exe):OOO) \ 327cdf0e10cSrcweir $(foreach exe,$(gb_Executable_BRAND),$(exe):BRAND) \ 328cdf0e10cSrcweir $(foreach exe,$(gb_Executable_NONE),$(exe):NONEBIN) \ 329cdf0e10cSrcweir 330cdf0e10cSrcweir 331cdf0e10cSrcweirdefine gb_Executable_get_rpath 332cdf0e10cSrcweir'-R$(call gb_LinkTarget__get_rpath_for_layer,$(call gb_Executable_get_layer,$(1)))' 333cdf0e10cSrcweirendef 334cdf0e10cSrcweir 335cdf0e10cSrcweirdefine gb_Executable_Executable_platform 336cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) : RPATH := $(call gb_Executable_get_rpath,$(1)) 337cdf0e10cSrcweir 338cdf0e10cSrcweirendef 339cdf0e10cSrcweir 340cdf0e10cSrcweir 341cdf0e10cSrcweir# CppunitTest class 342cdf0e10cSrcweir 343cdf0e10cSrcweirgb_CppunitTest_CPPTESTPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib 344cdf0e10cSrcweirgb_CppunitTest_SYSPRE := libtest_ 345cdf0e10cSrcweirgb_CppunitTest_EXT := .so 346cdf0e10cSrcweirgb_CppunitTest_get_filename = $(gb_CppunitTest_SYSPRE)$(1)$(gb_CppunitTest_EXT) 347cdf0e10cSrcweirgb_CppunitTest_get_libfilename = $(gb_CppunitTest_get_filename) 348cdf0e10cSrcweir 349cdf0e10cSrcweirdefine gb_CppunitTest_CppunitTest_platform 350cdf0e10cSrcweir$(call gb_LinkTarget_get_target,$(2)) : RPATH := 351cdf0e10cSrcweir 352cdf0e10cSrcweirendef 353cdf0e10cSrcweir 354cdf0e10cSrcweir# JunitTest class 355cdf0e10cSrcweir 356cdf0e10cSrcweirdefine gb_JunitTest_JunitTest_platform 357cdf0e10cSrcweir$(call gb_JunitTest_get_target,$(1)) : DEFS := \ 358cdf0e10cSrcweir -Dorg.openoffice.test.arg.soffice="$$$${OOO_TEST_SOFFICE:-path:$(OUTDIR)/installation/opt/openoffice.org3/program/soffice}" \ 359cdf0e10cSrcweir -Dorg.openoffice.test.arg.env=LD_LIBRARY_PATH \ 360cdf0e10cSrcweir -Dorg.openoffice.test.arg.user=file://$(call gb_JunitTest_get_userdir,$(1)) \ 361cdf0e10cSrcweir 362cdf0e10cSrcweirendef 363cdf0e10cSrcweir 364cdf0e10cSrcweir# SdiTarget class 365cdf0e10cSrcweir 366cdf0e10cSrcweirgb_SdiTarget_SVIDLPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib 367cdf0e10cSrcweir 368cdf0e10cSrcweir# SrsPartMergeTarget 369cdf0e10cSrcweir 370cdf0e10cSrcweirgb_SrsPartMergeTarget_TRANSEXPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib 371cdf0e10cSrcweir 372cdf0e10cSrcweir# SrsPartTarget class 373cdf0e10cSrcweir 374cdf0e10cSrcweirgb_SrsPartTarget_RSCTARGET := $(OUTDIR)/bin/rsc 375cdf0e10cSrcweirgb_SrsPartTarget_RSCCOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib SOLARBINDIR=$(OUTDIR)/bin $(gb_SrsPartTarget_RSCTARGET) 376cdf0e10cSrcweir 377cdf0e10cSrcweir# Sun cc/CC support -xM1/-xMF flags, but unfortunately refuse input files that 378cdf0e10cSrcweir# do not have the right suffix, so use makedepend here... 379cdf0e10cSrcweirdefine gb_SrsPartTarget__command_dep 380cdf0e10cSrcweir$(call gb_Helper_abbreviate_dirs_native,\ 381cdf0e10cSrcweir $(OUTDIR)/bin/makedepend$(gb_Executable_EXT) \ 382cdf0e10cSrcweir $(INCLUDE) \ 383cdf0e10cSrcweir $(DEFS) \ 384cdf0e10cSrcweir $(2) \ 385cdf0e10cSrcweir -f - \ 386cdf0e10cSrcweir | $(gb_AWK) -f $(GBUILDDIR)/processdeps.awk \ 387cdf0e10cSrcweir -v OBJECTFILE=$(call gb_SrsPartTarget_get_target,$(1)) \ 388cdf0e10cSrcweir -v OUTDIR=$(OUTDIR)/ \ 389cdf0e10cSrcweir -v WORKDIR=$(WORKDIR)/ \ 390cdf0e10cSrcweir -v SRCDIR=$(SRCDIR)/ \ 391cdf0e10cSrcweir -v REPODIR=$(REPODIR)/ \ 392cdf0e10cSrcweir > $(call gb_SrsPartTarget_get_dep_target,$(1))) 393cdf0e10cSrcweirendef 394cdf0e10cSrcweir 395cdf0e10cSrcweir 396cdf0e10cSrcweir# ComponentTarget 397cdf0e10cSrcweir 398cdf0e10cSrcweirgb_XSLTPROCPRECOMMAND := LD_LIBRARY_PATH=$(OUTDIR)/lib 399cdf0e10cSrcweirgb_Library_COMPONENTPREFIXES := \ 400cdf0e10cSrcweir OOO:vnd.sun.star.expand:\dOOO_BASE_DIR/program/ \ 401cdf0e10cSrcweir URELIB:vnd.sun.star.expand:\dURE_INTERNAL_LIB_DIR/ \ 402cdf0e10cSrcweir 403cdf0e10cSrcweir 404cdf0e10cSrcweir# vim: set noet sw=4 ts=4: 405