fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / odk / settings / settings.mk
blob554ac74b2ab28cd80fe6fccaeaf87539701b5243
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 URE_MISC=${OFFICE_PROGRAM_PATH}
134 # use this for release version
135 #EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1100000
136 #LIBRARY_LINK_FLAGS=/DLL
137 endif
141 ###########################################################################
143 # Solaris specific settings
145 ###########################################################################
146 ifeq "$(PLATFORM)" "solaris"
147 # Settings for Solaris using GCC
149 ifeq "$(PROCTYPE)" "sparc"
150 PLATFORM=solsparc
151 UNOPKG_PLATFORM=Solaris_SPARC
152 JAVA_PROC_TYPE=sparc
153 else
154 ifeq "$(PROCTYPE)" "sparc64"
155 PLATFORM=solsparc
156 UNOPKG_PLATFORM=Solaris_SPARC64
157 JAVA_PROC_TYPE=sparcv9
158 else
159 PLATFORM=solintel
160 UNOPKG_PLATFORM=Solaris_x86
161 JAVA_PROC_TYPE=i386
162 endif
163 endif
165 OS=SOLARIS
166 PS=/
167 ICL=\$$
168 CC=g++
169 LINK=g++
170 LIB=g++
171 ECHO=@echo
172 MKDIR=mkdir -p
173 CAT=cat
174 OBJ_EXT=o
175 SHAREDLIB_EXT=so
176 SHAREDLIB_PRE=lib
177 SHAREDLIB_OUT=$(OUT_LIB)
179 OSEP=\<
180 CSEP=\>
181 QUOTE=$(subst S,\,S)
182 QM=\"
183 SQM='
184 ECHOLINE=@echo
185 P2BG=&
187 DEL=rm -f
188 DELRECURSIVE=rm -rf
189 COPY=cp
190 URLPREFIX=file://
192 COMID=gcc3
193 CPPU_ENV=gcc3
195 SALLIB=-luno_sal
196 CPPULIB=-luno_cppu
197 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
198 SALHELPERLIB=-luno_salhelper$(COMID)
199 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
201 EMPTYSTRING=
202 PATH_SEPARATOR=:
204 # -O is necessary for inlining (see gcc documentation)
205 ifeq "$(DEBUG)" "yes"
206 OPT_FLAGS=-g
207 else
208 OPT_FLAGS=-O
209 endif
210 CC_FLAGS_JNI=-c -fpic $(OPT_FLAGS)
211 CC_FLAGS=-c -fpic -fvisibility=hidden $(OPT_FLAGS)
212 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
213 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/solaris"
215 # define for used compiler necessary for UNO
217 CC_DEFINES_JNI=-DUNX -DSOLARIS -DCPPU_ENV=$(CPPU_ENV) -DGCC
218 CC_DEFINES=-DUNX -DSOLARIS -DSPARC -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE -DGCC
219 CC_OUTPUT_SWITCH=-o
221 LIBO_SDK_LDFLAGS_STDLIBS =
223 LIBRARY_LINK_FLAGS=-w -mt -z combreloc -fPIC -PIC -temp=/tmp '-R$$ORIGIN' -z text -norunpath -G -Bdirect -Bdynamic -lpthread -lCrun -lc -lm
224 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
226 EXE_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -Bdirect -z defs
227 LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)"
228 LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
230 ifeq "$(PROCTYPE)" "sparc64"
231 CC_FLAGS+=-m64
232 LIBRARY_LINK_FLAGS+=-m64
233 EXE_LINK_FLAGS+=-m64
234 endif
236 URE_MISC=$(OFFICE_PROGRAM_PATH)
238 endif
242 ###########################################################################
244 # Linux specific settings
246 ###########################################################################
247 ifeq "$(PLATFORM)" "linux"
248 # Settings for Linux using gcc compiler
250 UNOPKG_PLATFORM=Linux_$(PROCTYPE)
251 JAVA_PROC_TYPE=$(PROCTYPE)
253 ifeq "$(PROCTYPE)" "x86"
254 JAVA_PROC_TYPE=i386
255 endif
257 ifeq "$(PROCTYPE)" "powerpc"
258 UNOPKG_PLATFORM=Linux_PowerPC
259 JAVA_PROC_TYPE=ppc
260 endif
262 ifeq "$(PROCTYPE)" "sparc"
263 UNOPKG_PLATFORM=Linux_SPARC
264 endif
266 ifeq "$(PROCTYPE)" "x86_64"
267 JAVA_PROC_TYPE=amd64
268 endif
270 ifeq "$(PROCTYPE)" "powerpc64"
271 JAVA_PROC_TYPE=ppc64
272 endif
274 OS=LINUX
275 PS=/
276 ICL=\$$
277 CC=gcc
278 LINK=g++
279 LIB=g++
280 ECHO=@echo
281 MKDIR=mkdir -p
282 CAT=cat
283 OBJ_EXT=o
284 SHAREDLIB_EXT=so
285 SHAREDLIB_PRE=lib
286 SHAREDLIB_OUT=$(OUT_LIB)
288 GCC_VERSION=$(shell $(CC) -dumpversion)
290 COMID=gcc3
291 CPPU_ENV=gcc3
293 OSEP=\<
294 CSEP=\>
295 QUOTE=$(subst S,\,S)
296 QM=\"
297 SQM='
298 ECHOLINE=@echo
299 P2BG=&
301 DEL=rm -f
302 DELRECURSIVE=rm -rf
303 COPY=cp
304 URLPREFIX=file://
306 SALLIB=-luno_sal
307 CPPULIB=-luno_cppu
308 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
309 SALHELPERLIB=-luno_salhelper$(COMID)
310 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
312 EMPTYSTRING=
313 PATH_SEPARATOR=:
315 # -O is necessary for inlining (see gcc documentation)
316 ifeq "$(DEBUG)" "yes"
317 OPT_FLAGS=-g
318 else
319 OPT_FLAGS=-O
320 endif
321 CC_FLAGS_JNI=-c -fpic $(OPT_FLAGS)
322 CC_FLAGS=-c -fpic -fvisibility=hidden $(OPT_FLAGS)
324 ifeq "$(PROCTYPE)" "powerpc"
325 CC_FLAGS+=-fPIC
326 endif
328 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux"
329 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
330 CC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV)
331 CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE
333 CC_OUTPUT_SWITCH=-o
335 LIBO_SDK_LDFLAGS_STDLIBS =
337 LIBRARY_LINK_FLAGS=-shared -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
339 ifeq "$(PROCTYPE)" "powerpc"
340 LIBRARY_LINK_FLAGS+=-fPIC
341 endif
342 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
344 EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--no-whole-archive
345 LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)"
346 LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
348 URE_MISC=$(OFFICE_PROGRAM_PATH)
350 endif
352 ###########################################################################
354 # MacOSX/Darwin specific settings
356 ###########################################################################
357 ifeq "$(PLATFORM)" "macosx"
358 # Settings for MacOSX using gcc 4.0.1 compiler
360 ifeq "$(PROCTYPE)" "x86"
361 UNOPKG_PLATFORM=MacOSX_x86
362 else
363 ifeq "$(PROCTYPE)" "x86_64"
364 UNOPKG_PLATFORM=MacOSX_x86_64
365 endif
366 endif
367 JAVABIN=Commands
369 ifeq "$(PROCTYPE)" "x86"
370 GCC_VERSION =$(shell gcc -dumpversion| cut -d"." -f1,2)
371 ifeq "$(GCC_VERSION)" "4.2"
372 GCC_ARCH_OPTION=-arch i386
373 endif
374 endif
376 OS=MACOSX
377 PS=/
378 ICL=\$$
379 ifeq "$(PROCTYPE)" "x86"
380 CC=gcc-$(GCC_VERSION)
381 LINK=g++-$(GCC_VERSION)
382 LIB=g++-$(GCC_VERSION)
383 else
384 CC=clang++
385 LINK=clang++
386 LIB=clang++
387 endif
388 ECHO=@echo
389 MKDIR=mkdir -p
390 CAT=cat
391 OBJ_EXT=o
392 SHAREDLIB_EXT=dylib
393 SHAREDLIB_PRE=lib
394 SHAREDLIB_OUT=$(OUT_LIB)
396 COMID=gcc3
397 CPPU_ENV=gcc3
399 OSEP=\<
400 CSEP=\>
401 QUOTE=$(subst S,\,S)
402 QM=\"
403 SQM='
404 ECHOLINE=@echo
405 P2BG=&
407 DEL=rm -f
408 DELRECURSIVE=rm -rf
409 COPY=cp
410 URLPREFIX=file://
412 SALLIB=-luno_sal
413 CPPULIB=-luno_cppu
414 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
415 SALHELPERLIB=-luno_salhelper$(COMID)
416 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
418 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
420 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
422 EMPTYSTRING=
423 PATH_SEPARATOR=:
425 # -O is necessary for inlining (see gcc documentation)
426 ifeq "$(DEBUG)" "yes"
427 OPT_FLAGS=-g
428 else
429 OPT_FLAGS=-O
430 endif
431 CC_FLAGS_JNI=-c -fPIC -fno-common $(GCC_ARCH_OPTION) $(OPT_FLAGS)
432 CC_FLAGS=-c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden $(OPT_FLAGS)
434 SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers
435 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
436 CC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV)
437 CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE
439 CC_OUTPUT_SWITCH=-o
441 LIBO_SDK_LDFLAGS_STDLIBS =
443 LIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress $(GCC_ARCH_OPTION)
445 # install_name '@executable_path$/(@:f)'
446 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
448 EXE_LINK_FLAGS=$(GCC_ARCH_OPTION) -Wl,-multiply_defined,suppress
449 LINK_LIBS=-L$(OUT)/lib -L$(OO_SDK_OUT)/$(PLATFORM)/lib -L"$(OO_SDK_URE_LIB_DIR)"
450 LINK_JAVA_LIBS=-framework JavaVM
452 URE_MISC=$(OFFICE_HOME)/Contents/Resources/ure/share/misc
454 endif
456 ###########################################################################
458 # FreeBSD specific settings
460 ###########################################################################
461 ifneq (,$(findstring freebsd,$(PLATFORM)))
462 # Settings for FreeBSD using gcc compiler
464 ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
465 PLATFORM=kfreebsd
466 ifeq "$(PROCTYPE)" "x86_64"
467 UNOPKG_PLATFORM=kFreeBSD_x86_64
468 else
469 UNOPKG_PLATFORM=kFreeBSD_x86
470 endif
471 else
472 PLATFORM=freebsd
473 ifeq "$(PROCTYPE)" "x86_64"
474 UNOPKG_PLATFORM=FreeBSD_x86_64
475 else
476 UNOPKG_PLATFORM=FreeBSD_x86
477 endif
478 endif
480 ifeq "$(PROCTYPE)" "x86_64"
481 JAVA_PROC_TYPE=amd64
482 else
483 JAVA_PROC_TYPE=i386
484 endif
486 ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
487 OS=LINUX
488 else
489 OS=FREEBSD
490 endif
491 PS=/
492 ICL=\$$
493 CC=gcc
494 LINK=g++
495 LIB=g++
496 ECHO=@echo
497 MKDIR=mkdir -p
498 CAT=cat
499 OBJ_EXT=o
500 SHAREDLIB_EXT=so
501 SHAREDLIB_PRE=lib
502 SHAREDLIB_OUT=$(OUT_LIB)
504 GCC_VERSION=$(shell $(CC) -dumpversion)
506 COMID=gcc3
507 CPPU_ENV=gcc3
509 OSEP=\<
510 CSEP=\>
511 QUOTE=$(subst S,\,S)
512 QM=\"
513 SQM='
514 ECHOLINE=@echo
515 P2BG=&
517 DEL=rm -f
518 DELRECURSIVE=rm -rf
519 COPY=cp
520 URLPREFIX=file://
522 SALLIB=-luno_sal
523 CPPULIB=-luno_cppu
524 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
525 SALHELPERLIB=-luno_salhelper$(COMID)
526 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
528 EMPTYSTRING=
529 PATH_SEPARATOR=:
531 # -O is necessary for inlining (see gcc documentation)
532 ifeq "$(DEBUG)" "yes"
533 OPT_FLAGS=-g
534 else
535 OPT_FLAGS=-O
536 endif
537 CC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) $(OPT_FLAGS)
538 CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden $(OPT_FLAGS)
540 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd"
541 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
542 CC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV)
543 CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE
545 CC_OUTPUT_SWITCH=-o
547 LIBO_SDK_LDFLAGS_STDLIBS =
549 LIBRARY_LINK_FLAGS=-shared -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
550 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
552 EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined
553 LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)" $(PTHREAD_LIBS)
554 LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
556 URE_MISC=$(OFFICE_PROGRAM_PATH)
558 endif