1#************************************************************** 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20#************************************************************** 21 22# Global settings file for the minimal build environment of the SDK 23# This file have to updated/extended for other platforms. 24 25# test for the platform 26PLATFORM := $(shell $(PRJ)/config.guess | cut -d"-" -f3,4) 27 28# config.guess is missing for windows. We rely on getting "" in this case. 29ifeq "$(PLATFORM)" "" 30PLATFORM = windows 31endif 32 33# debug option, default is no debug 34DEBUG=no 35ifeq "$(MAKECMDGOALS)" "debug" 36DEBUG=yes 37endif 38 39########################################################################### 40# 41# Java settings 42# 43########################################################################### 44JAVAC_FLAGS= 45 46ifeq "$(DEBUG)" "yes" 47JAVAC_FLAGS+=-g 48endif 49 50JAVABIN=bin 51 52########################################################################### 53# 54# Windows specific settings 55# 56########################################################################### 57ifeq "$(PLATFORM)" "windows" 58# Settings for Windows using Microsoft compiler/linker 59 60PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1 | sed -e 's/^i.86$$/i386/') 61 62OS=WIN 63PS=\\ 64ICL=$$ 65CC=cl 66LINK=link 67BUILDLIB=lib 68ECHO=@echo 69MKDIR=mkdir 70MV=move 71CAT=type 72OBJ_EXT=obj 73EXE_EXT=.exe 74COPY=copy 75SHAREDLIB_EXT=dll 76SHAREDLIB_OUT=$(OUT_BIN) 77UNOPKG_PLATFORM=Windows 78 79OSEP=^< 80CSEP=^> 81QUOTE= 82QM= 83SQM= 84ECHOLINE=@echo. 85P2BG= 86 87DEL=del 88DELRECURSIVE=rd /S /Q 89URLPREFIX=file:/// 90 91SALLIB=isal.lib 92CPPULIB=icppu.lib 93CPPUHELPERLIB=icppuhelper.lib 94SALHELPERLIB=isalhelper.lib 95REGLIB=ireg.lib 96STORELIB=istore.lib 97 98BLANK= 99EMPTYSTRING= 100PATH_SEPARATOR=; 101 102# use this for release version 103CC_FLAGS_JNI=-c -MT -Zm500 -Zc:wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -GR -EHa 104CC_FLAGS=-c -MT -Zm500 -Zc:wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -GR -EHa 105ifeq "$(CPP_MANIFEST)" "true" 106#CC_FLAGS+=-EHa -Zc:wchar_t- 107LINK_MANIFEST=mt -manifest $@.manifest "-outputresource:$@;2" 108else 109#CC_FLAGS+= 110LINK_MANIFEST= 111endif 112ifeq "$(DEBUG)" "yes" 113CC_FLAGS_JNI+=-Zi 114CC_FLAGS+=-Zi 115endif 116 117CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 118STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 119SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/win32" 120 121# define for used compiler necessary for UNO 122# -DCPPU_ENV=msci -- windows msvc 4.x - 7.x 123 124ifeq "$(PROCTYPE)" "i386" 125CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci 126CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci 127endif 128ifeq "$(PROCTYPE)" "x86_64" 129CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=mscx 130CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=mscx 131endif 132CC_OUTPUT_SWITCH=-Fo 133 134LIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL /DEBUGTYPE:cv 135COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) /DEF:$(PRJ)/settings/component.uno.def 136EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1b000000 /DEBUGTYPE:cv /NODEFAULTLIB msvcrt.lib msvcprt.lib kernel32.lib 137ifeq "$(DEBUG)" "yes" 138LIBRARY_LINK_FLAGS+=/DEBUG 139EXE_LINK_FLAGS+=/DEBUG 140endif 141 142LINK_JAVA_LIBS=/LIBPATH:"$(OO_SDK_JAVA_HOME)/lib" 143 144# use this for release version 145#EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1100000 146#LIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL 147endif 148 149 150 151########################################################################### 152# 153# Solaris specific settings 154# 155########################################################################### 156ifneq (,$(findstring solaris,$(PLATFORM))) 157# Settings for Solaris using Sun Workshop compiler 158 159PROCTYPE := $(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) 160 161ifeq "$(PROCTYPE)" "sparc" 162PLATFORM=solsparc 163UNOPKG_PLATFORM=Solaris_SPARC 164JAVA_PROC_TYPE=sparc 165else 166ifeq "$(PROCTYPE)" "sparc64" 167PLATFORM=solsparc 168UNOPKG_PLATFORM=Solaris_SPARC64 169JAVA_PROC_TYPE=sparcv9 170else 171PLATFORM=solintel 172UNOPKG_PLATFORM=Solaris_x86 173JAVA_PROC_TYPE=i386 174endif 175endif 176 177OS=SOLARIS 178PS=/ 179ICL=\$$ 180CC=CC 181LINK=CC 182LIB=CC 183ECHO=@echo 184MKDIR=mkdir -p 185CAT=cat 186OBJ_EXT=o 187SHAREDLIB_EXT=so 188SHAREDLIB_PRE=lib 189SHAREDLIB_OUT=$(OUT_LIB) 190 191OSEP=\< 192CSEP=\> 193QUOTE=$(subst S,\,S) 194QM=\" 195SQM=' 196ECHOLINE=@echo 197P2BG=& 198 199DEL=rm -f 200DELRECURSIVE=rm -rf 201COPY=cp 202URLPREFIX=file:// 203 204# Include UDK version numbers 205include $(PRJ)/include/udkversion.mk 206 207SALLIB=-luno_sal 208CPPULIB=-luno_cppu 209CPPUHELPERLIB=-luno_cppuhelperC52 210SALHELPERLIB=-luno_salhelperC52 211REGLIB=-lreg 212STORELIB=-lstore 213 214EMPTYSTRING= 215PATH_SEPARATOR=: 216 217CC_FLAGS_JNI=-c -KPIC 218CC_FLAGS=-c -KPIC -xldscope=hidden 219ifeq "$(DEBUG)" "yes" 220CC_FLAGS_JNI+=-g 221CC_FLAGS+=-g 222endif 223CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 224STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 225SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/solaris" 226 227# define for used compiler necessary for UNO 228# -DCPPU_ENV=sunpro5 -- sunpro cc 5.x solaris sparc/intel 229 230CC_DEFINES_JNI=-DUNX -DSOLARIS -DCPPU_ENV=sunpro5 231CC_DEFINES=-DUNX -DSOLARIS -DSPARC -DCPPU_ENV=sunpro5 -DHAVE_GCC_VISIBILITY_FEATURE 232CC_OUTPUT_SWITCH=-o 233 234LIBRARY_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp '-R$$ORIGIN' -z text -norunpath -G -Bdirect -Bdynamic -lpthread -lCrun -lc -lm 235# means if used CC is lower then version 5.5 use option -instance=static 236ifeq ($(OO_SDK_CC_55_OR_HIGHER),) 237LIBRARY_LINK_FLAGS+=-instances=static 238endif 239#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -M $(PRJ)/settings/component.uno.map 240COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 241 242EXE_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -Bdirect -z defs 243LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_OFFICE_LIB_DIR)" 244LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 245 246ifeq "$(PROCTYPE)" "sparc64" 247CC_FLAGS+=-m64 248LIBRARY_LINK_FLAGS+=-m64 249EXE_LINK_FLAGS+=-m64 250endif 251 252endif 253 254 255 256########################################################################### 257# 258# Linux specific settings 259# 260########################################################################### 261ifneq (,$(findstring linux,$(PLATFORM))) 262# Settings for Linux using gcc compiler 263 264PROCTYPE := $(shell $(PRJ)/config.guess | cut -d "-" -f1 | sed -e 's/^i.86$$/i386/') 265PLATFORM=linux 266 267UNOPKG_PLATFORM=Linux_$(PROCTYPE) 268JAVA_PROC_TYPE=$(PROCTYPE) 269 270ifeq "$(PROCTYPE)" "i386" 271UNOPKG_PLATFORM=Linux_x86 272JAVA_PROC_TYPE=i386 273endif 274 275ifeq "$(PROCTYPE)" "powerpc" 276UNOPKG_PLATFORM=Linux_PowerPC 277JAVA_PROC_TYPE=ppc 278endif 279 280ifeq "$(PROCTYPE)" "sparc" 281UNOPKG_PLATFORM=Linux_SPARC 282JAVA_PROC_TYPE=sparc 283endif 284 285ifeq "$(PROCTYPE)" "x86_64" 286JAVA_PROC_TYPE=amd64 287endif 288 289ifeq "$(PROCTYPE)" "powerpc64" 290JAVA_PROC_TYPE=ppc64 291endif 292 293OS=LINUX 294PS=/ 295ICL=\$$ 296CC=gcc 297LINK=g++ 298LIB=g++ 299ECHO=@echo 300MKDIR=mkdir -p 301CAT=cat 302OBJ_EXT=o 303SHAREDLIB_EXT=so 304SHAREDLIB_PRE=lib 305SHAREDLIB_OUT=$(OUT_LIB) 306 307GCC_VERSION=$(shell $(CC) -dumpversion) 308 309COMID=gcc3 310CPPU_ENV=gcc3 311 312OSEP=\< 313CSEP=\> 314QUOTE=$(subst S,\,S) 315QM=\" 316SQM=' 317ECHOLINE=@echo 318P2BG=& 319 320DEL=rm -f 321DELRECURSIVE=rm -rf 322COPY=cp 323URLPREFIX=file:// 324 325# Include UDK version numbers 326include $(PRJ)/include/udkversion.mk 327 328SALLIB=-luno_sal 329CPPULIB=-luno_cppu 330CPPUHELPERLIB=-luno_cppuhelper$(COMID) 331SALHELPERLIB=-luno_salhelper$(COMID) 332REGLIB=-lreg 333STORELIB=-lstore 334 335EMPTYSTRING= 336PATH_SEPARATOR=: 337 338CC_FLAGS_JNI=-c -fpic 339CC_FLAGS=-c -fpic -fvisibility=hidden 340# -O is necessary for inlining (see gcc documentation) 341ifeq "$(DEBUG)" "yes" 342CC_FLAGS_JNI+=-g 343CC_FLAGS+=-g 344else 345CC_FLAGS_JNI+=-O 346CC_FLAGS+=-O 347endif 348 349ifeq "$(PROCTYPE)" "ppc" 350CC_FLAGS+=-fPIC 351endif 352 353SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux" 354CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 355STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 356CC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) 357CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE 358 359# define for used compiler necessary for UNO 360#-DCPPU_ENV=gcc2 -- gcc 2.91/2.95 361#-DCPPU_ENV=gcc3 -- gcc3 3.0 362 363CC_OUTPUT_SWITCH=-o 364 365LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN' 366 367ifeq "$(PROCTYPE)" "ppc" 368LIBRARY_LINK_FLAGS+=-fPIC 369endif 370#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map 371COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 372 373#EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive 374EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--no-whole-archive 375LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_OFFICE_LIB_DIR)" 376LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 377 378endif 379 380########################################################################### 381# 382# MacOSX/Darwin specific settings 383# 384########################################################################### 385ifneq (,$(findstring darwin,$(PLATFORM))) 386# Settings for MacOSX using LLVM version 4.2 (clang-425.0.28) 387 388PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1) 389 390# Default is MacOSX on a Intel machine 391PLATFORM=macosx 392 393ifeq "$(PROCTYPE)" "x86_64" 394UNOPKG_PLATFORM=MacOSX_x86_64 395endif 396 397JAVABIN=Commands 398 399GCC_ARCH_OPTION=-arch x86_64 400 401OS=MACOSX 402PS=/ 403ICL=\$$ 404CC=`xcrun -f clang` -arch x86_64 405CXX=`xcrun -f clang++` -arch x86_64 -std=c++11 406LINK=`xcrun -f clang++` -arch x86_64 -std=c++11 407LIB=`xcrun -f clang++` -arch x86_64 -std=c++11 408INSTALLTOOL=`xcrun -f install_name_tool` 409 410ECHO=@echo 411MKDIR=mkdir -p 412CAT=cat 413OBJ_EXT=o 414SHAREDLIB_EXT=dylib 415SHAREDLIB_PRE=lib 416SHAREDLIB_OUT=$(OUT_LIB) 417 418COMID=gcc3 419CPPU_ENV=gcc3 420COMID=s5abi 421CPPU_ENV=s5abi 422 423OSEP=\< 424CSEP=\> 425QUOTE=$(subst S,\,S) 426QM=\" 427SQM=' 428ECHOLINE=@echo 429P2BG=& 430 431DEL=rm -f 432DELRECURSIVE=rm -rf 433COPY=cp 434URLPREFIX=file:// 435 436# Include UDK version numbers 437include $(PRJ)/include/udkversion.mk 438 439SALLIB=-luno_sal3 440CPPULIB=-luno_cppu3 441CPPUHELPERLIB=-luno_cppuhelper3$(COMID) 442SALHELPERLIB=-luno_salhelper3$(COMID) 443REGLIB=-lreg3 444STORELIB=-lstore3 445 446SALDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_sal3.dylib:'$(OO_SDK_OFFICE_LIB_DIR)/libuno_sal.dylib' 447CPPUDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppu3.dylib:'$(OO_SDK_OFFICE_LIB_DIR)/libuno_cppu.dylib' 448CPPUHELPERDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppuhelper3'$(COMID).dylib:$(OO_SDK_OFFICE_LIB_DIR)/libuno_cppuhelper$(COMID).dylib' 449SALHELPERDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_salhelper3$(COMID).dylib:'$(OO_SDK_OFFICE_LIB_DIR)/libuno_salhelper$(COMID).dylib' 450REGDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libreg3.dylib:'$(OO_SDK_OFFICE_LIB_DIR)/libreg.dylib' 451STOREDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libstore3.dylib:'$(OO_SDK_OFFICE_LIB_DIR)/libstore.dylib' 452 453INSTALL_NAME_URELIBS=$(INSTALLTOOL) -change @__________________________________________________URELIB/libuno3_sal.dylib @executable_path/libuno_sal3.dylib -change @__________________________________________________URELIB/libuno_cppu3.dylib @executable_path/libuno_cppu3.dylib -change @__________________________________________________URELIB/libuno_cppuhelper$(COMID)3.dylib @executable_path/libuno_cppuhelper$(COMID)3.dylib -change @__________________________________________________URELIB/libuno_salhelper$(COMID)3.dylib @executable_path/libuno_salhelper$(COMID)3.dylib -change @__________________________________________________URELIB/libreg3.dylib @executable_path/libreg3.dylib -change @__________________________________________________URELIB/libstore3.dylib @executable_path/libstore3.dylib 454 455INSTALL_NAME_URELIBS_BIN=$(INSTALLTOOL) -change @__________________________________________________URELIB/libuno_sal3.dylib libuno_sal3.dylib -change @__________________________________________________URELIB/libuno_cppu3.dylib libuno_cppu3.dylib -change @__________________________________________________URELIB/libuno_cppuhelper$(COMID)3.dylib libuno_cppuhelper$(COMID)3.dylib -change @__________________________________________________URELIB/libuno_salhelper$(COMID)3.dylib libuno_salhelper$(COMID)3.dylib -change @__________________________________________________URELIB/libreg3.dylib libreg3.dylib -change @__________________________________________________URELIB/libstore3.dylib libstore3.dylib 456 457EMPTYSTRING= 458PATH_SEPARATOR=: 459 460CC_FLAGS_JNI=-c -fPIC -fno-common $(GCC_ARCH_OPTION) 461CC_FLAGS=-c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden 462 463# -O is necessary for inlining (see gcc documentation) 464ifeq "$(DEBUG)" "yes" 465CC_FLAGS_JNI+=-g 466CC_FLAGS+=-g 467else 468CC_FLAGS_JNI+=-O 469CC_FLAGS+=-O 470endif 471 472SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers 473CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 474STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 475CC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) 476CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE 477 478CC_OUTPUT_SWITCH=-o 479 480LIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress $(GCC_ARCH_OPTION) 481#-fPIC -fno-common 482 483# install_name '@executable_path$/(@:f)' 484#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,-exported_symbols_list $(COMP_MAPFILE) 485COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 486 487EXE_LINK_FLAGS=$(GCC_ARCH_OPTION) -Wl,-multiply_defined,suppress 488LINK_LIBS=-L$(OUT)/lib -L$(OO_SDK_OUT)/$(PLATFORM)/lib -L"$(OO_SDK_OFFICE_LIB_DIR)" 489LINK_JAVA_LIBS=-framework JavaVM 490#LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/Libraries" 491 492endif 493 494########################################################################### 495# 496# FreeBSD specific settings 497# 498########################################################################### 499ifneq (,$(findstring freebsd,$(PLATFORM))) 500# Settings for FreeBSD using gcc compiler 501 502PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1) 503 504ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM))) 505PLATFORM=kfreebsd 506ifeq "$(PROCTYPE)" "x86_64" 507UNOPKG_PLATFORM=kFreeBSD_x86_64 508else 509UNOPKG_PLATFORM=kFreeBSD_x86 510endif 511else 512PLATFORM=freebsd 513ifeq "$(PROCTYPE)" "x86_64" 514UNOPKG_PLATFORM=FreeBSD_x86_64 515else 516UNOPKG_PLATFORM=FreeBSD_x86 517endif 518ifeq "$(PROCTYPE)" "powerpc" 519UNOPKG_PLATFORM=FreeBSD_ppc 520endif 521endif 522 523ifeq "$(PROCTYPE)" "x86_64" 524JAVA_PROC_TYPE=amd64 525else 526JAVA_PROC_TYPE=i386 527endif 528 529ifeq "$(PROCTYPE)" "powerpc64" 530JAVA_PROC_TYPE=ppc64 531endif 532 533ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM))) 534OS=LINUX 535else 536OS=FREEBSD 537endif 538PS=/ 539ICL=\$$ 540CC=gcc 541LINK=g++ 542LIB=g++ 543ECHO=@echo 544MKDIR=mkdir -p 545CAT=cat 546OBJ_EXT=o 547SHAREDLIB_EXT=so 548SHAREDLIB_PRE=lib 549SHAREDLIB_OUT=$(OUT_LIB) 550 551GCC_VERSION=$(shell $(CC) -dumpversion) 552 553COMID=gcc3 554CPPU_ENV=gcc3 555 556OSEP=\< 557CSEP=\> 558QUOTE=$(subst S,\,S) 559QM=\" 560SQM=' 561ECHOLINE=@echo 562P2BG=& 563 564DEL=rm -f 565DELRECURSIVE=rm -rf 566COPY=cp 567URLPREFIX=file:// 568 569# Include UDK version numbers 570include $(PRJ)/include/udkversion.mk 571 572SALLIB=-luno_sal 573CPPULIB=-luno_cppu 574CPPUHELPERLIB=-luno_cppuhelper$(COMID) 575SALHELPERLIB=-luno_salhelper$(COMID) 576REGLIB=-lreg 577STORELIB=-lstore 578 579EMPTYSTRING= 580PATH_SEPARATOR=: 581 582CC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) 583CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden 584# -O is necessary for inlining (see gcc documentation) 585ifeq "$(DEBUG)" "yes" 586CC_FLAGS_JNI+=-g 587CC_FLAGS+=-g 588else 589CC_FLAGS_JNI+=-O 590CC_FLAGS+=-O 591endif 592 593SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd" 594CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 595STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 596CC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) 597CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE 598 599CC_OUTPUT_SWITCH=-o 600 601LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN' 602#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map 603COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 604 605EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined 606#EXE_LINK_FLAGS+=-Wl,-export-dynamic -Wl,-z,defs 607LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_OFFICE_LIB_DIR)" $(PTHREAD_LIBS) 608LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 609 610endif 611 612# add additional boost specific settings 613ifneq "$(OO_SDK_BOOST_HOME)" "" 614STL_INCLUDES+= -I"$(OO_SDK_BOOST_HOME)" 615endif 616 617# Add OSL_DEBUG_LEVEL to compiler the flags (for OSL_TRACE et. al.) 618ifeq "$(DEBUG)" "yes" 619CC_FLAGS += -DOSL_DEBUG_LEVEL=2 620endif 621