Bump version to 4.3-4
[LibreOffice.git] / odk / settings / settings.mk
blob740233ee59787a5ec62862652f295893caa9cb4a
2 # This file is part of the LibreOffice project.
4 # This Source Code Form is subject to the terms of the Mozilla Public
5 # License, v. 2.0. If a copy of the MPL was not distributed with this
6 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 # This file incorporates work covered by the following license notice:
10 # Licensed to the Apache Software Foundation (ASF) under one or more
11 # contributor license agreements. See the NOTICE file distributed
12 # with this work for additional information regarding copyright
13 # ownership. The ASF licenses this file to you under the Apache
14 # License, Version 2.0 (the "License"); you may not use this file
15 # except in compliance with the License. You may obtain a copy of
16 # the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 # Global settings file for the minimal build environment of the SDK
20 # This file have to updated/extended for other platforms.
22 include $(OO_SDK_HOME)/settings/dk.mk
24 # debug option, default is no debug
25 DEBUG=no
26 ifeq "$(MAKECMDGOALS)" "debug"
27 DEBUG=yes
28 endif
30 ###########################################################################
32 # Java settings
34 ###########################################################################
35 JAVAC_FLAGS=
37 ifeq "$(DEBUG)" "yes"
38 JAVAC_FLAGS+=-g
39 endif
41 JAVABIN=bin
43 ###########################################################################
45 # Windows specific settings
47 ###########################################################################
48 ifeq "$(PLATFORM)" "windows"
49 # Settings for Windows using Microsoft compiler/linker
51 OS=WIN
52 PS:=$(strip \ )
53 ICL=$$
54 CC=cl
55 LINK=link
56 BUILDLIB=lib
57 ECHO=@echo
58 MKDIR=mkdir
59 MV=move
60 CAT=type
61 OBJ_EXT=obj
62 EXE_EXT=.exe
63 COPY=copy
64 SHAREDLIB_EXT=dll
65 SHAREDLIB_OUT=$(OUT_BIN)
66 UNOPKG_PLATFORM=Windows
68 OSEP=^<
69 CSEP=^>
70 QUOTE=
71 QM=
72 SQM=
73 ECHOLINE=@echo.
74 P2BG=
76 DEL=del
77 DELRECURSIVE=rd /S /Q
78 URLPREFIX=file:///
80 SALLIB=isal.lib
81 CPPULIB=icppu.lib
82 CPPUHELPERLIB=icppuhelper.lib
83 SALHELPERLIB=isalhelper.lib
84 PURPENVHELPERLIB=ipurpenvhelper.lib
86 BLANK=
87 EMPTYSTRING=
88 PATH_SEPARATOR=;
90 ifeq "$(LIBO_SDK_ENABLE_DBGUTIL)" "TRUE"
91 LIBO_SDK_DETAIL_CFLAGS_MSVCRT = -MDd
92 LIBO_SDK_DETAIL_LDFLAGS_MSVCRT = msvcrtd.lib
93 else
94 LIBO_SDK_DETAIL_CFLAGS_MSVCRT = -MD
95 LIBO_SDK_DETAIL_LDFLAGS_MSVCRT = msvcrt.lib
96 endif
98 # use this for release version
99 ifeq "$(DEBUG)" "yes"
100 OPT_FLAGS=-Zi
101 endif
102 CC_FLAGS_JNI=-c $(LIBO_SDK_DETAIL_CFLAGS_MSVCRT) -Zm500 -Zc:wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -GR -EHa $(OPT_FLAGS)
103 CC_FLAGS=-c $(LIBO_SDK_DETAIL_CFLAGS_MSVCRT) -Zm500 -Zc:wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -GR -EHa $(OPT_FLAGS)
104 ifeq "$(CPP_MANIFEST)" "true"
105 LINK_MANIFEST=mt -manifest $@.manifest "-outputresource:$@;2"
106 else
107 LINK_MANIFEST=
108 endif
110 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
111 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/win32"
113 # define for used compiler necessary for UNO
114 # -DCPPU_ENV=msci -- windows msvc 4.x - 7.x
116 CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci
117 CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci
118 CC_OUTPUT_SWITCH=-Fo
120 LIBO_SDK_LDFLAGS_STDLIBS = $(LIBO_SDK_DETAIL_LDFLAGS_MSVCRT) kernel32.lib
122 LIBRARY_LINK_FLAGS=/DLL /DEBUGTYPE:cv
123 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) /DEF:$(PRJ)/settings/component.uno.def
124 EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1b000000 /DEBUGTYPE:cv $(LIBO_SDK_LDFLAGS_STDLIBS)
125 ifeq "$(DEBUG)" "yes"
126 LIBRARY_LINK_FLAGS+=/DEBUG
127 EXE_LINK_FLAGS+=/DEBUG
128 endif
130 LINK_JAVA_LIBS=/LIBPATH:"$(OO_SDK_JAVA_HOME)/lib"
132 ifneq "$(OO_SDK_URE_HOME)" ""
133 URE_MISC=$(OO_SDK_URE_HOME)\misc
134 endif
136 # use this for release version
137 #EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1100000
138 #LIBRARY_LINK_FLAGS=/DLL
139 endif
143 ###########################################################################
145 # Solaris specific settings
147 ###########################################################################
148 ifeq "$(PLATFORM)" "solaris"
149 # Settings for Solaris using GCC
151 ifeq "$(PROCTYPE)" "sparc"
152 PLATFORM=solsparc
153 UNOPKG_PLATFORM=Solaris_SPARC
154 JAVA_PROC_TYPE=sparc
155 else
156 ifeq "$(PROCTYPE)" "sparc64"
157 PLATFORM=solsparc
158 UNOPKG_PLATFORM=Solaris_SPARC64
159 JAVA_PROC_TYPE=sparcv9
160 else
161 PLATFORM=solintel
162 UNOPKG_PLATFORM=Solaris_x86
163 JAVA_PROC_TYPE=i386
164 endif
165 endif
167 OS=SOLARIS
168 PS=/
169 ICL=\$$
170 CC=g++
171 LINK=g++
172 LIB=g++
173 ECHO=@echo
174 MKDIR=mkdir -p
175 CAT=cat
176 OBJ_EXT=o
177 SHAREDLIB_EXT=so
178 SHAREDLIB_PRE=lib
179 SHAREDLIB_OUT=$(OUT_LIB)
181 OSEP=\<
182 CSEP=\>
183 QUOTE=$(subst S,\,S)
184 QM=\"
185 SQM='
186 ECHOLINE=@echo
187 P2BG=&
189 DEL=rm -f
190 DELRECURSIVE=rm -rf
191 COPY=cp
192 URLPREFIX=file://
194 COMID=gcc3
195 CPPU_ENV=gcc3
197 SALLIB=-luno_sal
198 CPPULIB=-luno_cppu
199 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
200 SALHELPERLIB=-luno_salhelper$(COMID)
201 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
203 EMPTYSTRING=
204 PATH_SEPARATOR=:
206 # -O is necessary for inlining (see gcc documentation)
207 ifeq "$(DEBUG)" "yes"
208 OPT_FLAGS=-g
209 else
210 OPT_FLAGS=-O
211 endif
212 CC_FLAGS_JNI=-c -fpic $(OPT_FLAGS)
213 CC_FLAGS=-c -fpic -fvisibility=hidden $(OPT_FLAGS)
214 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
215 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/solaris"
217 # define for used compiler necessary for UNO
219 CC_DEFINES_JNI=-DUNX -DSOLARIS -DCPPU_ENV=$(CPPU_ENV) -DGCC
220 CC_DEFINES=-DUNX -DSOLARIS -DSPARC -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE -DGCC
221 CC_OUTPUT_SWITCH=-o
223 LIBO_SDK_LDFLAGS_STDLIBS =
225 LIBRARY_LINK_FLAGS=-w -mt -z combreloc -fPIC -PIC -temp=/tmp '-R$$ORIGIN' -z text -norunpath -G -Bdirect -Bdynamic -lpthread -lCrun -lc -lm
226 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
228 EXE_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -Bdirect -z defs
229 LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)"
230 LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
232 ifeq "$(PROCTYPE)" "sparc64"
233 CC_FLAGS+=-m64
234 LIBRARY_LINK_FLAGS+=-m64
235 EXE_LINK_FLAGS+=-m64
236 endif
238 ifneq "$(OO_SDK_URE_HOME)" ""
239 URE_MISC=$(OO_SDK_URE_HOME)/share/misc
240 endif
242 endif
246 ###########################################################################
248 # Linux specific settings
250 ###########################################################################
251 ifeq "$(PLATFORM)" "linux"
252 # Settings for Linux using gcc compiler
254 UNOPKG_PLATFORM=Linux_$(PROCTYPE)
255 JAVA_PROC_TYPE=$(PROCTYPE)
257 ifeq "$(PROCTYPE)" "x86"
258 JAVA_PROC_TYPE=i386
259 endif
261 ifeq "$(PROCTYPE)" "powerpc"
262 UNOPKG_PLATFORM=Linux_PowerPC
263 JAVA_PROC_TYPE=ppc
264 endif
266 ifeq "$(PROCTYPE)" "sparc"
267 UNOPKG_PLATFORM=Linux_SPARC
268 endif
270 ifeq "$(PROCTYPE)" "x86_64"
271 JAVA_PROC_TYPE=amd64
272 endif
274 ifeq "$(PROCTYPE)" "powerpc64"
275 JAVA_PROC_TYPE=ppc64
276 endif
278 OS=LINUX
279 PS=/
280 ICL=\$$
281 CC=gcc
282 LINK=g++
283 LIB=g++
284 ECHO=@echo
285 MKDIR=mkdir -p
286 CAT=cat
287 OBJ_EXT=o
288 SHAREDLIB_EXT=so
289 SHAREDLIB_PRE=lib
290 SHAREDLIB_OUT=$(OUT_LIB)
292 GCC_VERSION=$(shell $(CC) -dumpversion)
294 COMID=gcc3
295 CPPU_ENV=gcc3
297 OSEP=\<
298 CSEP=\>
299 QUOTE=$(subst S,\,S)
300 QM=\"
301 SQM='
302 ECHOLINE=@echo
303 P2BG=&
305 DEL=rm -f
306 DELRECURSIVE=rm -rf
307 COPY=cp
308 URLPREFIX=file://
310 SALLIB=-luno_sal
311 CPPULIB=-luno_cppu
312 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
313 SALHELPERLIB=-luno_salhelper$(COMID)
314 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
316 EMPTYSTRING=
317 PATH_SEPARATOR=:
319 # -O is necessary for inlining (see gcc documentation)
320 ifeq "$(DEBUG)" "yes"
321 OPT_FLAGS=-g
322 else
323 OPT_FLAGS=-O
324 endif
325 CC_FLAGS_JNI=-c -fpic $(OPT_FLAGS)
326 CC_FLAGS=-c -fpic -fvisibility=hidden $(OPT_FLAGS)
328 ifeq "$(PROCTYPE)" "powerpc"
329 CC_FLAGS+=-fPIC
330 endif
332 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux"
333 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
334 CC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV)
335 CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE
337 CC_OUTPUT_SWITCH=-o
339 LIBO_SDK_LDFLAGS_STDLIBS =
341 LIBRARY_LINK_FLAGS=-shared -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
343 ifeq "$(PROCTYPE)" "powerpc"
344 LIBRARY_LINK_FLAGS+=-fPIC
345 endif
346 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
348 EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--no-whole-archive
349 LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)"
350 LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
352 ifneq "$(OO_SDK_URE_HOME)" ""
353 URE_MISC=$(OO_SDK_URE_HOME)/share/misc
354 endif
356 endif
358 ###########################################################################
360 # MacOSX/Darwin specific settings
362 ###########################################################################
363 ifeq "$(PLATFORM)" "macosx"
364 # Settings for MacOSX using gcc 4.0.1 compiler
366 ifeq "$(PROCTYPE)" "x86"
367 UNOPKG_PLATFORM=MacOSX_x86
368 else
369 ifeq "$(PROCTYPE)" "x86_64"
370 UNOPKG_PLATFORM=MacOSX_x86_64
371 endif
372 endif
373 JAVABIN=Commands
375 ifeq "$(PROCTYPE)" "x86"
376 GCC_VERSION =$(shell gcc -dumpversion| cut -d"." -f1,2)
377 ifeq "$(GCC_VERSION)" "4.2"
378 GCC_ARCH_OPTION=-arch i386
379 endif
380 endif
382 OS=MACOSX
383 PS=/
384 ICL=\$$
385 ifeq "$(PROCTYPE)" "x86"
386 CC=gcc-$(GCC_VERSION)
387 LINK=g++-$(GCC_VERSION)
388 LIB=g++-$(GCC_VERSION)
389 else
390 CC=clang++
391 LINK=clang++
392 LIB=clang++
393 endif
394 ECHO=@echo
395 MKDIR=mkdir -p
396 CAT=cat
397 OBJ_EXT=o
398 SHAREDLIB_EXT=dylib
399 SHAREDLIB_PRE=lib
400 SHAREDLIB_OUT=$(OUT_LIB)
402 COMID=gcc3
403 CPPU_ENV=gcc3
405 OSEP=\<
406 CSEP=\>
407 QUOTE=$(subst S,\,S)
408 QM=\"
409 SQM='
410 ECHOLINE=@echo
411 P2BG=&
413 DEL=rm -f
414 DELRECURSIVE=rm -rf
415 COPY=cp
416 URLPREFIX=file://
418 SALLIB=-luno_sal
419 CPPULIB=-luno_cppu
420 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
421 SALHELPERLIB=-luno_salhelper$(COMID)
422 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
424 INSTALL_NAME_URELIBS=$(XCRUN) 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
426 INSTALL_NAME_URELIBS_BIN=$(XCRUN) 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
428 EMPTYSTRING=
429 PATH_SEPARATOR=:
431 # -O is necessary for inlining (see gcc documentation)
432 ifeq "$(DEBUG)" "yes"
433 OPT_FLAGS=-g
434 else
435 OPT_FLAGS=-O
436 endif
437 CC_FLAGS_JNI=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) $(OPT_FLAGS)
438 CC_FLAGS=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden $(OPT_FLAGS)
440 SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers
441 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
442 CC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV)
443 CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE
445 CC_OUTPUT_SWITCH=-o
447 LIBO_SDK_LDFLAGS_STDLIBS =
449 LIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress $(GCC_ARCH_OPTION)
451 # install_name '@executable_path$/(@:f)'
452 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
454 EXE_LINK_FLAGS=$(GCC_ARCH_OPTION) -Wl,-multiply_defined,suppress
455 LINK_LIBS=-L$(OUT)/lib -L$(OO_SDK_OUT)/$(PLATFORM)/lib -L"$(OO_SDK_URE_LIB_DIR)"
456 LINK_JAVA_LIBS=-framework JavaVM
458 ifneq "$(OO_SDK_URE_HOME)" ""
459 URE_MISC=$(OO_SDK_URE_HOME)/share/misc
460 endif
462 endif
464 ###########################################################################
466 # FreeBSD specific settings
468 ###########################################################################
469 ifneq (,$(findstring freebsd,$(PLATFORM)))
470 # Settings for FreeBSD using gcc compiler
472 ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
473 PLATFORM=kfreebsd
474 ifeq "$(PROCTYPE)" "x86_64"
475 UNOPKG_PLATFORM=kFreeBSD_x86_64
476 else
477 UNOPKG_PLATFORM=kFreeBSD_x86
478 endif
479 else
480 PLATFORM=freebsd
481 ifeq "$(PROCTYPE)" "x86_64"
482 UNOPKG_PLATFORM=FreeBSD_x86_64
483 else
484 UNOPKG_PLATFORM=FreeBSD_x86
485 endif
486 endif
488 ifeq "$(PROCTYPE)" "x86_64"
489 JAVA_PROC_TYPE=amd64
490 else
491 JAVA_PROC_TYPE=i386
492 endif
494 ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
495 OS=LINUX
496 else
497 OS=FREEBSD
498 endif
499 PS=/
500 ICL=\$$
501 CC=gcc
502 LINK=g++
503 LIB=g++
504 ECHO=@echo
505 MKDIR=mkdir -p
506 CAT=cat
507 OBJ_EXT=o
508 SHAREDLIB_EXT=so
509 SHAREDLIB_PRE=lib
510 SHAREDLIB_OUT=$(OUT_LIB)
512 GCC_VERSION=$(shell $(CC) -dumpversion)
514 COMID=gcc3
515 CPPU_ENV=gcc3
517 OSEP=\<
518 CSEP=\>
519 QUOTE=$(subst S,\,S)
520 QM=\"
521 SQM='
522 ECHOLINE=@echo
523 P2BG=&
525 DEL=rm -f
526 DELRECURSIVE=rm -rf
527 COPY=cp
528 URLPREFIX=file://
530 SALLIB=-luno_sal
531 CPPULIB=-luno_cppu
532 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
533 SALHELPERLIB=-luno_salhelper$(COMID)
534 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
536 EMPTYSTRING=
537 PATH_SEPARATOR=:
539 # -O is necessary for inlining (see gcc documentation)
540 ifeq "$(DEBUG)" "yes"
541 OPT_FLAGS=-g
542 else
543 OPT_FLAGS=-O
544 endif
545 CC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) $(OPT_FLAGS)
546 CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden $(OPT_FLAGS)
548 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd"
549 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
550 CC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV)
551 CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE
553 CC_OUTPUT_SWITCH=-o
555 LIBO_SDK_LDFLAGS_STDLIBS =
557 LIBRARY_LINK_FLAGS=-shared -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
558 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
560 EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined
561 LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)" $(PTHREAD_LIBS)
562 LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
564 ifneq "$(OO_SDK_URE_HOME)" ""
565 URE_MISC=$(OO_SDK_URE_HOME)/share/misc
566 endif
568 endif