bump product version to 6.3.0.0.beta1
[LibreOffice.git] / odk / settings / settings.mk
blob25b31cd68fac023ef6180bbb3beaeabf5756aaf9
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 ###########################################################################
43 # Windows specific settings
45 ###########################################################################
46 ifeq "$(PLATFORM)" "windows"
47 # Settings for Windows using Microsoft compiler/linker
49 OS=WIN
50 PS:=$(strip \ )
51 ICL=$$
52 CC=cl
53 LINK=link
54 BUILDLIB=lib
55 ECHO=@echo
56 MKDIR=mkdir
57 MV=move
58 CAT=type
59 OBJ_EXT=obj
60 EXE_EXT=.exe
61 COPY=copy
62 SHAREDLIB_EXT=dll
63 SHAREDLIB_OUT=$(OUT_BIN)
64 UNOPKG_PLATFORM=Windows
66 OSEP=^<
67 CSEP=^>
68 QUOTE=
69 QM=
70 SQM=
71 ECHOLINE=@echo.
72 P2BG=
74 DEL=del
75 DELRECURSIVE=rd /S /Q
76 URLPREFIX=file:///
78 SALLIB=isal.lib
79 CPPULIB=icppu.lib
80 CPPUHELPERLIB=icppuhelper.lib
81 SALHELPERLIB=isalhelper.lib
82 PURPENVHELPERLIB=ipurpenvhelper.lib
84 BLANK=
85 EMPTYSTRING=
86 PATH_SEPARATOR=;
88 ifeq "$(LIBO_SDK_ENABLE_DBGUTIL)" "TRUE"
89 LIBO_SDK_DETAIL_CFLAGS_MSVCRT = -MDd
90 LIBO_SDK_DETAIL_LDFLAGS_MSVCRT = msvcrtd.lib
91 else
92 LIBO_SDK_DETAIL_CFLAGS_MSVCRT = -MD
93 LIBO_SDK_DETAIL_LDFLAGS_MSVCRT = msvcrt.lib
94 endif
96 # use this for release version
97 ifeq "$(DEBUG)" "yes"
98 OPT_FLAGS=-Zi
99 endif
100 CC_FLAGS_JNI=-c $(LIBO_SDK_DETAIL_CFLAGS_MSVCRT) -Zm500 -Zc:wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -GR -EHa $(OPT_FLAGS)
101 CC_FLAGS=-c $(LIBO_SDK_DETAIL_CFLAGS_MSVCRT) -Zm500 -Zc:wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -GR -EHa $(OPT_FLAGS)
102 ifeq "$(CPP_MANIFEST)" "true"
103 LINK_MANIFEST=mt -manifest $@.manifest "-outputresource:$@;2"
104 else
105 LINK_MANIFEST=
106 endif
108 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
109 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/win32"
111 # define for used compiler necessary for UNO
112 # -DCPPU_ENV=msci -- windows msvc 4.x - 7.x
114 ifeq "$(PROCTYPE)" "x86_64"
115 CPPU_ENV=mscx
116 else
117 CPPU_ENV=msci
118 endif
120 CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=$(CPPU_ENV)
121 CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=$(CPPU_ENV)
122 CC_OUTPUT_SWITCH=-Fo
124 LIBO_SDK_LDFLAGS_STDLIBS = $(LIBO_SDK_DETAIL_LDFLAGS_MSVCRT) kernel32.lib
126 LIBRARY_LINK_FLAGS=/DLL /DEBUGTYPE:cv
127 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) /DEF:$(PRJ)/settings/component.uno.def
128 EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1b000000 /DEBUGTYPE:cv $(LIBO_SDK_LDFLAGS_STDLIBS)
129 ifeq "$(DEBUG)" "yes"
130 LIBRARY_LINK_FLAGS+=/DEBUG
131 EXE_LINK_FLAGS+=/DEBUG
132 endif
134 LINK_JAVA_LIBS=/LIBPATH:"$(OO_SDK_JAVA_HOME)/lib"
136 URE_MISC=${OFFICE_PROGRAM_PATH}
138 # use this for release version
139 #EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1100000
140 #LIBRARY_LINK_FLAGS=/DLL
141 endif
145 ###########################################################################
147 # Solaris specific settings
149 ###########################################################################
150 ifeq "$(PLATFORM)" "solaris"
151 # Settings for Solaris using GCC
153 ifeq "$(PROCTYPE)" "sparc"
154 PLATFORM=solsparc
155 UNOPKG_PLATFORM=Solaris_SPARC
156 JAVA_PROC_TYPE=sparc
157 else
158 ifeq "$(PROCTYPE)" "sparc64"
159 PLATFORM=solsparc
160 UNOPKG_PLATFORM=Solaris_SPARC64
161 JAVA_PROC_TYPE=sparcv9
162 else
163 PLATFORM=solintel
164 UNOPKG_PLATFORM=Solaris_x86
165 JAVA_PROC_TYPE=i386
166 endif
167 endif
169 OS=SOLARIS
170 PS=/
171 ICL=\$$
172 CC=g++
173 LINK=g++
174 LIB=g++
175 ECHO=@echo
176 MKDIR=mkdir -p
177 CAT=cat
178 OBJ_EXT=o
179 SHAREDLIB_EXT=so
180 SHAREDLIB_PRE=lib
181 SHAREDLIB_OUT=$(OUT_LIB)
183 OSEP=\<
184 CSEP=\>
185 QUOTE=$(subst S,\,S)
186 QM=\"
187 SQM='
188 ECHOLINE=@echo
189 P2BG=&
191 DEL=rm -f
192 DELRECURSIVE=rm -rf
193 COPY=cp
194 URLPREFIX=file://
196 COMID=gcc3
197 CPPU_ENV=gcc3
199 SALLIB=-luno_sal
200 CPPULIB=-luno_cppu
201 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
202 SALHELPERLIB=-luno_salhelper$(COMID)
203 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
205 EMPTYSTRING=
206 PATH_SEPARATOR=:
208 # -O is necessary for inlining (see gcc documentation)
209 ifeq "$(DEBUG)" "yes"
210 OPT_FLAGS=-g
211 else
212 OPT_FLAGS=-O
213 endif
214 CC_FLAGS_JNI=-c -fpic $(OPT_FLAGS)
215 CC_FLAGS=-c -fpic -fvisibility=hidden $(OPT_FLAGS)
216 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
217 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/solaris"
219 # define for used compiler necessary for UNO
221 CC_DEFINES_JNI=-DUNX -DSOLARIS -DCPPU_ENV=$(CPPU_ENV) -DGCC
222 CC_DEFINES=-DUNX -DSOLARIS -DSPARC -DCPPU_ENV=$(CPPU_ENV) -DGCC
223 CC_OUTPUT_SWITCH=-o
225 LIBO_SDK_LDFLAGS_STDLIBS =
227 LIBRARY_LINK_FLAGS=-w -mt -z combreloc -fPIC -PIC -temp=/tmp '-R$$ORIGIN' -z text -norunpath -G -Bdirect -Bdynamic -lpthread -lCrun -lc -lm
228 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
230 EXE_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -Bdirect -z defs
231 LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)"
232 LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
234 ifeq "$(PROCTYPE)" "sparc64"
235 CC_FLAGS+=-m64
236 LIBRARY_LINK_FLAGS+=-m64
237 EXE_LINK_FLAGS+=-m64
238 endif
240 URE_MISC=$(OFFICE_PROGRAM_PATH)
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 ifeq "$(PROCTYPE)" "powerpc64_le"
279 JAVA_PROC_TYPE=ppc64le
280 endif
282 ifeq "$(PROCTYPE)" "arm_eabi"
283 JAVA_PROC_TYPE=arm
284 endif
286 ifeq "$(PROCTYPE)" "arm_oabi"
287 JAVA_PROC_TYPE=arm
288 endif
290 ifeq "$(PROCTYPE)" "mips_eb"
291 JAVA_PROC_TYPE=mips
292 endif
294 ifeq "$(PROCTYPE)" "mips_el"
295 JAVA_PROC_TYPE=mipsel
296 endif
298 ifeq "$(PROCTYPE)" "mips64_el"
299 JAVA_PROC_TYPE=mips64el
300 endif
302 ifeq "$(PROCTYPE)" "sparc64"
303 UNOPKG_PLATFORM=Linux_SPARC64
304 JAVA_PROC_TYPE=sparcv9
305 endif
307 OS=LINUX
308 PS=/
309 ICL=\$$
310 CC=gcc
311 LINK=g++
312 LIB=g++
313 ECHO=@echo
314 MKDIR=mkdir -p
315 CAT=cat
316 OBJ_EXT=o
317 SHAREDLIB_EXT=so
318 SHAREDLIB_PRE=lib
319 SHAREDLIB_OUT=$(OUT_LIB)
321 GCC_VERSION=$(shell $(CC) -dumpversion)
323 COMID=gcc3
324 CPPU_ENV=gcc3
326 OSEP=\<
327 CSEP=\>
328 QUOTE=$(subst S,\,S)
329 QM=\"
330 SQM='
331 ECHOLINE=@echo
332 P2BG=&
334 DEL=rm -f
335 DELRECURSIVE=rm -rf
336 COPY=cp
337 URLPREFIX=file://
339 SALLIB=-luno_sal
340 CPPULIB=-luno_cppu
341 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
342 SALHELPERLIB=-luno_salhelper$(COMID)
343 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
345 EMPTYSTRING=
346 PATH_SEPARATOR=:
348 # -O is necessary for inlining (see gcc documentation)
349 ifeq "$(DEBUG)" "yes"
350 OPT_FLAGS=-g
351 else
352 OPT_FLAGS=-O
353 endif
354 CC_FLAGS_JNI=-c -fpic $(OPT_FLAGS)
355 CC_FLAGS=-c -fpic -fvisibility=hidden $(OPT_FLAGS)
357 ifeq "$(PROCTYPE)" "powerpc"
358 CC_FLAGS+=-fPIC
359 endif
361 ifeq "$(PROCTYPE)" "x86"
362 CC_FLAGS+=-m32
363 endif
365 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux"
366 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
367 CC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV)
368 CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV)
370 CC_OUTPUT_SWITCH=-o
372 LIBO_SDK_LDFLAGS_STDLIBS =
374 LIBRARY_LINK_FLAGS=-shared -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
376 ifeq "$(PROCTYPE)" "powerpc"
377 LIBRARY_LINK_FLAGS+=-fPIC
378 endif
380 ifeq "$(PROCTYPE)" "x86"
381 LIBRARY_LINK_FLAGS+=-m32
382 endif
384 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
386 EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--no-whole-archive
388 ifeq "$(PROCTYPE)" "x86"
389 EXE_LINK_FLAGS+=-m32
390 endif
392 LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)"
393 LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)" -L"$(OO_SDK_JAVA_HOME)/lib"
395 URE_MISC=$(OFFICE_PROGRAM_PATH)
397 endif
399 ###########################################################################
401 # MacOSX/Darwin specific settings
403 ###########################################################################
404 ifeq "$(PLATFORM)" "macosx"
406 UNOPKG_PLATFORM=MacOSX_x86_64
408 OS=MACOSX
409 PS=/
410 ICL=\$$
411 CC=clang++
412 LINK=clang++
413 LIB=clang++
414 ECHO=@echo
415 MKDIR=mkdir -p
416 CAT=cat
417 OBJ_EXT=o
418 SHAREDLIB_EXT=dylib
419 SHAREDLIB_PRE=lib
420 SHAREDLIB_OUT=$(OUT_LIB)
422 COMID=gcc3
423 CPPU_ENV=gcc3
425 OSEP=\<
426 CSEP=\>
427 QUOTE=$(subst S,\,S)
428 QM=\"
429 SQM='
430 ECHOLINE=@echo
431 P2BG=&
433 DEL=rm -f
434 DELRECURSIVE=rm -rf
435 COPY=cp
436 URLPREFIX=file://
438 SALLIB=-luno_sal
439 CPPULIB=-luno_cppu
440 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
441 SALHELPERLIB=-luno_salhelper$(COMID)
442 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
444 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
446 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
448 EMPTYSTRING=
449 PATH_SEPARATOR=:
451 # -O is necessary for inlining (see gcc documentation)
452 ifeq "$(DEBUG)" "yes"
453 OPT_FLAGS=-g
454 else
455 OPT_FLAGS=-O
456 endif
457 CC_FLAGS_JNI=-c -fPIC -fno-common $(GCC_ARCH_OPTION) $(OPT_FLAGS)
458 CC_FLAGS=-c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden $(OPT_FLAGS)
460 SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers
461 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
462 CC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV)
463 CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV)
465 CC_OUTPUT_SWITCH=-o
467 LIBO_SDK_LDFLAGS_STDLIBS =
469 LIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress $(GCC_ARCH_OPTION)
471 # install_name '@executable_path$/(@:f)'
472 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
474 EXE_LINK_FLAGS=$(GCC_ARCH_OPTION) -Wl,-multiply_defined,suppress
475 LINK_LIBS=-L$(OUT)/lib -L$(OO_SDK_OUT)/$(PLATFORM)/lib -L"$(OO_SDK_URE_LIB_DIR)"
476 LINK_JAVA_LIBS=-framework JavaVM
478 URE_MISC=$(OFFICE_HOME)/Contents/Resources/ure/share/misc
480 endif
482 ###########################################################################
484 # FreeBSD specific settings
486 ###########################################################################
487 ifneq (,$(findstring freebsd,$(PLATFORM)))
488 # Settings for FreeBSD using gcc compiler
490 ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
491 PLATFORM=kfreebsd
492 ifeq "$(PROCTYPE)" "x86_64"
493 UNOPKG_PLATFORM=kFreeBSD_x86_64
494 else
495 UNOPKG_PLATFORM=kFreeBSD_x86
496 endif
497 else
498 PLATFORM=freebsd
499 ifeq "$(PROCTYPE)" "x86_64"
500 UNOPKG_PLATFORM=FreeBSD_x86_64
501 else
502 UNOPKG_PLATFORM=FreeBSD_x86
503 endif
504 endif
506 ifeq "$(PROCTYPE)" "x86_64"
507 JAVA_PROC_TYPE=amd64
508 else
509 JAVA_PROC_TYPE=i386
510 endif
512 ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
513 OS=LINUX
514 else
515 OS=FREEBSD
516 endif
517 PS=/
518 ICL=\$$
519 CC=gcc
520 LINK=g++
521 LIB=g++
522 ECHO=@echo
523 MKDIR=mkdir -p
524 CAT=cat
525 OBJ_EXT=o
526 SHAREDLIB_EXT=so
527 SHAREDLIB_PRE=lib
528 SHAREDLIB_OUT=$(OUT_LIB)
530 GCC_VERSION=$(shell $(CC) -dumpversion)
532 COMID=gcc3
533 CPPU_ENV=gcc3
535 OSEP=\<
536 CSEP=\>
537 QUOTE=$(subst S,\,S)
538 QM=\"
539 SQM='
540 ECHOLINE=@echo
541 P2BG=&
543 DEL=rm -f
544 DELRECURSIVE=rm -rf
545 COPY=cp
546 URLPREFIX=file://
548 SALLIB=-luno_sal
549 CPPULIB=-luno_cppu
550 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
551 SALHELPERLIB=-luno_salhelper$(COMID)
552 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
554 EMPTYSTRING=
555 PATH_SEPARATOR=:
557 # -O is necessary for inlining (see gcc documentation)
558 ifeq "$(DEBUG)" "yes"
559 OPT_FLAGS=-g
560 else
561 OPT_FLAGS=-O
562 endif
563 CC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) $(OPT_FLAGS)
564 CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden $(OPT_FLAGS)
566 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd"
567 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
568 CC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV)
569 CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV)
571 CC_OUTPUT_SWITCH=-o
573 LIBO_SDK_LDFLAGS_STDLIBS =
575 LIBRARY_LINK_FLAGS=-shared -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
576 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
578 EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined
579 LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)" $(PTHREAD_LIBS)
580 LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
582 URE_MISC=$(OFFICE_PROGRAM_PATH)
584 endif