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) 75cdf0e10cSrcweirPACKAGE_LIB_DIR=windows.plt 76cdf0e10cSrcweirUNOPKG_PLATFORM=Windows 77cdf0e10cSrcweir 78cdf0e10cSrcweirOSEP=^< 79cdf0e10cSrcweirCSEP=^> 80cdf0e10cSrcweirQUOTE= 81cdf0e10cSrcweirQM= 82cdf0e10cSrcweirSQM= 83cdf0e10cSrcweirECHOLINE=@echo. 84cdf0e10cSrcweirP2BG= 85cdf0e10cSrcweir 86cdf0e10cSrcweirDEL=del 87cdf0e10cSrcweirDELRECURSIVE=rd /S /Q 88cdf0e10cSrcweirURLPREFIX=file:/// 89cdf0e10cSrcweir 90cdf0e10cSrcweirSALLIB=isal.lib 91cdf0e10cSrcweirCPPULIB=icppu.lib 92cdf0e10cSrcweirCPPUHELPERLIB=icppuhelper.lib 93cdf0e10cSrcweirSALHELPERLIB=isalhelper.lib 94cdf0e10cSrcweirREGLIB=ireg.lib 95cdf0e10cSrcweirSTORELIB=istore.lib 96cdf0e10cSrcweir 97cdf0e10cSrcweirBLANK= 98cdf0e10cSrcweirEMPTYSTRING= 99cdf0e10cSrcweirPATH_SEPARATOR=; 100cdf0e10cSrcweir 101cdf0e10cSrcweir# use this for release version 102cdf0e10cSrcweirCC_FLAGS_JNI=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa 103cdf0e10cSrcweirCC_FLAGS=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa 104cdf0e10cSrcweirifeq "$(CPP_MANIFEST)" "true" 105cdf0e10cSrcweir#CC_FLAGS+=-EHa -Zc:wchar_t- 106cdf0e10cSrcweirLINK_MANIFEST=mt -manifest $@.manifest "-outputresource:$@;2" 107cdf0e10cSrcweirelse 108cdf0e10cSrcweir#CC_FLAGS+= 109cdf0e10cSrcweirLINK_MANIFEST= 110cdf0e10cSrcweirendif 111cdf0e10cSrcweirifeq "$(DEBUG)" "yes" 112cdf0e10cSrcweirCC_FLAGS_JNI+=-Zi 113cdf0e10cSrcweirCC_FLAGS+=-Zi 114cdf0e10cSrcweirendif 115cdf0e10cSrcweir 116cdf0e10cSrcweirCC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 117cdf0e10cSrcweirSTL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 118cdf0e10cSrcweirSDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/win32" 119cdf0e10cSrcweir 120cdf0e10cSrcweir# define for used compiler necessary for UNO 121cdf0e10cSrcweir# -DCPPU_ENV=msci -- windows msvc 4.x - 7.x 122cdf0e10cSrcweir 123cdf0e10cSrcweirCC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci 124cdf0e10cSrcweirCC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci 125cdf0e10cSrcweirCC_OUTPUT_SWITCH=-Fo 126cdf0e10cSrcweir 127cdf0e10cSrcweirLIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL /DEBUGTYPE:cv 128cdf0e10cSrcweirCOMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) /DEF:$(PRJ)/settings/component.uno.def 129*75b2d2d7SJürgen SchmidtEXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1b000000 /DEBUGTYPE:cv /NODEFAULTLIB msvcrt.lib msvcprt.lib kernel32.lib 130cdf0e10cSrcweirifeq "$(DEBUG)" "yes" 131cdf0e10cSrcweirLIBRARY_LINK_FLAGS+=/DEBUG 132cdf0e10cSrcweirEXE_LINK_FLAGS+=/DEBUG 133cdf0e10cSrcweirendif 134cdf0e10cSrcweir 135cdf0e10cSrcweirLINK_JAVA_LIBS=/LIBPATH:"$(OO_SDK_JAVA_HOME)/lib" 136cdf0e10cSrcweir 137b3ba5bc7SJürgen Schmidt#ifneq "$(OFFICE_PROGRAM_PATH)" "" 138b3ba5bc7SJürgen Schmidt#URE_MISC=$(OFFICE_PROGRAM_PATH)\misc 139b3ba5bc7SJürgen Schmidt#endif 140cdf0e10cSrcweir 141cdf0e10cSrcweir# use this for release version 142cdf0e10cSrcweir#EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1100000 143cdf0e10cSrcweir#LIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL 144cdf0e10cSrcweirendif 145cdf0e10cSrcweir 146cdf0e10cSrcweir 147cdf0e10cSrcweir 148cdf0e10cSrcweir########################################################################### 149cdf0e10cSrcweir# 150cdf0e10cSrcweir# Solaris specific settings 151cdf0e10cSrcweir# 152cdf0e10cSrcweir########################################################################### 153cdf0e10cSrcweirifneq (,$(findstring solaris,$(PLATFORM))) 154cdf0e10cSrcweir# Settings for Solaris using Sun Workshop compiler 155cdf0e10cSrcweir 156b3ba5bc7SJü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) 157cdf0e10cSrcweir 158cdf0e10cSrcweirifeq "$(PROCTYPE)" "sparc" 159cdf0e10cSrcweirPLATFORM=solsparc 160cdf0e10cSrcweirPACKAGE_LIB_DIR=solaris_sparc.plt 161cdf0e10cSrcweirUNOPKG_PLATFORM=Solaris_SPARC 162cdf0e10cSrcweirJAVA_PROC_TYPE=sparc 163cdf0e10cSrcweirelse 164cdf0e10cSrcweirifeq "$(PROCTYPE)" "sparc64" 165cdf0e10cSrcweirPLATFORM=solsparc 166cdf0e10cSrcweirPACKAGE_LIB_DIR=solaris_sparc64.plt 167cdf0e10cSrcweirUNOPKG_PLATFORM=Solaris_SPARC64 168cdf0e10cSrcweirJAVA_PROC_TYPE=sparcv9 169cdf0e10cSrcweirelse 170cdf0e10cSrcweirPLATFORM=solintel 171cdf0e10cSrcweirPACKAGE_LIB_DIR=solaris_x86.plt 172cdf0e10cSrcweirUNOPKG_PLATFORM=Solaris_x86 173cdf0e10cSrcweirJAVA_PROC_TYPE=i386 174cdf0e10cSrcweirendif 175cdf0e10cSrcweirendif 176cdf0e10cSrcweir 177cdf0e10cSrcweirOS=SOLARIS 178cdf0e10cSrcweirPS=/ 179cdf0e10cSrcweirICL=\$$ 180cdf0e10cSrcweirCC=CC 181cdf0e10cSrcweirLINK=CC 182cdf0e10cSrcweirLIB=CC 183cdf0e10cSrcweirECHO=@echo 184cdf0e10cSrcweirMKDIR=mkdir -p 185cdf0e10cSrcweirCAT=cat 186cdf0e10cSrcweirOBJ_EXT=o 187cdf0e10cSrcweirSHAREDLIB_EXT=so 188cdf0e10cSrcweirSHAREDLIB_PRE=lib 189cdf0e10cSrcweirSHAREDLIB_OUT=$(OUT_LIB) 190cdf0e10cSrcweir 191cdf0e10cSrcweirOSEP=\< 192cdf0e10cSrcweirCSEP=\> 193cdf0e10cSrcweirQUOTE=$(subst S,\,S) 194cdf0e10cSrcweirQM=\" 195cdf0e10cSrcweirSQM=' 196cdf0e10cSrcweirECHOLINE=@echo 197cdf0e10cSrcweirP2BG=& 198cdf0e10cSrcweir 199cdf0e10cSrcweirDEL=rm -f 200cdf0e10cSrcweirDELRECURSIVE=rm -rf 201cdf0e10cSrcweirCOPY=cp 202cdf0e10cSrcweirURLPREFIX=file:// 203cdf0e10cSrcweir 204cdf0e10cSrcweir# Include UDK version numbers 205cdf0e10cSrcweirinclude $(PRJ)/include/udkversion.mk 206cdf0e10cSrcweir 207cdf0e10cSrcweirSALLIB=-luno_sal 208cdf0e10cSrcweirCPPULIB=-luno_cppu 209cdf0e10cSrcweirCPPUHELPERLIB=-luno_cppuhelperC52 210cdf0e10cSrcweirSALHELPERLIB=-luno_salhelperC52 211cdf0e10cSrcweirREGLIB=-lreg 212cdf0e10cSrcweirSTORELIB=-lstore 213cdf0e10cSrcweir 214cdf0e10cSrcweirEMPTYSTRING= 215cdf0e10cSrcweirPATH_SEPARATOR=: 216cdf0e10cSrcweir 217cdf0e10cSrcweirCC_FLAGS_JNI=-c -KPIC 218cdf0e10cSrcweirCC_FLAGS=-c -KPIC -xldscope=hidden 219cdf0e10cSrcweirifeq "$(DEBUG)" "yes" 220cdf0e10cSrcweirCC_FLAGS_JNI+=-g 221cdf0e10cSrcweirCC_FLAGS+=-g 222cdf0e10cSrcweirendif 223cdf0e10cSrcweirCC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 224cdf0e10cSrcweirSTL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 225cdf0e10cSrcweirSDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/solaris" 226cdf0e10cSrcweir 227cdf0e10cSrcweir# define for used compiler necessary for UNO 228cdf0e10cSrcweir# -DCPPU_ENV=sunpro5 -- sunpro cc 5.x solaris sparc/intel 229cdf0e10cSrcweir 230cdf0e10cSrcweirCC_DEFINES_JNI=-DUNX -DSOLARIS -DCPPU_ENV=sunpro5 231cdf0e10cSrcweirCC_DEFINES=-DUNX -DSOLARIS -DSPARC -DCPPU_ENV=sunpro5 -DHAVE_GCC_VISIBILITY_FEATURE 232cdf0e10cSrcweirCC_OUTPUT_SWITCH=-o 233cdf0e10cSrcweir 234cdf0e10cSrcweirLIBRARY_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp '-R$$ORIGIN' -z text -norunpath -G -Bdirect -Bdynamic -lpthread -lCrun -lc -lm 235cdf0e10cSrcweir# means if used CC is lower then version 5.5 use option -instance=static 236cdf0e10cSrcweirifeq ($(OO_SDK_CC_55_OR_HIGHER),) 237cdf0e10cSrcweirLIBRARY_LINK_FLAGS+=-instances=static 238cdf0e10cSrcweirendif 239cdf0e10cSrcweir#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -M $(PRJ)/settings/component.uno.map 240cdf0e10cSrcweirCOMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 241cdf0e10cSrcweir 242cdf0e10cSrcweirEXE_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -Bdirect -z defs 243cdf0e10cSrcweirLINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)" 244cdf0e10cSrcweirLINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 245cdf0e10cSrcweir 246cdf0e10cSrcweirifeq "$(PROCTYPE)" "sparc64" 247cdf0e10cSrcweirCC_FLAGS+=-m64 248cdf0e10cSrcweirLIBRARY_LINK_FLAGS+=-m64 249cdf0e10cSrcweirEXE_LINK_FLAGS+=-m64 250cdf0e10cSrcweirendif 251cdf0e10cSrcweir 252b3ba5bc7SJürgen Schmidtifneq "$(OFFICE_PROGRAM_PATH)" "" 253b3ba5bc7SJürgen SchmidtURE_MISC=$(OFFICE_PROGRAM_PATH)/share/misc 254cdf0e10cSrcweirendif 255cdf0e10cSrcweir 256cdf0e10cSrcweirendif 257cdf0e10cSrcweir 258cdf0e10cSrcweir 259cdf0e10cSrcweir 260cdf0e10cSrcweir########################################################################### 261cdf0e10cSrcweir# 262cdf0e10cSrcweir# Linux specific settings 263cdf0e10cSrcweir# 264cdf0e10cSrcweir########################################################################### 265cdf0e10cSrcweirifneq (,$(findstring linux,$(PLATFORM))) 266cdf0e10cSrcweir# Settings for Linux using gcc compiler 267cdf0e10cSrcweir 268cdf0e10cSrcweirPROCTYPE := $(shell $(PRJ)/config.guess | cut -d "-" -f1 | sed -e 's/^i.86$$/i386/') 269cdf0e10cSrcweirPLATFORM=linux 270cdf0e10cSrcweir 271cdf0e10cSrcweirPACKAGE_LIB_DIR=linux_$(PROCTYPE).plt 272cdf0e10cSrcweirUNOPKG_PLATFORM=Linux_$(PROCTYPE) 273cdf0e10cSrcweirJAVA_PROC_TYPE=$(PROCTYPE) 274cdf0e10cSrcweir 275cdf0e10cSrcweirifeq "$(PROCTYPE)" "i386" 276cdf0e10cSrcweirPACKAGE_LIB_DIR=linux_x86.plt 277cdf0e10cSrcweirUNOPKG_PLATFORM=Linux_x86 278cdf0e10cSrcweirJAVA_PROC_TYPE=i386 279cdf0e10cSrcweirendif 280cdf0e10cSrcweir 281cdf0e10cSrcweirifeq "$(PROCTYPE)" "powerpc" 282cdf0e10cSrcweirPACKAGE_LIB_DIR=linux_powerpc.plt 283cdf0e10cSrcweirUNOPKG_PLATFORM=Linux_PowerPC 284cdf0e10cSrcweirJAVA_PROC_TYPE=ppc 285cdf0e10cSrcweirendif 286cdf0e10cSrcweir 287cdf0e10cSrcweirifeq "$(PROCTYPE)" "sparc" 288cdf0e10cSrcweirPACKAGE_LIB_DIR=linux_sparc.plt 289cdf0e10cSrcweirUNOPKG_PLATFORM=Linux_SPARC 290cdf0e10cSrcweirJAVA_PROC_TYPE=sparc 291cdf0e10cSrcweirendif 292cdf0e10cSrcweir 293cdf0e10cSrcweirifeq "$(PROCTYPE)" "x86_64" 294cdf0e10cSrcweirJAVA_PROC_TYPE=amd64 295cdf0e10cSrcweirendif 296cdf0e10cSrcweir 297cdf0e10cSrcweirifeq "$(PROCTYPE)" "powerpc64" 298cdf0e10cSrcweirJAVA_PROC_TYPE=ppc64 299cdf0e10cSrcweirendif 300cdf0e10cSrcweir 301cdf0e10cSrcweirOS=LINUX 302cdf0e10cSrcweirPS=/ 303cdf0e10cSrcweirICL=\$$ 304cdf0e10cSrcweirCC=gcc 305cdf0e10cSrcweirLINK=g++ 306cdf0e10cSrcweirLIB=g++ 307cdf0e10cSrcweirECHO=@echo 308cdf0e10cSrcweirMKDIR=mkdir -p 309cdf0e10cSrcweirCAT=cat 310cdf0e10cSrcweirOBJ_EXT=o 311cdf0e10cSrcweirSHAREDLIB_EXT=so 312cdf0e10cSrcweirSHAREDLIB_PRE=lib 313cdf0e10cSrcweirSHAREDLIB_OUT=$(OUT_LIB) 314cdf0e10cSrcweir 315cdf0e10cSrcweirGCC_VERSION=$(shell $(CC) -dumpversion) 316cdf0e10cSrcweir 317cdf0e10cSrcweirCOMID=gcc3 318cdf0e10cSrcweirCPPU_ENV=gcc3 319cdf0e10cSrcweir 320cdf0e10cSrcweirOSEP=\< 321cdf0e10cSrcweirCSEP=\> 322cdf0e10cSrcweirQUOTE=$(subst S,\,S) 323cdf0e10cSrcweirQM=\" 324cdf0e10cSrcweirSQM=' 325cdf0e10cSrcweirECHOLINE=@echo 326cdf0e10cSrcweirP2BG=& 327cdf0e10cSrcweir 328cdf0e10cSrcweirDEL=rm -f 329cdf0e10cSrcweirDELRECURSIVE=rm -rf 330cdf0e10cSrcweirCOPY=cp 331cdf0e10cSrcweirURLPREFIX=file:// 332cdf0e10cSrcweir 333cdf0e10cSrcweir# Include UDK version numbers 334cdf0e10cSrcweirinclude $(PRJ)/include/udkversion.mk 335cdf0e10cSrcweir 336cdf0e10cSrcweirSALLIB=-luno_sal 337cdf0e10cSrcweirCPPULIB=-luno_cppu 338cdf0e10cSrcweirCPPUHELPERLIB=-luno_cppuhelper$(COMID) 339cdf0e10cSrcweirSALHELPERLIB=-luno_salhelper$(COMID) 340cdf0e10cSrcweirREGLIB=-lreg 341cdf0e10cSrcweirSTORELIB=-lstore 342cdf0e10cSrcweir 343cdf0e10cSrcweirEMPTYSTRING= 344cdf0e10cSrcweirPATH_SEPARATOR=: 345cdf0e10cSrcweir 346cdf0e10cSrcweirCC_FLAGS_JNI=-c -fpic 347cdf0e10cSrcweirCC_FLAGS=-c -fpic -fvisibility=hidden 348cdf0e10cSrcweir# -O is necessary for inlining (see gcc documentation) 349cdf0e10cSrcweirifeq "$(DEBUG)" "yes" 350cdf0e10cSrcweirCC_FLAGS_JNI+=-g 351cdf0e10cSrcweirCC_FLAGS+=-g 352cdf0e10cSrcweirelse 353cdf0e10cSrcweirCC_FLAGS_JNI+=-O 354cdf0e10cSrcweirCC_FLAGS+=-O 355cdf0e10cSrcweirendif 356cdf0e10cSrcweir 357cdf0e10cSrcweirifeq "$(PROCTYPE)" "ppc" 358cdf0e10cSrcweirCC_FLAGS+=-fPIC 359cdf0e10cSrcweirendif 360cdf0e10cSrcweir 361cdf0e10cSrcweirSDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux" 362cdf0e10cSrcweirCC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 363cdf0e10cSrcweirSTL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 364cdf0e10cSrcweirCC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) 365cdf0e10cSrcweirCC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE 366cdf0e10cSrcweir 367cdf0e10cSrcweir# define for used compiler necessary for UNO 368cdf0e10cSrcweir#-DCPPU_ENV=gcc2 -- gcc 2.91/2.95 369cdf0e10cSrcweir#-DCPPU_ENV=gcc3 -- gcc3 3.0 370cdf0e10cSrcweir 371cdf0e10cSrcweirCC_OUTPUT_SWITCH=-o 372cdf0e10cSrcweir 373cdf0e10cSrcweirLIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN' 374cdf0e10cSrcweir 375cdf0e10cSrcweirifeq "$(PROCTYPE)" "ppc" 376cdf0e10cSrcweirLIBRARY_LINK_FLAGS+=-fPIC 377cdf0e10cSrcweirendif 378cdf0e10cSrcweir#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map 379cdf0e10cSrcweirCOMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 380cdf0e10cSrcweir 381cdf0e10cSrcweir#EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive 382cdf0e10cSrcweirEXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--no-whole-archive 383cdf0e10cSrcweirLINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)" 384cdf0e10cSrcweirLINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 385cdf0e10cSrcweir 386b3ba5bc7SJürgen Schmidtifneq "$(OFFICE_PROGRAM_PATH)" "" 387b3ba5bc7SJürgen SchmidtURE_MISC=$(OFFICE_PROGRAM_PATH)/share/misc 388cdf0e10cSrcweirendif 389cdf0e10cSrcweir 390cdf0e10cSrcweirendif 391cdf0e10cSrcweir 392cdf0e10cSrcweir########################################################################### 393cdf0e10cSrcweir# 394cdf0e10cSrcweir# MacOSX/Darwin specific settings 395cdf0e10cSrcweir# 396cdf0e10cSrcweir########################################################################### 397cdf0e10cSrcweirifneq (,$(findstring darwin,$(PLATFORM))) 398cdf0e10cSrcweir# Settings for MacOSX using gcc 4.0.1 compiler 399cdf0e10cSrcweir 400cdf0e10cSrcweirPROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1) 401cdf0e10cSrcweir 402cdf0e10cSrcweir# Default is MacOSX on a Intel machine 403cdf0e10cSrcweirPLATFORM=macosx 404cdf0e10cSrcweir 405cdf0e10cSrcweirifeq "$(PROCTYPE)" "i386" 406cdf0e10cSrcweirPACKAGE_LIB_DIR=macosx_x86.plt 407cdf0e10cSrcweirUNOPKG_PLATFORM=MacOSX_x86 408cdf0e10cSrcweirJAVA_PROC_TYPE=x86 409cdf0e10cSrcweirelse 410cdf0e10cSrcweirifeq "$(PROCTYPE)" "x86_64" 411cdf0e10cSrcweirPACKAGE_LIB_DIR=macosx_x86.plt 412cdf0e10cSrcweirUNOPKG_PLATFORM=MacOSX_x86 413cdf0e10cSrcweirJAVA_PROC_TYPE=x86 414cdf0e10cSrcweirelse 415cdf0e10cSrcweirPACKAGE_LIB_DIR=macosx_ppc.plt 416cdf0e10cSrcweirUNOPKG_PLATFORM=MacOSX_PowerPC 417cdf0e10cSrcweirJAVA_PROC_TYPE=ppc 418cdf0e10cSrcweirendif 419cdf0e10cSrcweirendif 420cdf0e10cSrcweirJAVABIN=Commands 421cdf0e10cSrcweir 422cdf0e10cSrcweirGCC_VERSION =$(shell gcc -dumpversion| cut -d"." -f1,2) 423cdf0e10cSrcweirifeq "$(GCC_VERSION)" "4.2" 424cdf0e10cSrcweirGCC_ARCH_OPTION=-arch i386 425cdf0e10cSrcweirendif 426cdf0e10cSrcweir 427cdf0e10cSrcweirOS=MACOSX 428cdf0e10cSrcweirPS=/ 429cdf0e10cSrcweirICL=\$$ 430cdf0e10cSrcweirCC=gcc-$(GCC_VERSION) 431cdf0e10cSrcweirLINK=g++-$(GCC_VERSION) 432cdf0e10cSrcweirLIB=g++-$(GCC_VERSION) 433cdf0e10cSrcweirECHO=@echo 434cdf0e10cSrcweirMKDIR=mkdir -p 435cdf0e10cSrcweirCAT=cat 436cdf0e10cSrcweirOBJ_EXT=o 437cdf0e10cSrcweirSHAREDLIB_EXT=dylib 438cdf0e10cSrcweirSHAREDLIB_PRE=lib 439cdf0e10cSrcweirSHAREDLIB_OUT=$(OUT_LIB) 440cdf0e10cSrcweir 441cdf0e10cSrcweirCOMID=gcc3 442cdf0e10cSrcweirCPPU_ENV=gcc3 443cdf0e10cSrcweir 444cdf0e10cSrcweirOSEP=\< 445cdf0e10cSrcweirCSEP=\> 446cdf0e10cSrcweirQUOTE=$(subst S,\,S) 447cdf0e10cSrcweirQM=\" 448cdf0e10cSrcweirSQM=' 449cdf0e10cSrcweirECHOLINE=@echo 450cdf0e10cSrcweirP2BG=& 451cdf0e10cSrcweir 452cdf0e10cSrcweirDEL=rm -f 453cdf0e10cSrcweirDELRECURSIVE=rm -rf 454cdf0e10cSrcweirCOPY=cp 455cdf0e10cSrcweirURLPREFIX=file:// 456cdf0e10cSrcweir 457cdf0e10cSrcweir# Include UDK version numbers 458cdf0e10cSrcweirinclude $(PRJ)/include/udkversion.mk 459cdf0e10cSrcweir 460cdf0e10cSrcweirSALLIB=-luno_sal 461cdf0e10cSrcweirCPPULIB=-luno_cppu 462cdf0e10cSrcweirCPPUHELPERLIB=-luno_cppuhelper$(COMID) 463cdf0e10cSrcweirSALHELPERLIB=-luno_salhelper$(COMID) 464cdf0e10cSrcweirREGLIB=-lreg 465cdf0e10cSrcweirSTORELIB=-lstore 466cdf0e10cSrcweir 467cdf0e10cSrcweirSALDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_sal.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libuno_sal.dylib' 468cdf0e10cSrcweirCPPUDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppu.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libuno_cppu.dylib' 469cdf0e10cSrcweirCPPUHELPERDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppuhelper'$(COMID).dylib.3:$(OO_SDK_URE_LIB_DIR)/libuno_cppuhelper$(COMID).dylib' 470cdf0e10cSrcweirSALHELPERDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_salhelper$(COMID).dylib.3:'$(OO_SDK_URE_LIB_DIR)/libuno_salhelper$(COMID).dylib' 471cdf0e10cSrcweirREGDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libreg.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libreg.dylib' 472cdf0e10cSrcweirSTOREDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libstore.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libstore.dylib' 473cdf0e10cSrcweir 474b3ba5bc7SJürgen SchmidtINSTALL_NAME_URELIBS=install_name_tool -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 475cdf0e10cSrcweir 476cdf0e10cSrcweirINSTALL_NAME_URELIBS_BIN=install_name_tool -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 477cdf0e10cSrcweir 478cdf0e10cSrcweirEMPTYSTRING= 479cdf0e10cSrcweirPATH_SEPARATOR=: 480cdf0e10cSrcweir 481cdf0e10cSrcweirCC_FLAGS_JNI=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) 482cdf0e10cSrcweirCC_FLAGS=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden 483cdf0e10cSrcweir# -O is necessary for inlining (see gcc documentation) 484cdf0e10cSrcweirifeq "$(DEBUG)" "yes" 485cdf0e10cSrcweirCC_FLAGS_JNI+=-g 486cdf0e10cSrcweirCC_FLAGS+=-g 487cdf0e10cSrcweirelse 488cdf0e10cSrcweirCC_FLAGS_JNI+=-O 489cdf0e10cSrcweirCC_FLAGS+=-O 490cdf0e10cSrcweirendif 491cdf0e10cSrcweir 492cdf0e10cSrcweirSDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers 493cdf0e10cSrcweirCC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 494cdf0e10cSrcweirSTL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 495cdf0e10cSrcweirCC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) 496cdf0e10cSrcweirCC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE 497cdf0e10cSrcweir 498cdf0e10cSrcweirCC_OUTPUT_SWITCH=-o 499cdf0e10cSrcweir 500cdf0e10cSrcweirLIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress $(GCC_ARCH_OPTION) 501cdf0e10cSrcweir#-fPIC -fno-common 502cdf0e10cSrcweir 503cdf0e10cSrcweir# install_name '@executable_path$/(@:f)' 504cdf0e10cSrcweir#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,-exported_symbols_list $(COMP_MAPFILE) 505cdf0e10cSrcweirCOMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 506cdf0e10cSrcweir 507cdf0e10cSrcweirEXE_LINK_FLAGS=$(GCC_ARCH_OPTION) -Wl,-multiply_defined,suppress 508cdf0e10cSrcweirLINK_LIBS=-L$(OUT)/lib -L$(OO_SDK_OUT)/$(PLATFORM)/lib -L"$(OO_SDK_URE_LIB_DIR)" 509cdf0e10cSrcweirLINK_JAVA_LIBS=-framework JavaVM 510cdf0e10cSrcweir#LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/Libraries" 511cdf0e10cSrcweir 512b3ba5bc7SJürgen Schmidtifneq "$(OFFICE_PROGRAM_PATH)" "" 513b3ba5bc7SJürgen SchmidtURE_MISC=$(OFFICE_PROGRAM_PATH)/share/misc 514cdf0e10cSrcweirendif 515cdf0e10cSrcweir 516cdf0e10cSrcweirendif 517cdf0e10cSrcweir 518cdf0e10cSrcweir########################################################################### 519cdf0e10cSrcweir# 520cdf0e10cSrcweir# FreeBSD specific settings 521cdf0e10cSrcweir# 522cdf0e10cSrcweir########################################################################### 523cdf0e10cSrcweirifneq (,$(findstring freebsd,$(PLATFORM))) 524cdf0e10cSrcweir# Settings for FreeBSD using gcc compiler 525cdf0e10cSrcweir 526cdf0e10cSrcweirPROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1) 527cdf0e10cSrcweir 528cdf0e10cSrcweirifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM))) 529cdf0e10cSrcweirPLATFORM=kfreebsd 530cdf0e10cSrcweirifeq "$(PROCTYPE)" "x86_64" 531cdf0e10cSrcweirPACKAGE_LIB_DIR=kfreebsd_x86_64.plt 532cdf0e10cSrcweirUNOPKG_PLATFORM=kFreeBSD_x86_64 533cdf0e10cSrcweirelse 534cdf0e10cSrcweirPACKAGE_LIB_DIR=kfreebsd_x86.plt 535cdf0e10cSrcweirUNOPKG_PLATFORM=kFreeBSD_x86 536cdf0e10cSrcweirendif 537cdf0e10cSrcweirelse 538cdf0e10cSrcweirPLATFORM=freebsd 539cdf0e10cSrcweirifeq "$(PROCTYPE)" "x86_64" 540cdf0e10cSrcweirPACKAGE_LIB_DIR=freebsd_x86_64.plt 541cdf0e10cSrcweirUNOPKG_PLATFORM=FreeBSD_x86_64 542cdf0e10cSrcweirelse 543cdf0e10cSrcweirPACKAGE_LIB_DIR=freebsd_x86.plt 544cdf0e10cSrcweirUNOPKG_PLATFORM=FreeBSD_x86 545cdf0e10cSrcweirendif 546cdf0e10cSrcweirendif 547cdf0e10cSrcweir 548cdf0e10cSrcweirifeq "$(PROCTYPE)" "x86_64" 549cdf0e10cSrcweirJAVA_PROC_TYPE=amd64 550cdf0e10cSrcweirelse 551cdf0e10cSrcweirJAVA_PROC_TYPE=i386 552cdf0e10cSrcweirendif 553cdf0e10cSrcweir 554cdf0e10cSrcweirifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM))) 555cdf0e10cSrcweirOS=LINUX 556cdf0e10cSrcweirelse 557cdf0e10cSrcweirOS=FREEBSD 558cdf0e10cSrcweirendif 559cdf0e10cSrcweirPS=/ 560cdf0e10cSrcweirICL=\$$ 561cdf0e10cSrcweirCC=gcc 562cdf0e10cSrcweirLINK=g++ 563cdf0e10cSrcweirLIB=g++ 564cdf0e10cSrcweirECHO=@echo 565cdf0e10cSrcweirMKDIR=mkdir -p 566cdf0e10cSrcweirCAT=cat 567cdf0e10cSrcweirOBJ_EXT=o 568cdf0e10cSrcweirSHAREDLIB_EXT=so 569cdf0e10cSrcweirSHAREDLIB_PRE=lib 570cdf0e10cSrcweirSHAREDLIB_OUT=$(OUT_LIB) 571cdf0e10cSrcweir 572cdf0e10cSrcweirGCC_VERSION=$(shell $(CC) -dumpversion) 573cdf0e10cSrcweir 574cdf0e10cSrcweirCOMID=gcc3 575cdf0e10cSrcweirCPPU_ENV=gcc3 576cdf0e10cSrcweir 577cdf0e10cSrcweirOSEP=\< 578cdf0e10cSrcweirCSEP=\> 579cdf0e10cSrcweirQUOTE=$(subst S,\,S) 580cdf0e10cSrcweirQM=\" 581cdf0e10cSrcweirSQM=' 582cdf0e10cSrcweirECHOLINE=@echo 583cdf0e10cSrcweirP2BG=& 584cdf0e10cSrcweir 585cdf0e10cSrcweirDEL=rm -f 586cdf0e10cSrcweirDELRECURSIVE=rm -rf 587cdf0e10cSrcweirCOPY=cp 588cdf0e10cSrcweirURLPREFIX=file:// 589cdf0e10cSrcweir 590cdf0e10cSrcweir# Include UDK version numbers 591cdf0e10cSrcweirinclude $(PRJ)/include/udkversion.mk 592cdf0e10cSrcweir 593cdf0e10cSrcweirSALLIB=-luno_sal 594cdf0e10cSrcweirCPPULIB=-luno_cppu 595cdf0e10cSrcweirCPPUHELPERLIB=-luno_cppuhelper$(COMID) 596cdf0e10cSrcweirSALHELPERLIB=-luno_salhelper$(COMID) 597cdf0e10cSrcweirREGLIB=-lreg 598cdf0e10cSrcweirSTORELIB=-lstore 599cdf0e10cSrcweir 600cdf0e10cSrcweirEMPTYSTRING= 601cdf0e10cSrcweirPATH_SEPARATOR=: 602cdf0e10cSrcweir 603cdf0e10cSrcweirCC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) 604cdf0e10cSrcweirCC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden 605cdf0e10cSrcweir# -O is necessary for inlining (see gcc documentation) 606cdf0e10cSrcweirifeq "$(DEBUG)" "yes" 607cdf0e10cSrcweirCC_FLAGS_JNI+=-g 608cdf0e10cSrcweirCC_FLAGS+=-g 609cdf0e10cSrcweirelse 610cdf0e10cSrcweirCC_FLAGS_JNI+=-O 611cdf0e10cSrcweirCC_FLAGS+=-O 612cdf0e10cSrcweirendif 613cdf0e10cSrcweir 614cdf0e10cSrcweirSDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd" 615cdf0e10cSrcweirCC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 616cdf0e10cSrcweirSTL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 617cdf0e10cSrcweirCC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) 618cdf0e10cSrcweirCC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE 619cdf0e10cSrcweir 620cdf0e10cSrcweirCC_OUTPUT_SWITCH=-o 621cdf0e10cSrcweir 622cdf0e10cSrcweirLIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN' 623cdf0e10cSrcweir#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map 624cdf0e10cSrcweirCOMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 625cdf0e10cSrcweir 626cdf0e10cSrcweirEXE_LINK_FLAGS=-Wl,--allow-shlib-undefined 627cdf0e10cSrcweir#EXE_LINK_FLAGS+=-Wl,-export-dynamic -Wl,-z,defs 628cdf0e10cSrcweirLINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)" $(PTHREAD_LIBS) 629cdf0e10cSrcweirLINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 630cdf0e10cSrcweir 631b3ba5bc7SJürgen Schmidt#ifneq "$(OFFICE_PROGRAM_PATH)" "" 632b3ba5bc7SJürgen Schmidt#URE_MISC=$(OFFICE_PROGRAM_PATH)/share/misc 633b3ba5bc7SJürgen Schmidt#endif 634cdf0e10cSrcweir 635cdf0e10cSrcweirendif 6362752044bSAriel Constenla-Haile 6372752044bSAriel Constenla-Haile 6382752044bSAriel Constenla-Haile# Add OSL_DEBUG_LEVEL to compiler the flags (for OSL_TRACE et. al.) 6392752044bSAriel Constenla-Haileifeq "$(DEBUG)" "yes" 6402752044bSAriel Constenla-HaileCC_FLAGS += -DOSL_DEBUG_LEVEL=2 6412752044bSAriel Constenla-Haileendif 642