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