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