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 96 97BLANK= 98EMPTYSTRING= 99PATH_SEPARATOR=; 100 101# use this for release version 102CC_FLAGS_JNI=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa 103CC_FLAGS=-c -MT -Zm500 -Zc:forScope,wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -Zc:forScope -GR -EHa 104ifeq "$(CPP_MANIFEST)" "true" 105#CC_FLAGS+=-EHa -Zc:wchar_t- 106LINK_MANIFEST=mt -manifest $@.manifest "-outputresource:$@;2" 107else 108#CC_FLAGS+= 109LINK_MANIFEST= 110endif 111ifeq "$(DEBUG)" "yes" 112CC_FLAGS_JNI+=-Zi 113CC_FLAGS+=-Zi 114endif 115 116CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 117STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 118SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/win32" 119 120# define for used compiler necessary for UNO 121# -DCPPU_ENV=msci -- windows msvc 4.x - 7.x 122 123CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci 124CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci 125CC_OUTPUT_SWITCH=-Fo 126 127LIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL /DEBUGTYPE:cv 128COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) /DEF:$(PRJ)/settings/component.uno.def 129EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1b000000 /DEBUGTYPE:cv /NODEFAULTLIB msvcrt.lib msvcprt.lib kernel32.lib 130ifeq "$(DEBUG)" "yes" 131LIBRARY_LINK_FLAGS+=/DEBUG 132EXE_LINK_FLAGS+=/DEBUG 133endif 134 135LINK_JAVA_LIBS=/LIBPATH:"$(OO_SDK_JAVA_HOME)/lib" 136 137#ifneq "$(OFFICE_PROGRAM_PATH)" "" 138#URE_MISC=$(OFFICE_PROGRAM_PATH)\misc 139#endif 140 141# use this for release version 142#EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1100000 143#LIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL 144endif 145 146 147 148########################################################################### 149# 150# Solaris specific settings 151# 152########################################################################### 153ifneq (,$(findstring solaris,$(PLATFORM))) 154# Settings for Solaris using Sun Workshop compiler 155 156PROCTYPE := $(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) 157 158ifeq "$(PROCTYPE)" "sparc" 159PLATFORM=solsparc 160PACKAGE_LIB_DIR=solaris_sparc.plt 161UNOPKG_PLATFORM=Solaris_SPARC 162JAVA_PROC_TYPE=sparc 163else 164ifeq "$(PROCTYPE)" "sparc64" 165PLATFORM=solsparc 166PACKAGE_LIB_DIR=solaris_sparc64.plt 167UNOPKG_PLATFORM=Solaris_SPARC64 168JAVA_PROC_TYPE=sparcv9 169else 170PLATFORM=solintel 171PACKAGE_LIB_DIR=solaris_x86.plt 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_URE_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 252ifneq "$(OFFICE_PROGRAM_PATH)" "" 253URE_MISC=$(OFFICE_PROGRAM_PATH)/share/misc 254endif 255 256endif 257 258 259 260########################################################################### 261# 262# Linux specific settings 263# 264########################################################################### 265ifneq (,$(findstring linux,$(PLATFORM))) 266# Settings for Linux using gcc compiler 267 268PROCTYPE := $(shell $(PRJ)/config.guess | cut -d "-" -f1 | sed -e 's/^i.86$$/i386/') 269PLATFORM=linux 270 271PACKAGE_LIB_DIR=linux_$(PROCTYPE).plt 272UNOPKG_PLATFORM=Linux_$(PROCTYPE) 273JAVA_PROC_TYPE=$(PROCTYPE) 274 275ifeq "$(PROCTYPE)" "i386" 276PACKAGE_LIB_DIR=linux_x86.plt 277UNOPKG_PLATFORM=Linux_x86 278JAVA_PROC_TYPE=i386 279endif 280 281ifeq "$(PROCTYPE)" "powerpc" 282PACKAGE_LIB_DIR=linux_powerpc.plt 283UNOPKG_PLATFORM=Linux_PowerPC 284JAVA_PROC_TYPE=ppc 285endif 286 287ifeq "$(PROCTYPE)" "sparc" 288PACKAGE_LIB_DIR=linux_sparc.plt 289UNOPKG_PLATFORM=Linux_SPARC 290JAVA_PROC_TYPE=sparc 291endif 292 293ifeq "$(PROCTYPE)" "x86_64" 294JAVA_PROC_TYPE=amd64 295endif 296 297ifeq "$(PROCTYPE)" "powerpc64" 298JAVA_PROC_TYPE=ppc64 299endif 300 301OS=LINUX 302PS=/ 303ICL=\$$ 304CC=gcc 305LINK=g++ 306LIB=g++ 307ECHO=@echo 308MKDIR=mkdir -p 309CAT=cat 310OBJ_EXT=o 311SHAREDLIB_EXT=so 312SHAREDLIB_PRE=lib 313SHAREDLIB_OUT=$(OUT_LIB) 314 315GCC_VERSION=$(shell $(CC) -dumpversion) 316 317COMID=gcc3 318CPPU_ENV=gcc3 319 320OSEP=\< 321CSEP=\> 322QUOTE=$(subst S,\,S) 323QM=\" 324SQM=' 325ECHOLINE=@echo 326P2BG=& 327 328DEL=rm -f 329DELRECURSIVE=rm -rf 330COPY=cp 331URLPREFIX=file:// 332 333# Include UDK version numbers 334include $(PRJ)/include/udkversion.mk 335 336SALLIB=-luno_sal 337CPPULIB=-luno_cppu 338CPPUHELPERLIB=-luno_cppuhelper$(COMID) 339SALHELPERLIB=-luno_salhelper$(COMID) 340REGLIB=-lreg 341STORELIB=-lstore 342 343EMPTYSTRING= 344PATH_SEPARATOR=: 345 346CC_FLAGS_JNI=-c -fpic 347CC_FLAGS=-c -fpic -fvisibility=hidden 348# -O is necessary for inlining (see gcc documentation) 349ifeq "$(DEBUG)" "yes" 350CC_FLAGS_JNI+=-g 351CC_FLAGS+=-g 352else 353CC_FLAGS_JNI+=-O 354CC_FLAGS+=-O 355endif 356 357ifeq "$(PROCTYPE)" "ppc" 358CC_FLAGS+=-fPIC 359endif 360 361SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux" 362CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 363STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 364CC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) 365CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE 366 367# define for used compiler necessary for UNO 368#-DCPPU_ENV=gcc2 -- gcc 2.91/2.95 369#-DCPPU_ENV=gcc3 -- gcc3 3.0 370 371CC_OUTPUT_SWITCH=-o 372 373LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN' 374 375ifeq "$(PROCTYPE)" "ppc" 376LIBRARY_LINK_FLAGS+=-fPIC 377endif 378#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map 379COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 380 381#EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive 382EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--no-whole-archive 383LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)" 384LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 385 386ifneq "$(OFFICE_PROGRAM_PATH)" "" 387URE_MISC=$(OFFICE_PROGRAM_PATH)/share/misc 388endif 389 390endif 391 392########################################################################### 393# 394# MacOSX/Darwin specific settings 395# 396########################################################################### 397ifneq (,$(findstring darwin,$(PLATFORM))) 398# Settings for MacOSX using gcc 4.0.1 compiler 399 400PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1) 401 402# Default is MacOSX on a Intel machine 403PLATFORM=macosx 404 405ifeq "$(PROCTYPE)" "i386" 406PACKAGE_LIB_DIR=macosx_x86.plt 407UNOPKG_PLATFORM=MacOSX_x86 408JAVA_PROC_TYPE=x86 409else 410ifeq "$(PROCTYPE)" "x86_64" 411PACKAGE_LIB_DIR=macosx_x86.plt 412UNOPKG_PLATFORM=MacOSX_x86 413JAVA_PROC_TYPE=x86 414else 415PACKAGE_LIB_DIR=macosx_ppc.plt 416UNOPKG_PLATFORM=MacOSX_PowerPC 417JAVA_PROC_TYPE=ppc 418endif 419endif 420JAVABIN=Commands 421 422GCC_VERSION =$(shell gcc -dumpversion| cut -d"." -f1,2) 423ifeq "$(GCC_VERSION)" "4.2" 424GCC_ARCH_OPTION=-arch i386 425endif 426 427OS=MACOSX 428PS=/ 429ICL=\$$ 430CC=gcc-$(GCC_VERSION) 431LINK=g++-$(GCC_VERSION) 432LIB=g++-$(GCC_VERSION) 433ECHO=@echo 434MKDIR=mkdir -p 435CAT=cat 436OBJ_EXT=o 437SHAREDLIB_EXT=dylib 438SHAREDLIB_PRE=lib 439SHAREDLIB_OUT=$(OUT_LIB) 440 441COMID=gcc3 442CPPU_ENV=gcc3 443 444OSEP=\< 445CSEP=\> 446QUOTE=$(subst S,\,S) 447QM=\" 448SQM=' 449ECHOLINE=@echo 450P2BG=& 451 452DEL=rm -f 453DELRECURSIVE=rm -rf 454COPY=cp 455URLPREFIX=file:// 456 457# Include UDK version numbers 458include $(PRJ)/include/udkversion.mk 459 460SALLIB=-luno_sal 461CPPULIB=-luno_cppu 462CPPUHELPERLIB=-luno_cppuhelper$(COMID) 463SALHELPERLIB=-luno_salhelper$(COMID) 464REGLIB=-lreg 465STORELIB=-lstore 466 467SALDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_sal.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libuno_sal.dylib' 468CPPUDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppu.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libuno_cppu.dylib' 469CPPUHELPERDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppuhelper'$(COMID).dylib.3:$(OO_SDK_URE_LIB_DIR)/libuno_cppuhelper$(COMID).dylib' 470SALHELPERDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_salhelper$(COMID).dylib.3:'$(OO_SDK_URE_LIB_DIR)/libuno_salhelper$(COMID).dylib' 471REGDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libreg.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libreg.dylib' 472STOREDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libstore.dylib.3:'$(OO_SDK_URE_LIB_DIR)/libstore.dylib' 473 474INSTALL_NAME_URELIBS=install_name_tool -change @__________________________________________________URELIB/libuno_sal.dylib.3 @executable_path/libuno_sal.dylib.3 -change @__________________________________________________URELIB/libuno_cppu.dylib.3 @executable_path/libuno_cppu.dylib.3 -change @__________________________________________________URELIB/libuno_cppuhelper$(COMID).dylib.3 @executable_path/libuno_cppuhelper$(COMID).dylib.3 -change @__________________________________________________URELIB/libuno_salhelper$(COMID).dylib.3 @executable_path/libuno_salhelper$(COMID).dylib.3 -change @__________________________________________________URELIB/libreg.dylib.3 @executable_path/libreg.dylib.3 -change @__________________________________________________URELIB/libstore.dylib.3 @executable_path/libstore.dylib.3 475 476INSTALL_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 477 478EMPTYSTRING= 479PATH_SEPARATOR=: 480 481CC_FLAGS_JNI=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) 482CC_FLAGS=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden 483# -O is necessary for inlining (see gcc documentation) 484ifeq "$(DEBUG)" "yes" 485CC_FLAGS_JNI+=-g 486CC_FLAGS+=-g 487else 488CC_FLAGS_JNI+=-O 489CC_FLAGS+=-O 490endif 491 492SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers 493CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 494STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 495CC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) 496CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE 497 498CC_OUTPUT_SWITCH=-o 499 500LIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress $(GCC_ARCH_OPTION) 501#-fPIC -fno-common 502 503# install_name '@executable_path$/(@:f)' 504#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,-exported_symbols_list $(COMP_MAPFILE) 505COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 506 507EXE_LINK_FLAGS=$(GCC_ARCH_OPTION) -Wl,-multiply_defined,suppress 508LINK_LIBS=-L$(OUT)/lib -L$(OO_SDK_OUT)/$(PLATFORM)/lib -L"$(OO_SDK_URE_LIB_DIR)" 509LINK_JAVA_LIBS=-framework JavaVM 510#LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/Libraries" 511 512ifneq "$(OFFICE_PROGRAM_PATH)" "" 513URE_MISC=$(OFFICE_PROGRAM_PATH)/share/misc 514endif 515 516endif 517 518########################################################################### 519# 520# FreeBSD specific settings 521# 522########################################################################### 523ifneq (,$(findstring freebsd,$(PLATFORM))) 524# Settings for FreeBSD using gcc compiler 525 526PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1) 527 528ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM))) 529PLATFORM=kfreebsd 530ifeq "$(PROCTYPE)" "x86_64" 531PACKAGE_LIB_DIR=kfreebsd_x86_64.plt 532UNOPKG_PLATFORM=kFreeBSD_x86_64 533else 534PACKAGE_LIB_DIR=kfreebsd_x86.plt 535UNOPKG_PLATFORM=kFreeBSD_x86 536endif 537else 538PLATFORM=freebsd 539ifeq "$(PROCTYPE)" "x86_64" 540PACKAGE_LIB_DIR=freebsd_x86_64.plt 541UNOPKG_PLATFORM=FreeBSD_x86_64 542else 543PACKAGE_LIB_DIR=freebsd_x86.plt 544UNOPKG_PLATFORM=FreeBSD_x86 545endif 546endif 547 548ifeq "$(PROCTYPE)" "x86_64" 549JAVA_PROC_TYPE=amd64 550else 551JAVA_PROC_TYPE=i386 552endif 553 554ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM))) 555OS=LINUX 556else 557OS=FREEBSD 558endif 559PS=/ 560ICL=\$$ 561CC=gcc 562LINK=g++ 563LIB=g++ 564ECHO=@echo 565MKDIR=mkdir -p 566CAT=cat 567OBJ_EXT=o 568SHAREDLIB_EXT=so 569SHAREDLIB_PRE=lib 570SHAREDLIB_OUT=$(OUT_LIB) 571 572GCC_VERSION=$(shell $(CC) -dumpversion) 573 574COMID=gcc3 575CPPU_ENV=gcc3 576 577OSEP=\< 578CSEP=\> 579QUOTE=$(subst S,\,S) 580QM=\" 581SQM=' 582ECHOLINE=@echo 583P2BG=& 584 585DEL=rm -f 586DELRECURSIVE=rm -rf 587COPY=cp 588URLPREFIX=file:// 589 590# Include UDK version numbers 591include $(PRJ)/include/udkversion.mk 592 593SALLIB=-luno_sal 594CPPULIB=-luno_cppu 595CPPUHELPERLIB=-luno_cppuhelper$(COMID) 596SALHELPERLIB=-luno_salhelper$(COMID) 597REGLIB=-lreg 598STORELIB=-lstore 599 600EMPTYSTRING= 601PATH_SEPARATOR=: 602 603CC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) 604CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden 605# -O is necessary for inlining (see gcc documentation) 606ifeq "$(DEBUG)" "yes" 607CC_FLAGS_JNI+=-g 608CC_FLAGS+=-g 609else 610CC_FLAGS_JNI+=-O 611CC_FLAGS+=-O 612endif 613 614SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd" 615CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include 616STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl" 617CC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) 618CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE 619 620CC_OUTPUT_SWITCH=-o 621 622LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN' 623#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map 624COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) 625 626EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined 627#EXE_LINK_FLAGS+=-Wl,-export-dynamic -Wl,-z,defs 628LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)" $(PTHREAD_LIBS) 629LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" 630 631#ifneq "$(OFFICE_PROGRAM_PATH)" "" 632#URE_MISC=$(OFFICE_PROGRAM_PATH)/share/misc 633#endif 634 635endif 636 637 638# Add OSL_DEBUG_LEVEL to compiler the flags (for OSL_TRACE et. al.) 639ifeq "$(DEBUG)" "yes" 640CC_FLAGS += -DOSL_DEBUG_LEVEL=2 641endif 642