1122c3632SJürgen Schmidt#************************************************************** 22752044bSAriel Constenla-Haile# 3122c3632SJürgen Schmidt# Licensed to the Apache Software Foundation (ASF) under one 4122c3632SJürgen Schmidt# or more contributor license agreements. See the NOTICE file 5122c3632SJürgen Schmidt# distributed with this work for additional information 6122c3632SJürgen Schmidt# regarding copyright ownership. The ASF licenses this file 7122c3632SJürgen Schmidt# to you under the Apache License, Version 2.0 (the 8122c3632SJürgen Schmidt# "License"); you may not use this file except in compliance 9122c3632SJürgen Schmidt# with the License. You may obtain a copy of the License at 102752044bSAriel Constenla-Haile# 11122c3632SJürgen Schmidt# http://www.apache.org/licenses/LICENSE-2.0 122752044bSAriel Constenla-Haile# 13122c3632SJürgen Schmidt# Unless required by applicable law or agreed to in writing, 14122c3632SJürgen Schmidt# software distributed under the License is distributed on an 15122c3632SJürgen Schmidt# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16122c3632SJürgen Schmidt# KIND, either express or implied. See the License for the 17122c3632SJürgen Schmidt# specific language governing permissions and limitations 18122c3632SJürgen Schmidt# under the License. 192752044bSAriel Constenla-Haile# 20122c3632SJürgen Schmidt#************************************************************** 21122c3632SJürgen Schmidt 22cdf0e10cSrcweir# Global settings file for the minimal build environment of the SDK 23cdf0e10cSrcweir# This file have to updated/extended for other platforms. 24cdf0e10cSrcweir 25cdf0e10cSrcweir# test for the platform 26cdf0e10cSrcweirPLATFORM := $(shell $(PRJ)/config.guess | cut -d"-" -f3,4) 27cdf0e10cSrcweir 28cdf0e10cSrcweir# config.guess is missing for windows. We rely on getting "" in this case. 29cdf0e10cSrcweirifeq "$(PLATFORM)" "" 30cdf0e10cSrcweirPLATFORM = windows 31cdf0e10cSrcweirendif 32cdf0e10cSrcweir 33cdf0e10cSrcweir# debug option, default is no debug 34cdf0e10cSrcweirDEBUG=no 35cdf0e10cSrcweirifeq "$(MAKECMDGOALS)" "debug" 36cdf0e10cSrcweirDEBUG=yes 37cdf0e10cSrcweirendif 38cdf0e10cSrcweir 39cdf0e10cSrcweir########################################################################### 40cdf0e10cSrcweir# 41cdf0e10cSrcweir# Java settings 42cdf0e10cSrcweir# 43cdf0e10cSrcweir########################################################################### 44cdf0e10cSrcweirJAVAC_FLAGS= 45cdf0e10cSrcweir 46cdf0e10cSrcweirifeq "$(DEBUG)" "yes" 47cdf0e10cSrcweirJAVAC_FLAGS+=-g 48cdf0e10cSrcweirendif 49cdf0e10cSrcweir 50cdf0e10cSrcweirJAVABIN=bin 51cdf0e10cSrcweir 52cdf0e10cSrcweir########################################################################### 53cdf0e10cSrcweir# 54cdf0e10cSrcweir# Windows specific settings 55cdf0e10cSrcweir# 56cdf0e10cSrcweir########################################################################### 57cdf0e10cSrcweirifeq "$(PLATFORM)" "windows" 58cdf0e10cSrcweir# Settings for Windows using Microsoft compiler/linker 59cdf0e10cSrcweir 60cdf0e10cSrcweirOS=WIN 61cdf0e10cSrcweirPS=\\ 62cdf0e10cSrcweirICL=$$ 63cdf0e10cSrcweirCC=cl 64cdf0e10cSrcweirLINK=link 65cdf0e10cSrcweirBUILDLIB=lib 66cdf0e10cSrcweirECHO=@echo 67cdf0e10cSrcweirMKDIR=mkdir 68cdf0e10cSrcweirMV=move 69cdf0e10cSrcweirCAT=type 70cdf0e10cSrcweirOBJ_EXT=obj 71cdf0e10cSrcweirEXE_EXT=.exe 72cdf0e10cSrcweirCOPY=copy 73cdf0e10cSrcweirSHAREDLIB_EXT=dll 74cdf0e10cSrcweirSHAREDLIB_OUT=$(OUT_BIN) 75cdf0e10cSrcweirUNOPKG_PLATFORM=Windows 76cdf0e10cSrcweir 77cdf0e10cSrcweirOSEP=^< 78cdf0e10cSrcweirCSEP=^> 79cdf0e10cSrcweirQUOTE= 80cdf0e10cSrcweirQM= 81cdf0e10cSrcweirSQM= 82cdf0e10cSrcweirECHOLINE=@echo. 83cdf0e10cSrcweirP2BG= 84cdf0e10cSrcweir 85cdf0e10cSrcweirDEL=del 86cdf0e10cSrcweirDELRECURSIVE=rd /S /Q 87cdf0e10cSrcweirURLPREFIX=file:/// 88cdf0e10cSrcweir 89cdf0e10cSrcweirSALLIB=isal.lib 90cdf0e10cSrcweirCPPULIB=icppu.lib 91cdf0e10cSrcweirCPPUHELPERLIB=icppuhelper.lib 92cdf0e10cSrcweirSALHELPERLIB=isalhelper.lib 93cdf0e10cSrcweirREGLIB=ireg.lib 94cdf0e10cSrcweirSTORELIB=istore.lib 95cdf0e10cSrcweir 96cdf0e10cSrcweirBLANK= 97cdf0e10cSrcweirEMPTYSTRING= 98cdf0e10cSrcweirPATH_SEPARATOR=; 99cdf0e10cSrcweir 100cdf0e10cSrcweir# use this for release version 101e5a7b9b2SHerbert DürrCC_FLAGS_JNI=-c -MT -Zm500 -Zc:wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -GR -EHa 102e5a7b9b2SHerbert DürrCC_FLAGS=-c -MT -Zm500 -Zc:wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -GR -EHa 103cdf0e10cSrcweirifeq "$(CPP_MANIFEST)" "true" 104cdf0e10cSrcweir#CC_FLAGS+=-EHa -Zc:wchar_t- 105cdf0e10cSrcweirLINK_MANIFEST=mt -manifest $@.manifest "-outputresource:$@;2" 106cdf0e10cSrcweirelse 107cdf0e10cSrcweir#CC_FLAGS+= 108cdf0e10cSrcweirLINK_MANIFEST= 109cdf0e10cSrcweirendif 110cdf0e10cSrcweirifeq "$(DEBUG)" "yes" 111cdf0e10cSrcweirCC_FLAGS_JNI+=-Zi 112cdf0e10cSrcweirCC_FLAGS+=-Zi 113cdf0e10cSrcweirendif 114cdf0e10cSrcweir 115cdf0e10cSrcweirCC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 116cdf0e10cSrcweirSTL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 117cdf0e10cSrcweirSDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/win32" 118cdf0e10cSrcweir 119cdf0e10cSrcweir# define for used compiler necessary for UNO 120cdf0e10cSrcweir# -DCPPU_ENV=msci -- windows msvc 4.x - 7.x 121cdf0e10cSrcweir 122cdf0e10cSrcweirCC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci 123cdf0e10cSrcweirCC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci 124cdf0e10cSrcweirCC_OUTPUT_SWITCH=-Fo 125cdf0e10cSrcweir 126cdf0e10cSrcweirLIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL /DEBUGTYPE:cv 127cdf0e10cSrcweirCOMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) /DEF:$(PRJ)/settings/component.uno.def 12875b2d2d7SJürgen SchmidtEXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1b000000 /DEBUGTYPE:cv /NODEFAULTLIB msvcrt.lib msvcprt.lib kernel32.lib 129cdf0e10cSrcweirifeq "$(DEBUG)" "yes" 130cdf0e10cSrcweirLIBRARY_LINK_FLAGS+=/DEBUG 131cdf0e10cSrcweirEXE_LINK_FLAGS+=/DEBUG 132cdf0e10cSrcweirendif 133cdf0e10cSrcweir 134cdf0e10cSrcweirLINK_JAVA_LIBS=/LIBPATH:"$(OO_SDK_JAVA_HOME)/lib" 135cdf0e10cSrcweir 136cdf0e10cSrcweir# use this for release version 137cdf0e10cSrcweir#EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1100000 138cdf0e10cSrcweir#LIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL 139cdf0e10cSrcweirendif 140cdf0e10cSrcweir 141cdf0e10cSrcweir 142cdf0e10cSrcweir 143cdf0e10cSrcweir########################################################################### 144cdf0e10cSrcweir# 145cdf0e10cSrcweir# Solaris specific settings 146cdf0e10cSrcweir# 147cdf0e10cSrcweir########################################################################### 148cdf0e10cSrcweirifneq (,$(findstring solaris,$(PLATFORM))) 149cdf0e10cSrcweir# Settings for Solaris using Sun Workshop compiler 150cdf0e10cSrcweir 151b3ba5bc7SJürgen SchmidtPROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)$(shell /usr/ccs/bin/elfdump -e "$(OFFICE_PROGRAM_PATH)/libuno_sal.so.3" | /usr/xpg4/bin/grep -q -w ELFCLASS64 && echo 64) 152cdf0e10cSrcweir 153cdf0e10cSrcweirifeq "$(PROCTYPE)" "sparc" 154cdf0e10cSrcweirPLATFORM=solsparc 155cdf0e10cSrcweirUNOPKG_PLATFORM=Solaris_SPARC 156cdf0e10cSrcweirJAVA_PROC_TYPE=sparc 157cdf0e10cSrcweirelse 158cdf0e10cSrcweirifeq "$(PROCTYPE)" "sparc64" 159cdf0e10cSrcweirPLATFORM=solsparc 160cdf0e10cSrcweirUNOPKG_PLATFORM=Solaris_SPARC64 161cdf0e10cSrcweirJAVA_PROC_TYPE=sparcv9 162cdf0e10cSrcweirelse 163cdf0e10cSrcweirPLATFORM=solintel 164cdf0e10cSrcweirUNOPKG_PLATFORM=Solaris_x86 165cdf0e10cSrcweirJAVA_PROC_TYPE=i386 166cdf0e10cSrcweirendif 167cdf0e10cSrcweirendif 168cdf0e10cSrcweir 169cdf0e10cSrcweirOS=SOLARIS 170cdf0e10cSrcweirPS=/ 171cdf0e10cSrcweirICL=\$$ 172cdf0e10cSrcweirCC=CC 173cdf0e10cSrcweirLINK=CC 174cdf0e10cSrcweirLIB=CC 175cdf0e10cSrcweirECHO=@echo 176cdf0e10cSrcweirMKDIR=mkdir -p 177cdf0e10cSrcweirCAT=cat 178cdf0e10cSrcweirOBJ_EXT=o 179cdf0e10cSrcweirSHAREDLIB_EXT=so 180cdf0e10cSrcweirSHAREDLIB_PRE=lib 181cdf0e10cSrcweirSHAREDLIB_OUT=$(OUT_LIB) 182cdf0e10cSrcweir 183cdf0e10cSrcweirOSEP=\< 184cdf0e10cSrcweirCSEP=\> 185cdf0e10cSrcweirQUOTE=$(subst S,\,S) 186cdf0e10cSrcweirQM=\" 187cdf0e10cSrcweirSQM=' 188cdf0e10cSrcweirECHOLINE=@echo 189cdf0e10cSrcweirP2BG=& 190cdf0e10cSrcweir 191cdf0e10cSrcweirDEL=rm -f 192cdf0e10cSrcweirDELRECURSIVE=rm -rf 193cdf0e10cSrcweirCOPY=cp 194cdf0e10cSrcweirURLPREFIX=file:// 195cdf0e10cSrcweir 196cdf0e10cSrcweir# Include UDK version numbers 197cdf0e10cSrcweirinclude $(PRJ)/include/udkversion.mk 198cdf0e10cSrcweir 199cdf0e10cSrcweirSALLIB=-luno_sal 200cdf0e10cSrcweirCPPULIB=-luno_cppu 201cdf0e10cSrcweirCPPUHELPERLIB=-luno_cppuhelperC52 202cdf0e10cSrcweirSALHELPERLIB=-luno_salhelperC52 203cdf0e10cSrcweirREGLIB=-lreg 204cdf0e10cSrcweirSTORELIB=-lstore 205cdf0e10cSrcweir 206cdf0e10cSrcweirEMPTYSTRING= 207cdf0e10cSrcweirPATH_SEPARATOR=: 208cdf0e10cSrcweir 209cdf0e10cSrcweirCC_FLAGS_JNI=-c -KPIC 210cdf0e10cSrcweirCC_FLAGS=-c -KPIC -xldscope=hidden 211cdf0e10cSrcweirifeq "$(DEBUG)" "yes" 212cdf0e10cSrcweirCC_FLAGS_JNI+=-g 213cdf0e10cSrcweirCC_FLAGS+=-g 214cdf0e10cSrcweirendif 215cdf0e10cSrcweirCC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 216cdf0e10cSrcweirSTL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 217cdf0e10cSrcweirSDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/solaris" 218cdf0e10cSrcweir 219cdf0e10cSrcweir# define for used compiler necessary for UNO 220cdf0e10cSrcweir# -DCPPU_ENV=sunpro5 -- sunpro cc 5.x solaris sparc/intel 221cdf0e10cSrcweir 222cdf0e10cSrcweirCC_DEFINES_JNI=-DUNX -DSOLARIS -DCPPU_ENV=sunpro5 223cdf0e10cSrcweirCC_DEFINES=-DUNX -DSOLARIS -DSPARC -DCPPU_ENV=sunpro5 -DHAVE_GCC_VISIBILITY_FEATURE 224cdf0e10cSrcweirCC_OUTPUT_SWITCH=-o 225cdf0e10cSrcweir 226cdf0e10cSrcweirLIBRARY_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp '-R$$ORIGIN' -z text -norunpath -G -Bdirect -Bdynamic -lpthread -lCrun -lc -lm 227cdf0e10cSrcweir# means if used CC is lower then version 5.5 use option -instance=static 228cdf0e10cSrcweirifeq ($(OO_SDK_CC_55_OR_HIGHER),) 229cdf0e10cSrcweirLIBRARY_LINK_FLAGS+=-instances=static 230cdf0e10cSrcweirendif 231cdf0e10cSrcweir#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -M $(PRJ)/settings/component.uno.map 232cdf0e10cSrcweirCOMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 233cdf0e10cSrcweir 234cdf0e10cSrcweirEXE_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -Bdirect -z defs 235ed9d7cbeSJürgen SchmidtLINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_OFFICE_LIB_DIR)" 236cdf0e10cSrcweirLINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 237cdf0e10cSrcweir 238cdf0e10cSrcweirifeq "$(PROCTYPE)" "sparc64" 239cdf0e10cSrcweirCC_FLAGS+=-m64 240cdf0e10cSrcweirLIBRARY_LINK_FLAGS+=-m64 241cdf0e10cSrcweirEXE_LINK_FLAGS+=-m64 242cdf0e10cSrcweirendif 243cdf0e10cSrcweir 244cdf0e10cSrcweirendif 245cdf0e10cSrcweir 246cdf0e10cSrcweir 247cdf0e10cSrcweir 248cdf0e10cSrcweir########################################################################### 249cdf0e10cSrcweir# 250cdf0e10cSrcweir# Linux specific settings 251cdf0e10cSrcweir# 252cdf0e10cSrcweir########################################################################### 253cdf0e10cSrcweirifneq (,$(findstring linux,$(PLATFORM))) 254cdf0e10cSrcweir# Settings for Linux using gcc compiler 255cdf0e10cSrcweir 256cdf0e10cSrcweirPROCTYPE := $(shell $(PRJ)/config.guess | cut -d "-" -f1 | sed -e 's/^i.86$$/i386/') 257cdf0e10cSrcweirPLATFORM=linux 258cdf0e10cSrcweir 259cdf0e10cSrcweirUNOPKG_PLATFORM=Linux_$(PROCTYPE) 260cdf0e10cSrcweirJAVA_PROC_TYPE=$(PROCTYPE) 261cdf0e10cSrcweir 262cdf0e10cSrcweirifeq "$(PROCTYPE)" "i386" 263cdf0e10cSrcweirUNOPKG_PLATFORM=Linux_x86 264cdf0e10cSrcweirJAVA_PROC_TYPE=i386 265cdf0e10cSrcweirendif 266cdf0e10cSrcweir 267cdf0e10cSrcweirifeq "$(PROCTYPE)" "powerpc" 268cdf0e10cSrcweirUNOPKG_PLATFORM=Linux_PowerPC 269cdf0e10cSrcweirJAVA_PROC_TYPE=ppc 270cdf0e10cSrcweirendif 271cdf0e10cSrcweir 272cdf0e10cSrcweirifeq "$(PROCTYPE)" "sparc" 273cdf0e10cSrcweirUNOPKG_PLATFORM=Linux_SPARC 274cdf0e10cSrcweirJAVA_PROC_TYPE=sparc 275cdf0e10cSrcweirendif 276cdf0e10cSrcweir 277cdf0e10cSrcweirifeq "$(PROCTYPE)" "x86_64" 278cdf0e10cSrcweirJAVA_PROC_TYPE=amd64 279cdf0e10cSrcweirendif 280cdf0e10cSrcweir 281cdf0e10cSrcweirifeq "$(PROCTYPE)" "powerpc64" 282cdf0e10cSrcweirJAVA_PROC_TYPE=ppc64 283cdf0e10cSrcweirendif 284cdf0e10cSrcweir 285cdf0e10cSrcweirOS=LINUX 286cdf0e10cSrcweirPS=/ 287cdf0e10cSrcweirICL=\$$ 288cdf0e10cSrcweirCC=gcc 289cdf0e10cSrcweirLINK=g++ 290cdf0e10cSrcweirLIB=g++ 291cdf0e10cSrcweirECHO=@echo 292cdf0e10cSrcweirMKDIR=mkdir -p 293cdf0e10cSrcweirCAT=cat 294cdf0e10cSrcweirOBJ_EXT=o 295cdf0e10cSrcweirSHAREDLIB_EXT=so 296cdf0e10cSrcweirSHAREDLIB_PRE=lib 297cdf0e10cSrcweirSHAREDLIB_OUT=$(OUT_LIB) 298cdf0e10cSrcweir 299cdf0e10cSrcweirGCC_VERSION=$(shell $(CC) -dumpversion) 300cdf0e10cSrcweir 301cdf0e10cSrcweirCOMID=gcc3 302cdf0e10cSrcweirCPPU_ENV=gcc3 303cdf0e10cSrcweir 304cdf0e10cSrcweirOSEP=\< 305cdf0e10cSrcweirCSEP=\> 306cdf0e10cSrcweirQUOTE=$(subst S,\,S) 307cdf0e10cSrcweirQM=\" 308cdf0e10cSrcweirSQM=' 309cdf0e10cSrcweirECHOLINE=@echo 310cdf0e10cSrcweirP2BG=& 311cdf0e10cSrcweir 312cdf0e10cSrcweirDEL=rm -f 313cdf0e10cSrcweirDELRECURSIVE=rm -rf 314cdf0e10cSrcweirCOPY=cp 315cdf0e10cSrcweirURLPREFIX=file:// 316cdf0e10cSrcweir 317cdf0e10cSrcweir# Include UDK version numbers 318cdf0e10cSrcweirinclude $(PRJ)/include/udkversion.mk 319cdf0e10cSrcweir 320cdf0e10cSrcweirSALLIB=-luno_sal 321cdf0e10cSrcweirCPPULIB=-luno_cppu 322cdf0e10cSrcweirCPPUHELPERLIB=-luno_cppuhelper$(COMID) 323cdf0e10cSrcweirSALHELPERLIB=-luno_salhelper$(COMID) 324cdf0e10cSrcweirREGLIB=-lreg 325cdf0e10cSrcweirSTORELIB=-lstore 326cdf0e10cSrcweir 327cdf0e10cSrcweirEMPTYSTRING= 328cdf0e10cSrcweirPATH_SEPARATOR=: 329cdf0e10cSrcweir 330cdf0e10cSrcweirCC_FLAGS_JNI=-c -fpic 331cdf0e10cSrcweirCC_FLAGS=-c -fpic -fvisibility=hidden 332cdf0e10cSrcweir# -O is necessary for inlining (see gcc documentation) 333cdf0e10cSrcweirifeq "$(DEBUG)" "yes" 334cdf0e10cSrcweirCC_FLAGS_JNI+=-g 335cdf0e10cSrcweirCC_FLAGS+=-g 336cdf0e10cSrcweirelse 337cdf0e10cSrcweirCC_FLAGS_JNI+=-O 338cdf0e10cSrcweirCC_FLAGS+=-O 339cdf0e10cSrcweirendif 340cdf0e10cSrcweir 341cdf0e10cSrcweirifeq "$(PROCTYPE)" "ppc" 342cdf0e10cSrcweirCC_FLAGS+=-fPIC 343cdf0e10cSrcweirendif 344cdf0e10cSrcweir 345cdf0e10cSrcweirSDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux" 346cdf0e10cSrcweirCC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 347cdf0e10cSrcweirSTL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 348*78ecfec3SDon LewisCC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) 349*78ecfec3SDon LewisCC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE 350cdf0e10cSrcweir 351cdf0e10cSrcweir# define for used compiler necessary for UNO 352cdf0e10cSrcweir#-DCPPU_ENV=gcc2 -- gcc 2.91/2.95 353cdf0e10cSrcweir#-DCPPU_ENV=gcc3 -- gcc3 3.0 354cdf0e10cSrcweir 355cdf0e10cSrcweirCC_OUTPUT_SWITCH=-o 356cdf0e10cSrcweir 357cdf0e10cSrcweirLIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN' 358cdf0e10cSrcweir 359cdf0e10cSrcweirifeq "$(PROCTYPE)" "ppc" 360cdf0e10cSrcweirLIBRARY_LINK_FLAGS+=-fPIC 361cdf0e10cSrcweirendif 362cdf0e10cSrcweir#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map 363cdf0e10cSrcweirCOMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 364cdf0e10cSrcweir 365cdf0e10cSrcweir#EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive 366cdf0e10cSrcweirEXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--no-whole-archive 367ed9d7cbeSJürgen SchmidtLINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_OFFICE_LIB_DIR)" 368cdf0e10cSrcweirLINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 369cdf0e10cSrcweir 370cdf0e10cSrcweirendif 371cdf0e10cSrcweir 372cdf0e10cSrcweir########################################################################### 373cdf0e10cSrcweir# 374cdf0e10cSrcweir# MacOSX/Darwin specific settings 375cdf0e10cSrcweir# 376cdf0e10cSrcweir########################################################################### 377cdf0e10cSrcweirifneq (,$(findstring darwin,$(PLATFORM))) 378789d489dSHerbert Dürr# Settings for MacOSX using LLVM version 4.2 (clang-425.0.28) 379cdf0e10cSrcweir 380cdf0e10cSrcweirPROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1) 381cdf0e10cSrcweir 382cdf0e10cSrcweir# Default is MacOSX on a Intel machine 383cdf0e10cSrcweirPLATFORM=macosx 384cdf0e10cSrcweir 385cdf0e10cSrcweirifeq "$(PROCTYPE)" "x86_64" 386789d489dSHerbert DürrUNOPKG_PLATFORM=MacOSX_x86_64 387cdf0e10cSrcweirendif 388789d489dSHerbert Dürr 389cdf0e10cSrcweirJAVABIN=Commands 390cdf0e10cSrcweir 391789d489dSHerbert DürrGCC_ARCH_OPTION=-arch x86_64 392cdf0e10cSrcweir 393cdf0e10cSrcweirOS=MACOSX 394cdf0e10cSrcweirPS=/ 395cdf0e10cSrcweirICL=\$$ 396789d489dSHerbert DürrCC=`xcrun -f clang` -arch x86_64 397789d489dSHerbert DürrCXX=`xcrun -f clang++` -arch x86_64 -std=c++11 398789d489dSHerbert DürrLINK=`xcrun -f clang++` -arch x86_64 -std=c++11 399789d489dSHerbert DürrLIB=`xcrun -f clang++` -arch x86_64 -std=c++11 400789d489dSHerbert DürrINSTALLTOOL=`xcrun -f install_name_tool` 401789d489dSHerbert Dürr 402cdf0e10cSrcweirECHO=@echo 403cdf0e10cSrcweirMKDIR=mkdir -p 404cdf0e10cSrcweirCAT=cat 405cdf0e10cSrcweirOBJ_EXT=o 406cdf0e10cSrcweirSHAREDLIB_EXT=dylib 407cdf0e10cSrcweirSHAREDLIB_PRE=lib 408cdf0e10cSrcweirSHAREDLIB_OUT=$(OUT_LIB) 409cdf0e10cSrcweir 410cdf0e10cSrcweirCOMID=gcc3 411cdf0e10cSrcweirCPPU_ENV=gcc3 412789d489dSHerbert DürrCOMID=s5abi 413789d489dSHerbert DürrCPPU_ENV=s5abi 414cdf0e10cSrcweir 415cdf0e10cSrcweirOSEP=\< 416cdf0e10cSrcweirCSEP=\> 417cdf0e10cSrcweirQUOTE=$(subst S,\,S) 418cdf0e10cSrcweirQM=\" 419cdf0e10cSrcweirSQM=' 420cdf0e10cSrcweirECHOLINE=@echo 421cdf0e10cSrcweirP2BG=& 422cdf0e10cSrcweir 423cdf0e10cSrcweirDEL=rm -f 424cdf0e10cSrcweirDELRECURSIVE=rm -rf 425cdf0e10cSrcweirCOPY=cp 426cdf0e10cSrcweirURLPREFIX=file:// 427cdf0e10cSrcweir 428cdf0e10cSrcweir# Include UDK version numbers 429cdf0e10cSrcweirinclude $(PRJ)/include/udkversion.mk 430cdf0e10cSrcweir 431cdf0e10cSrcweirSALLIB=-luno_sal 432cdf0e10cSrcweirCPPULIB=-luno_cppu 433cdf0e10cSrcweirCPPUHELPERLIB=-luno_cppuhelper$(COMID) 434cdf0e10cSrcweirSALHELPERLIB=-luno_salhelper$(COMID) 435cdf0e10cSrcweirREGLIB=-lreg 436cdf0e10cSrcweirSTORELIB=-lstore 437cdf0e10cSrcweir 438ed9d7cbeSJürgen SchmidtSALDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_sal.dylib.3:'$(OO_SDK_OFFICE_LIB_DIR)/libuno_sal.dylib' 439ed9d7cbeSJürgen SchmidtCPPUDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppu.dylib.3:'$(OO_SDK_OFFICE_LIB_DIR)/libuno_cppu.dylib' 440ed9d7cbeSJürgen SchmidtCPPUHELPERDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppuhelper'$(COMID).dylib.3:$(OO_SDK_OFFICE_LIB_DIR)/libuno_cppuhelper$(COMID).dylib' 441ed9d7cbeSJürgen SchmidtSALHELPERDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_salhelper$(COMID).dylib.3:'$(OO_SDK_OFFICE_LIB_DIR)/libuno_salhelper$(COMID).dylib' 442ed9d7cbeSJürgen SchmidtREGDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libreg.dylib.3:'$(OO_SDK_OFFICE_LIB_DIR)/libreg.dylib' 443ed9d7cbeSJürgen SchmidtSTOREDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libstore.dylib.3:'$(OO_SDK_OFFICE_LIB_DIR)/libstore.dylib' 444cdf0e10cSrcweir 445789d489dSHerbert DürrINSTALL_NAME_URELIBS=$(INSTALLTOOL) -change @__________________________________________________URELIB/libuno_sal.dylib.3 @executable_path/libuno_sal.dylib.3 -change @__________________________________________________URELIB/libuno_cppu.dylib.3 @executable_path/libuno_cppu.dylib.3 -change @__________________________________________________URELIB/libuno_cppuhelper$(COMID).dylib.3 @executable_path/libuno_cppuhelper$(COMID).dylib.3 -change @__________________________________________________URELIB/libuno_salhelper$(COMID).dylib.3 @executable_path/libuno_salhelper$(COMID).dylib.3 -change @__________________________________________________URELIB/libreg.dylib.3 @executable_path/libreg.dylib.3 -change @__________________________________________________URELIB/libstore.dylib.3 @executable_path/libstore.dylib.3 446cdf0e10cSrcweir 447789d489dSHerbert DürrINSTALL_NAME_URELIBS_BIN=$(INSTALLTOOL) -change @__________________________________________________URELIB/libuno_sal.dylib.3 libuno_sal.dylib.3 -change @__________________________________________________URELIB/libuno_cppu.dylib.3 libuno_cppu.dylib.3 -change @__________________________________________________URELIB/libuno_cppuhelper$(COMID).dylib.3 libuno_cppuhelper$(COMID).dylib.3 -change @__________________________________________________URELIB/libuno_salhelper$(COMID).dylib.3 libuno_salhelper$(COMID).dylib.3 -change @__________________________________________________URELIB/libreg.dylib.3 libreg.dylib.3 -change @__________________________________________________URELIB/libstore.dylib.3 libstore.dylib.3 448cdf0e10cSrcweir 449cdf0e10cSrcweirEMPTYSTRING= 450cdf0e10cSrcweirPATH_SEPARATOR=: 451cdf0e10cSrcweir 452789d489dSHerbert DürrCC_FLAGS_JNI=-c -fPIC -fno-common $(GCC_ARCH_OPTION) 453789d489dSHerbert DürrCC_FLAGS=-c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden 454789d489dSHerbert Dürr 455cdf0e10cSrcweir# -O is necessary for inlining (see gcc documentation) 456cdf0e10cSrcweirifeq "$(DEBUG)" "yes" 457cdf0e10cSrcweirCC_FLAGS_JNI+=-g 458cdf0e10cSrcweirCC_FLAGS+=-g 459cdf0e10cSrcweirelse 460cdf0e10cSrcweirCC_FLAGS_JNI+=-O 461cdf0e10cSrcweirCC_FLAGS+=-O 462cdf0e10cSrcweirendif 463cdf0e10cSrcweir 464cdf0e10cSrcweirSDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers 465cdf0e10cSrcweirCC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 466cdf0e10cSrcweirSTL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 467*78ecfec3SDon LewisCC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) 468*78ecfec3SDon LewisCC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE 469cdf0e10cSrcweir 470cdf0e10cSrcweirCC_OUTPUT_SWITCH=-o 471cdf0e10cSrcweir 472cdf0e10cSrcweirLIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress $(GCC_ARCH_OPTION) 473cdf0e10cSrcweir#-fPIC -fno-common 474cdf0e10cSrcweir 475cdf0e10cSrcweir# install_name '@executable_path$/(@:f)' 476cdf0e10cSrcweir#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,-exported_symbols_list $(COMP_MAPFILE) 477cdf0e10cSrcweirCOMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 478cdf0e10cSrcweir 479cdf0e10cSrcweirEXE_LINK_FLAGS=$(GCC_ARCH_OPTION) -Wl,-multiply_defined,suppress 480ed9d7cbeSJürgen SchmidtLINK_LIBS=-L$(OUT)/lib -L$(OO_SDK_OUT)/$(PLATFORM)/lib -L"$(OO_SDK_OFFICE_LIB_DIR)" 481cdf0e10cSrcweirLINK_JAVA_LIBS=-framework JavaVM 482cdf0e10cSrcweir#LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/Libraries" 483cdf0e10cSrcweir 484cdf0e10cSrcweirendif 485cdf0e10cSrcweir 486cdf0e10cSrcweir########################################################################### 487cdf0e10cSrcweir# 488cdf0e10cSrcweir# FreeBSD specific settings 489cdf0e10cSrcweir# 490cdf0e10cSrcweir########################################################################### 491cdf0e10cSrcweirifneq (,$(findstring freebsd,$(PLATFORM))) 492cdf0e10cSrcweir# Settings for FreeBSD using gcc compiler 493cdf0e10cSrcweir 494cdf0e10cSrcweirPROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1) 495cdf0e10cSrcweir 496cdf0e10cSrcweirifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM))) 497cdf0e10cSrcweirPLATFORM=kfreebsd 498cdf0e10cSrcweirifeq "$(PROCTYPE)" "x86_64" 499cdf0e10cSrcweirUNOPKG_PLATFORM=kFreeBSD_x86_64 500cdf0e10cSrcweirelse 501cdf0e10cSrcweirUNOPKG_PLATFORM=kFreeBSD_x86 502cdf0e10cSrcweirendif 503cdf0e10cSrcweirelse 504cdf0e10cSrcweirPLATFORM=freebsd 505cdf0e10cSrcweirifeq "$(PROCTYPE)" "x86_64" 506cdf0e10cSrcweirUNOPKG_PLATFORM=FreeBSD_x86_64 507cdf0e10cSrcweirelse 508cdf0e10cSrcweirUNOPKG_PLATFORM=FreeBSD_x86 509cdf0e10cSrcweirendif 510e15a4534Spfgifeq "$(PROCTYPE)" "powerpc" 511e15a4534SpfgUNOPKG_PLATFORM=FreeBSD_ppc 512e15a4534Spfgendif 513cdf0e10cSrcweirendif 514cdf0e10cSrcweir 515cdf0e10cSrcweirifeq "$(PROCTYPE)" "x86_64" 516cdf0e10cSrcweirJAVA_PROC_TYPE=amd64 517cdf0e10cSrcweirelse 518cdf0e10cSrcweirJAVA_PROC_TYPE=i386 519cdf0e10cSrcweirendif 520cdf0e10cSrcweir 521e15a4534Spfgifeq "$(PROCTYPE)" "powerpc64" 522e15a4534SpfgJAVA_PROC_TYPE=ppc64 523e15a4534Spfgendif 524e15a4534Spfg 525cdf0e10cSrcweirifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM))) 526cdf0e10cSrcweirOS=LINUX 527cdf0e10cSrcweirelse 528cdf0e10cSrcweirOS=FREEBSD 529cdf0e10cSrcweirendif 530cdf0e10cSrcweirPS=/ 531cdf0e10cSrcweirICL=\$$ 532cdf0e10cSrcweirCC=gcc 533cdf0e10cSrcweirLINK=g++ 534cdf0e10cSrcweirLIB=g++ 535cdf0e10cSrcweirECHO=@echo 536cdf0e10cSrcweirMKDIR=mkdir -p 537cdf0e10cSrcweirCAT=cat 538cdf0e10cSrcweirOBJ_EXT=o 539cdf0e10cSrcweirSHAREDLIB_EXT=so 540cdf0e10cSrcweirSHAREDLIB_PRE=lib 541cdf0e10cSrcweirSHAREDLIB_OUT=$(OUT_LIB) 542cdf0e10cSrcweir 543cdf0e10cSrcweirGCC_VERSION=$(shell $(CC) -dumpversion) 544cdf0e10cSrcweir 545cdf0e10cSrcweirCOMID=gcc3 546cdf0e10cSrcweirCPPU_ENV=gcc3 547cdf0e10cSrcweir 548cdf0e10cSrcweirOSEP=\< 549cdf0e10cSrcweirCSEP=\> 550cdf0e10cSrcweirQUOTE=$(subst S,\,S) 551cdf0e10cSrcweirQM=\" 552cdf0e10cSrcweirSQM=' 553cdf0e10cSrcweirECHOLINE=@echo 554cdf0e10cSrcweirP2BG=& 555cdf0e10cSrcweir 556cdf0e10cSrcweirDEL=rm -f 557cdf0e10cSrcweirDELRECURSIVE=rm -rf 558cdf0e10cSrcweirCOPY=cp 559cdf0e10cSrcweirURLPREFIX=file:// 560cdf0e10cSrcweir 561cdf0e10cSrcweir# Include UDK version numbers 562cdf0e10cSrcweirinclude $(PRJ)/include/udkversion.mk 563cdf0e10cSrcweir 564cdf0e10cSrcweirSALLIB=-luno_sal 565cdf0e10cSrcweirCPPULIB=-luno_cppu 566cdf0e10cSrcweirCPPUHELPERLIB=-luno_cppuhelper$(COMID) 567cdf0e10cSrcweirSALHELPERLIB=-luno_salhelper$(COMID) 568cdf0e10cSrcweirREGLIB=-lreg 569cdf0e10cSrcweirSTORELIB=-lstore 570cdf0e10cSrcweir 571cdf0e10cSrcweirEMPTYSTRING= 572cdf0e10cSrcweirPATH_SEPARATOR=: 573cdf0e10cSrcweir 574cdf0e10cSrcweirCC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) 575cdf0e10cSrcweirCC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden 576cdf0e10cSrcweir# -O is necessary for inlining (see gcc documentation) 577cdf0e10cSrcweirifeq "$(DEBUG)" "yes" 578cdf0e10cSrcweirCC_FLAGS_JNI+=-g 579cdf0e10cSrcweirCC_FLAGS+=-g 580cdf0e10cSrcweirelse 581cdf0e10cSrcweirCC_FLAGS_JNI+=-O 582cdf0e10cSrcweirCC_FLAGS+=-O 583cdf0e10cSrcweirendif 584cdf0e10cSrcweir 585cdf0e10cSrcweirSDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd" 586cdf0e10cSrcweirCC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 587cdf0e10cSrcweirSTL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 588*78ecfec3SDon LewisCC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) 589*78ecfec3SDon LewisCC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE 590cdf0e10cSrcweir 591cdf0e10cSrcweirCC_OUTPUT_SWITCH=-o 592cdf0e10cSrcweir 593cdf0e10cSrcweirLIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN' 594cdf0e10cSrcweir#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map 595cdf0e10cSrcweirCOMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 596cdf0e10cSrcweir 597cdf0e10cSrcweirEXE_LINK_FLAGS=-Wl,--allow-shlib-undefined 598cdf0e10cSrcweir#EXE_LINK_FLAGS+=-Wl,-export-dynamic -Wl,-z,defs 599ed9d7cbeSJürgen SchmidtLINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_OFFICE_LIB_DIR)" $(PTHREAD_LIBS) 600cdf0e10cSrcweirLINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 601cdf0e10cSrcweir 602cdf0e10cSrcweirendif 6032752044bSAriel Constenla-Haile 604ed9d7cbeSJürgen Schmidt# add additional boost specific settings 605ed9d7cbeSJürgen Schmidtifneq "$(OO_SDK_BOOST_HOME)" "" 606ed9d7cbeSJürgen SchmidtSTL_INCLUDES+= -I"$(OO_SDK_BOOST_HOME)" 607ed9d7cbeSJürgen Schmidtendif 6082752044bSAriel Constenla-Haile 6092752044bSAriel Constenla-Haile# Add OSL_DEBUG_LEVEL to compiler the flags (for OSL_TRACE et. al.) 6102752044bSAriel Constenla-Haileifeq "$(DEBUG)" "yes" 6112752044bSAriel Constenla-HaileCC_FLAGS += -DOSL_DEBUG_LEVEL=2 6122752044bSAriel Constenla-Haileendif 613