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 420 421OSEP=\< 422CSEP=\> 423QUOTE=$(subst S,\,S) 424QM=\" 425SQM=' 426ECHOLINE=@echo 427P2BG=& 428 429DEL=rm -f 430DELRECURSIVE=rm -rf 431COPY=cp 432URLPREFIX=file:// 433 434# Include UDK version numbers 435include $(PRJ)/include/udkversion.mk 436 437SALLIB=-luno_sal 438CPPULIB=-luno_cppu 439CPPUHELPERLIB=-luno_cppuhelper$(COMID) 440SALHELPERLIB=-luno_salhelper$(COMID) 441REGLIB=-lreg 442STORELIB=-lstore 443 444SALDYLIB=-Wl,-dylib_file,@_______URELIB/libuno_sal.dylib:'$(OO_SDK_OFFICE_LIB_DIR)/libuno_sal.dylib' 445CPPUDYLIB=-Wl,-dylib_file,@_______URELIB/libuno_cppu.dylib:'$(OO_SDK_OFFICE_LIB_DIR)/libuno_cppu.dylib' 446CPPUHELPERDYLIB=-Wl,-dylib_file,@_______URELIB/libuno_cppuhelper'$(COMID).dylib:$(OO_SDK_OFFICE_LIB_DIR)/libuno_cppuhelper$(COMID).dylib' 447SALHELPERDYLIB=-Wl,-dylib_file,@_______URELIB/libuno_salhelper$(COMID).dylib:'$(OO_SDK_OFFICE_LIB_DIR)/libuno_salhelper$(COMID).dylib' 448REGDYLIB=-Wl,-dylib_file,@_______URELIB/libreg.dylib:'$(OO_SDK_OFFICE_LIB_DIR)/libreg.dylib' 449STOREDYLIB=-Wl,-dylib_file,@_______URELIB/libstore.dylib:'$(OO_SDK_OFFICE_LIB_DIR)/libstore.dylib' 450 451INSTALL_NAME_URELIBS=$(INSTALLTOOL) -change @_______URELIB/libuno_sal.dylib @executable_path/libuno_sal.dylib -change @_______URELIB/libuno_cppu.dylib @executable_path/libuno_cppu.dylib -change @_______URELIB/libuno_cppuhelper$(COMID).dylib @executable_path/libuno_cppuhelper$(COMID).dylib -change @_______URELIB/libuno_salhelper$(COMID).dylib @executable_path/libuno_salhelper$(COMID).dylib -change @_______URELIB/libreg.dylib @executable_path/libreg.dylib -change @_______URELIB/libstore.dylib @executable_path/libstore.dylib 452 453INSTALL_NAME_URELIBS_BIN=$(INSTALLTOOL) -change @_______URELIB/libuno_sal.dylib libuno_sal.dylib -change @_______URELIB/libuno_cppu.dylib libuno_cppu.dylib -change @_______URELIB/libuno_cppuhelper$(COMID).dylib libuno_cppuhelper$(COMID).dylib -change @_______URELIB/libuno_salhelper$(COMID).dylib libuno_salhelper$(COMID).dylib -change @_______URELIB/libreg.dylib libreg.dylib -change @_______URELIB/libstore.dylib libstore.dylib 454 455EMPTYSTRING= 456PATH_SEPARATOR=: 457 458CC_FLAGS_JNI=-c -fPIC -fno-common $(GCC_ARCH_OPTION) 459CC_FLAGS=-c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden 460 461# -O is necessary for inlining (see gcc documentation) 462ifeq "$(DEBUG)" "yes" 463CC_FLAGS_JNI+=-g 464CC_FLAGS+=-g 465else 466CC_FLAGS_JNI+=-O 467CC_FLAGS+=-O 468endif 469 470SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers 471CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 472STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 473CC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) 474CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE 475 476CC_OUTPUT_SWITCH=-o 477 478LIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress $(GCC_ARCH_OPTION) 479#-fPIC -fno-common 480 481# install_name '@executable_path$/(@:f)' 482#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,-exported_symbols_list $(COMP_MAPFILE) 483COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 484 485EXE_LINK_FLAGS=$(GCC_ARCH_OPTION) -Wl,-multiply_defined,suppress 486LINK_LIBS=-L$(OUT)/lib -L$(OO_SDK_OUT)/$(PLATFORM)/lib -L"$(OO_SDK_OFFICE_LIB_DIR)" 487LINK_JAVA_LIBS=-framework JavaVM 488#LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/Libraries" 489 490endif 491 492########################################################################### 493# 494# FreeBSD specific settings 495# 496########################################################################### 497ifneq (,$(findstring freebsd,$(PLATFORM))) 498# Settings for FreeBSD using gcc compiler 499 500PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1) 501 502ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM))) 503PLATFORM=kfreebsd 504ifeq "$(PROCTYPE)" "x86_64" 505UNOPKG_PLATFORM=kFreeBSD_x86_64 506else 507UNOPKG_PLATFORM=kFreeBSD_x86 508endif 509else 510PLATFORM=freebsd 511ifeq "$(PROCTYPE)" "x86_64" 512UNOPKG_PLATFORM=FreeBSD_x86_64 513else 514UNOPKG_PLATFORM=FreeBSD_x86 515endif 516ifeq "$(PROCTYPE)" "powerpc" 517UNOPKG_PLATFORM=FreeBSD_ppc 518endif 519endif 520 521ifeq "$(PROCTYPE)" "x86_64" 522JAVA_PROC_TYPE=amd64 523else 524JAVA_PROC_TYPE=i386 525endif 526 527ifeq "$(PROCTYPE)" "powerpc64" 528JAVA_PROC_TYPE=ppc64 529endif 530 531ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM))) 532OS=LINUX 533else 534OS=FREEBSD 535endif 536PS=/ 537ICL=\$$ 538CC=gcc 539LINK=g++ 540LIB=g++ 541ECHO=@echo 542MKDIR=mkdir -p 543CAT=cat 544OBJ_EXT=o 545SHAREDLIB_EXT=so 546SHAREDLIB_PRE=lib 547SHAREDLIB_OUT=$(OUT_LIB) 548 549GCC_VERSION=$(shell $(CC) -dumpversion) 550 551COMID=gcc3 552CPPU_ENV=gcc3 553 554OSEP=\< 555CSEP=\> 556QUOTE=$(subst S,\,S) 557QM=\" 558SQM=' 559ECHOLINE=@echo 560P2BG=& 561 562DEL=rm -f 563DELRECURSIVE=rm -rf 564COPY=cp 565URLPREFIX=file:// 566 567# Include UDK version numbers 568include $(PRJ)/include/udkversion.mk 569 570SALLIB=-luno_sal 571CPPULIB=-luno_cppu 572CPPUHELPERLIB=-luno_cppuhelper$(COMID) 573SALHELPERLIB=-luno_salhelper$(COMID) 574REGLIB=-lreg 575STORELIB=-lstore 576 577EMPTYSTRING= 578PATH_SEPARATOR=: 579 580CC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) 581CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden 582# -O is necessary for inlining (see gcc documentation) 583ifeq "$(DEBUG)" "yes" 584CC_FLAGS_JNI+=-g 585CC_FLAGS+=-g 586else 587CC_FLAGS_JNI+=-O 588CC_FLAGS+=-O 589endif 590 591SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd" 592CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 593STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 594CC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) 595CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE 596 597CC_OUTPUT_SWITCH=-o 598 599LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN' 600#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map 601COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 602 603EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined 604#EXE_LINK_FLAGS+=-Wl,-export-dynamic -Wl,-z,defs 605LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_OFFICE_LIB_DIR)" $(PTHREAD_LIBS) 606LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 607 608endif 609 610# add additional boost specific settings 611ifneq "$(OO_SDK_BOOST_HOME)" "" 612STL_INCLUDES+= -I"$(OO_SDK_BOOST_HOME)" 613endif 614 615# Add OSL_DEBUG_LEVEL to compiler the flags (for OSL_TRACE et. al.) 616ifeq "$(DEBUG)" "yes" 617CC_FLAGS += -DOSL_DEBUG_LEVEL=2 618endif 619