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 60OS=WIN 61PS=\\ 62ICL=$$ 63CC=cl 64LINK=link 65BUILDLIB=lib 66ECHO=@echo 67MKDIR=mkdir 68MV=move 69CAT=type 70OBJ_EXT=obj 71EXE_EXT=.exe 72COPY=copy 73SHAREDLIB_EXT=dll 74SHAREDLIB_OUT=$(OUT_BIN) 75PACKAGE_LIB_DIR=windows.plt 76UNOPKG_PLATFORM=Windows 77 78OSEP=^< 79CSEP=^> 80QUOTE= 81QM= 82SQM= 83ECHOLINE=@echo. 84P2BG= 85 86DEL=del 87DELRECURSIVE=rd /S /Q 88URLPREFIX=file:/// 89 90SALLIB=isal.lib 91CPPULIB=icppu.lib 92CPPUHELPERLIB=icppuhelper.lib 93SALHELPERLIB=isalhelper.lib 94REGLIB=ireg.lib 95STORELIB=istore.lib 96STLPORTLIB=stlport_vc71$(STLDEBUG).lib 97 98BLANK= 99EMPTYSTRING= 100PATH_SEPARATOR=; 101 102# use this for release version 103CC_FLAGS_JNI=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa 104CC_FLAGS=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -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 124CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci 125CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci 126CC_OUTPUT_SWITCH=-Fo 127 128LIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL /DEBUGTYPE:cv 129COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) /DEF:$(PRJ)/settings/component.uno.def 130EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1b000000 /DEBUGTYPE:cv /NODEFAULTLIB msvcrt.lib kernel32.lib 131ifeq "$(DEBUG)" "yes" 132LIBRARY_LINK_FLAGS+=/DEBUG 133EXE_LINK_FLAGS+=/DEBUG 134endif 135 136LINK_JAVA_LIBS=/LIBPATH:"$(OO_SDK_JAVA_HOME)/lib" 137 138ifneq "$(OO_SDK_URE_HOME)" "" 139URE_MISC=$(OO_SDK_URE_HOME)\misc 140endif 141 142# use this for release version 143#EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1100000 144#LIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL 145endif 146 147 148 149########################################################################### 150# 151# Solaris specific settings 152# 153########################################################################### 154ifneq (,$(findstring solaris,$(PLATFORM))) 155# Settings for Solaris using Sun Workshop compiler 156 157PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)$(shell /usr/ccs/bin/elfdump -e "$(OO_SDK_URE_HOME)/lib/libuno_sal.so.3" | /usr/xpg4/bin/grep -q -w ELFCLASS64 && echo 64) 158 159ifeq "$(PROCTYPE)" "sparc" 160PLATFORM=solsparc 161PACKAGE_LIB_DIR=solaris_sparc.plt 162UNOPKG_PLATFORM=Solaris_SPARC 163JAVA_PROC_TYPE=sparc 164else 165ifeq "$(PROCTYPE)" "sparc64" 166PLATFORM=solsparc 167PACKAGE_LIB_DIR=solaris_sparc64.plt 168UNOPKG_PLATFORM=Solaris_SPARC64 169JAVA_PROC_TYPE=sparcv9 170else 171PLATFORM=solintel 172PACKAGE_LIB_DIR=solaris_x86.plt 173UNOPKG_PLATFORM=Solaris_x86 174JAVA_PROC_TYPE=i386 175endif 176endif 177 178OS=SOLARIS 179PS=/ 180ICL=\$$ 181CC=CC 182LINK=CC 183LIB=CC 184ECHO=@echo 185MKDIR=mkdir -p 186CAT=cat 187OBJ_EXT=o 188SHAREDLIB_EXT=so 189SHAREDLIB_PRE=lib 190SHAREDLIB_OUT=$(OUT_LIB) 191 192OSEP=\< 193CSEP=\> 194QUOTE=$(subst S,\,S) 195QM=\" 196SQM=' 197ECHOLINE=@echo 198P2BG=& 199 200DEL=rm -f 201DELRECURSIVE=rm -rf 202COPY=cp 203URLPREFIX=file:// 204 205# Include UDK version numbers 206include $(PRJ)/include/udkversion.mk 207 208SALLIB=-luno_sal 209CPPULIB=-luno_cppu 210CPPUHELPERLIB=-luno_cppuhelperC52 211SALHELPERLIB=-luno_salhelperC52 212REGLIB=-lreg 213STORELIB=-lstore 214ifeq "$(PROCTYPE)" "sparc64" 215STLPORTLIB=-library=stlport4 216else 217STLPORTLIB=-lstlport_sunpro$(STLDEBUG) 218endif 219 220EMPTYSTRING= 221PATH_SEPARATOR=: 222 223CC_FLAGS_JNI=-c -KPIC 224CC_FLAGS=-c -KPIC -xldscope=hidden 225ifeq "$(DEBUG)" "yes" 226CC_FLAGS_JNI+=-g 227CC_FLAGS+=-g 228endif 229CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 230STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 231SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/solaris" 232 233# define for used compiler necessary for UNO 234# -DCPPU_ENV=sunpro5 -- sunpro cc 5.x solaris sparc/intel 235 236CC_DEFINES_JNI=-DUNX -DSOLARIS -DCPPU_ENV=sunpro5 237CC_DEFINES=-DUNX -DSOLARIS -DSPARC -DCPPU_ENV=sunpro5 -DHAVE_GCC_VISIBILITY_FEATURE 238CC_OUTPUT_SWITCH=-o 239 240LIBRARY_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp '-R$$ORIGIN' -z text -norunpath -G -Bdirect -Bdynamic -lpthread -lCrun -lc -lm 241# means if used CC is lower then version 5.5 use option -instance=static 242ifeq ($(OO_SDK_CC_55_OR_HIGHER),) 243LIBRARY_LINK_FLAGS+=-instances=static 244endif 245#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -M $(PRJ)/settings/component.uno.map 246COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 247 248EXE_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -Bdirect -z defs 249LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)" 250LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 251 252ifeq "$(PROCTYPE)" "sparc64" 253CC_FLAGS+=-m64 254LIBRARY_LINK_FLAGS+=-m64 255EXE_LINK_FLAGS+=-m64 256endif 257 258ifneq "$(OO_SDK_URE_HOME)" "" 259URE_MISC=$(OO_SDK_URE_HOME)/share/misc 260endif 261 262endif 263 264 265 266########################################################################### 267# 268# Linux specific settings 269# 270########################################################################### 271ifneq (,$(findstring linux,$(PLATFORM))) 272# Settings for Linux using gcc compiler 273 274PROCTYPE := $(shell $(PRJ)/config.guess | cut -d "-" -f1 | sed -e 's/^i.86$$/i386/') 275PLATFORM=linux 276 277PACKAGE_LIB_DIR=linux_$(PROCTYPE).plt 278UNOPKG_PLATFORM=Linux_$(PROCTYPE) 279JAVA_PROC_TYPE=$(PROCTYPE) 280STLPORT=no 281 282ifeq "$(PROCTYPE)" "i386" 283PACKAGE_LIB_DIR=linux_x86.plt 284UNOPKG_PLATFORM=Linux_x86 285JAVA_PROC_TYPE=i386 286STLPORT=yes 287endif 288 289ifeq "$(PROCTYPE)" "powerpc" 290PACKAGE_LIB_DIR=linux_powerpc.plt 291UNOPKG_PLATFORM=Linux_PowerPC 292JAVA_PROC_TYPE=ppc 293STLPORT=yes 294endif 295 296ifeq "$(PROCTYPE)" "sparc" 297PACKAGE_LIB_DIR=linux_sparc.plt 298UNOPKG_PLATFORM=Linux_SPARC 299JAVA_PROC_TYPE=sparc 300STLPORT=yes 301endif 302 303ifeq "$(PROCTYPE)" "x86_64" 304JAVA_PROC_TYPE=amd64 305endif 306 307ifeq "$(PROCTYPE)" "powerpc64" 308JAVA_PROC_TYPE=ppc64 309endif 310 311OS=LINUX 312PS=/ 313ICL=\$$ 314CC=gcc 315LINK=g++ 316LIB=g++ 317ECHO=@echo 318MKDIR=mkdir -p 319CAT=cat 320OBJ_EXT=o 321SHAREDLIB_EXT=so 322SHAREDLIB_PRE=lib 323SHAREDLIB_OUT=$(OUT_LIB) 324 325GCC_VERSION=$(shell $(CC) -dumpversion) 326 327COMID=gcc3 328CPPU_ENV=gcc3 329 330OSEP=\< 331CSEP=\> 332QUOTE=$(subst S,\,S) 333QM=\" 334SQM=' 335ECHOLINE=@echo 336P2BG=& 337 338DEL=rm -f 339DELRECURSIVE=rm -rf 340COPY=cp 341URLPREFIX=file:// 342 343# Include UDK version numbers 344include $(PRJ)/include/udkversion.mk 345 346SALLIB=-luno_sal 347CPPULIB=-luno_cppu 348CPPUHELPERLIB=-luno_cppuhelper$(COMID) 349SALHELPERLIB=-luno_salhelper$(COMID) 350REGLIB=-lreg 351STORELIB=-lstore 352ifeq "$(STLPORT)" "yes" 353ifeq "$(STLPORT_VER)" "500" 354STLPORTLIB=-lstlport 355else 356STLPORTLIB=-lstlport_gcc$(STLDEBUG) 357endif 358else 359STLPORTLIB= 360endif 361 362EMPTYSTRING= 363PATH_SEPARATOR=: 364 365CC_FLAGS_JNI=-c -fpic 366CC_FLAGS=-c -fpic -fvisibility=hidden 367# -O is necessary for inlining (see gcc documentation) 368ifeq "$(DEBUG)" "yes" 369CC_FLAGS_JNI+=-g 370CC_FLAGS+=-g 371else 372CC_FLAGS_JNI+=-O 373CC_FLAGS+=-O 374endif 375 376ifeq "$(PROCTYPE)" "ppc" 377CC_FLAGS+=-fPIC 378endif 379 380SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux" 381CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 382STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 383CC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) 384CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE 385 386# define for used compiler necessary for UNO 387#-DCPPU_ENV=gcc2 -- gcc 2.91/2.95 388#-DCPPU_ENV=gcc3 -- gcc3 3.0 389 390CC_OUTPUT_SWITCH=-o 391 392LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN' 393 394ifeq "$(PROCTYPE)" "ppc" 395LIBRARY_LINK_FLAGS+=-fPIC 396endif 397#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map 398COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 399 400#EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive 401EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--no-whole-archive 402LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)" 403LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 404 405ifneq "$(OO_SDK_URE_HOME)" "" 406URE_MISC=$(OO_SDK_URE_HOME)/share/misc 407endif 408 409endif 410 411########################################################################### 412# 413# MacOSX/Darwin specific settings 414# 415########################################################################### 416ifneq (,$(findstring darwin,$(PLATFORM))) 417# Settings for MacOSX using gcc 4.0.1 compiler 418 419PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1) 420 421# Default is MacOSX on a Intel machine 422PLATFORM=macosx 423 424ifeq "$(PROCTYPE)" "i386" 425PACKAGE_LIB_DIR=macosx_x86.plt 426UNOPKG_PLATFORM=MacOSX_x86 427JAVA_PROC_TYPE=x86 428else 429ifeq "$(PROCTYPE)" "x86_64" 430PACKAGE_LIB_DIR=macosx_x86.plt 431UNOPKG_PLATFORM=MacOSX_x86 432JAVA_PROC_TYPE=x86 433else 434PACKAGE_LIB_DIR=macosx_ppc.plt 435UNOPKG_PLATFORM=MacOSX_PowerPC 436JAVA_PROC_TYPE=ppc 437endif 438endif 439JAVABIN=Commands 440 441GCC_VERSION =$(shell gcc -dumpversion| cut -d"." -f1,2) 442ifeq "$(GCC_VERSION)" "4.2" 443GCC_ARCH_OPTION=-arch i386 444endif 445 446OS=MACOSX 447PS=/ 448ICL=\$$ 449CC=gcc-$(GCC_VERSION) 450LINK=g++-$(GCC_VERSION) 451LIB=g++-$(GCC_VERSION) 452ECHO=@echo 453MKDIR=mkdir -p 454CAT=cat 455OBJ_EXT=o 456SHAREDLIB_EXT=dylib 457SHAREDLIB_PRE=lib 458SHAREDLIB_OUT=$(OUT_LIB) 459 460COMID=gcc3 461CPPU_ENV=gcc3 462 463OSEP=\< 464CSEP=\> 465QUOTE=$(subst S,\,S) 466QM=\" 467SQM=' 468ECHOLINE=@echo 469P2BG=& 470 471DEL=rm -f 472DELRECURSIVE=rm -rf 473COPY=cp 474URLPREFIX=file:// 475 476# Include UDK version numbers 477include $(PRJ)/include/udkversion.mk 478 479SALLIB=-luno_sal 480CPPULIB=-luno_cppu 481CPPUHELPERLIB=-luno_cppuhelper$(COMID) 482SALHELPERLIB=-luno_salhelper$(COMID) 483REGLIB=-lreg 484STORELIB=-lstore 485 486SALDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_sal.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libuno_sal.dylib' 487CPPUDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppu.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libuno_cppu.dylib' 488CPPUHELPERDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppuhelper'$(COMID).dylib.3:$(OO_SDK_URE_LIB_DIR)/libuno_cppuhelper$(COMID).dylib' 489SALHELPERDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_salhelper$(COMID).dylib.3:'$(OO_SDK_URE_LIB_DIR)/libuno_salhelper$(COMID).dylib' 490REGDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libreg.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libreg.dylib' 491STOREDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libstore.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libstore.dylib' 492 493INSTALL_NAME_URELIBS=install_name_tool -change @__________________________________________________URELIB/libuno_sal.dylib.3 @executable_path/urelibs/libuno_sal.dylib.3 -change @__________________________________________________URELIB/libuno_cppu.dylib.3 @executable_path/urelibs/libuno_cppu.dylib.3 -change @__________________________________________________URELIB/libuno_cppuhelper$(COMID).dylib.3 @executable_path/urelibs/libuno_cppuhelper$(COMID).dylib.3 -change @__________________________________________________URELIB/libuno_salhelper$(COMID).dylib.3 @executable_path/urelibs/libuno_salhelper$(COMID).dylib.3 -change @__________________________________________________URELIB/libreg.dylib.3 @executable_path/urelibs/libreg.dylib.3 -change @__________________________________________________URELIB/libstore.dylib.3 @executable_path/urelibs/libstore.dylib.3 494 495INSTALL_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 496 497EMPTYSTRING= 498PATH_SEPARATOR=: 499 500CC_FLAGS_JNI=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) 501CC_FLAGS=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden 502# -O is necessary for inlining (see gcc documentation) 503ifeq "$(DEBUG)" "yes" 504CC_FLAGS_JNI+=-g 505CC_FLAGS+=-g 506else 507CC_FLAGS_JNI+=-O 508CC_FLAGS+=-O 509endif 510 511SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers 512CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 513STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 514CC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) 515CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE 516 517CC_OUTPUT_SWITCH=-o 518 519LIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress $(GCC_ARCH_OPTION) 520#-fPIC -fno-common 521 522# install_name '@executable_path$/(@:f)' 523#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,-exported_symbols_list $(COMP_MAPFILE) 524COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 525 526EXE_LINK_FLAGS=$(GCC_ARCH_OPTION) -Wl,-multiply_defined,suppress 527LINK_LIBS=-L$(OUT)/lib -L$(OO_SDK_OUT)/$(PLATFORM)/lib -L"$(OO_SDK_URE_LIB_DIR)" 528LINK_JAVA_LIBS=-framework JavaVM 529#LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/Libraries" 530 531ifneq "$(OO_SDK_URE_HOME)" "" 532URE_MISC=$(OO_SDK_URE_HOME)/share/misc 533endif 534 535endif 536 537########################################################################### 538# 539# FreeBSD specific settings 540# 541########################################################################### 542ifneq (,$(findstring freebsd,$(PLATFORM))) 543# Settings for FreeBSD using gcc compiler 544 545PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1) 546 547ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM))) 548PLATFORM=kfreebsd 549ifeq "$(PROCTYPE)" "x86_64" 550PACKAGE_LIB_DIR=kfreebsd_x86_64.plt 551UNOPKG_PLATFORM=kFreeBSD_x86_64 552else 553PACKAGE_LIB_DIR=kfreebsd_x86.plt 554UNOPKG_PLATFORM=kFreeBSD_x86 555endif 556else 557PLATFORM=freebsd 558ifeq "$(PROCTYPE)" "x86_64" 559PACKAGE_LIB_DIR=freebsd_x86_64.plt 560UNOPKG_PLATFORM=FreeBSD_x86_64 561else 562PACKAGE_LIB_DIR=freebsd_x86.plt 563UNOPKG_PLATFORM=FreeBSD_x86 564endif 565endif 566 567ifeq "$(PROCTYPE)" "x86_64" 568JAVA_PROC_TYPE=amd64 569else 570JAVA_PROC_TYPE=i386 571endif 572 573ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM))) 574OS=LINUX 575else 576OS=FREEBSD 577endif 578PS=/ 579ICL=\$$ 580CC=gcc 581LINK=g++ 582LIB=g++ 583ECHO=@echo 584MKDIR=mkdir -p 585CAT=cat 586OBJ_EXT=o 587SHAREDLIB_EXT=so 588SHAREDLIB_PRE=lib 589SHAREDLIB_OUT=$(OUT_LIB) 590 591GCC_VERSION=$(shell $(CC) -dumpversion) 592 593COMID=gcc3 594CPPU_ENV=gcc3 595 596OSEP=\< 597CSEP=\> 598QUOTE=$(subst S,\,S) 599QM=\" 600SQM=' 601ECHOLINE=@echo 602P2BG=& 603 604DEL=rm -f 605DELRECURSIVE=rm -rf 606COPY=cp 607URLPREFIX=file:// 608 609# Include UDK version numbers 610include $(PRJ)/include/udkversion.mk 611 612SALLIB=-luno_sal 613CPPULIB=-luno_cppu 614CPPUHELPERLIB=-luno_cppuhelper$(COMID) 615SALHELPERLIB=-luno_salhelper$(COMID) 616REGLIB=-lreg 617STORELIB=-lstore 618ifeq "$(STLPORT_VER)" "500" 619STLPORTLIB=-lstlport 620else 621STLPORTLIB=-lstlport_gcc$(STLDEBUG) 622endif 623 624EMPTYSTRING= 625PATH_SEPARATOR=: 626 627CC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) 628CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden 629# -O is necessary for inlining (see gcc documentation) 630ifeq "$(DEBUG)" "yes" 631CC_FLAGS_JNI+=-g 632CC_FLAGS+=-g 633else 634CC_FLAGS_JNI+=-O 635CC_FLAGS+=-O 636endif 637 638SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd" 639CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 640STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 641CC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) 642CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE 643 644CC_OUTPUT_SWITCH=-o 645 646LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN' 647#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map 648COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 649 650EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined 651#EXE_LINK_FLAGS+=-Wl,-export-dynamic -Wl,-z,defs 652LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)" $(PTHREAD_LIBS) 653LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 654 655ifneq "$(OO_SDK_URE_HOME)" "" 656URE_MISC=$(OO_SDK_URE_HOME)/share/misc 657endif 658 659endif 660