Version 4.2.0.1, tag libreoffice-4.2.0.1
[LibreOffice.git] / odk / settings / settings.mk
blobb884e75c4e0e3443b9a241619e0731c584d29171
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 # test for the platform
25 PLATFORM := $(shell $(PRJ)/config.guess | cut -d"-" -f3,4)
27 # config.guess is missing for windows. We rely on getting "" in this case.
28 ifeq "$(PLATFORM)" ""
29 PLATFORM = windows
30 endif
32 # debug option, default is no debug
33 DEBUG=no
34 ifeq "$(MAKECMDGOALS)" "debug"
35 DEBUG=yes
36 endif
38 ###########################################################################
40 # Java settings
42 ###########################################################################
43 JAVAC_FLAGS=
45 ifeq "$(DEBUG)" "yes"
46 JAVAC_FLAGS+=-g
47 endif
49 JAVABIN=bin
51 ###########################################################################
53 # Windows specific settings
55 ###########################################################################
56 ifeq "$(PLATFORM)" "windows"
57 # Settings for Windows using Microsoft compiler/linker
59 OS=WIN
60 PS:=$(strip \ )
61 ICL=$$
62 CC=cl
63 LINK=link
64 BUILDLIB=lib
65 ECHO=@echo
66 MKDIR=mkdir
67 MV=move
68 CAT=type
69 OBJ_EXT=obj
70 EXE_EXT=.exe
71 COPY=copy
72 SHAREDLIB_EXT=dll
73 SHAREDLIB_OUT=$(OUT_BIN)
74 UNOPKG_PLATFORM=Windows
76 OSEP=^<
77 CSEP=^>
78 QUOTE=
79 QM=
80 SQM=
81 ECHOLINE=@echo.
82 P2BG=
84 DEL=del
85 DELRECURSIVE=rd /S /Q
86 URLPREFIX=file:///
88 SALLIB=isal.lib
89 CPPULIB=icppu.lib
90 CPPUHELPERLIB=icppuhelper.lib
91 SALHELPERLIB=isalhelper.lib
92 PURPENVHELPERLIB=ipurpenvhelper.lib
94 BLANK=
95 EMPTYSTRING=
96 PATH_SEPARATOR=;
98 ifeq "$(LIBO_SDK_ENABLE_DBGUTIL)" "TRUE"
99 LIBO_SDK_DETAIL_CFLAGS_MSVCRT = -MDd
100 LIBO_SDK_DETAIL_LDFLAGS_MSVCRT = msvcrtd.lib
101 else
102 LIBO_SDK_DETAIL_CFLAGS_MSVCRT = -MD
103 LIBO_SDK_DETAIL_LDFLAGS_MSVCRT = msvcrt.lib
104 endif
106 # use this for release version
107 ifeq "$(DEBUG)" "yes"
108 OPT_FLAGS=-Zi
109 endif
110 CC_FLAGS_JNI=-c $(LIBO_SDK_DETAIL_CFLAGS_MSVCRT) -Zm500 -Zc:wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -GR -EHa $(OPT_FLAGS)
111 CC_FLAGS=-c $(LIBO_SDK_DETAIL_CFLAGS_MSVCRT) -Zm500 -Zc:wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -GR -EHa $(OPT_FLAGS)
112 ifeq "$(CPP_MANIFEST)" "true"
113 LINK_MANIFEST=mt -manifest $@.manifest "-outputresource:$@;2"
114 else
115 LINK_MANIFEST=
116 endif
118 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
119 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/win32"
121 # define for used compiler necessary for UNO
122 # -DCPPU_ENV=msci -- windows msvc 4.x - 7.x
124 CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci
125 CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci
126 CC_OUTPUT_SWITCH=-Fo
128 LIBO_SDK_LDFLAGS_STDLIBS = $(LIBO_SDK_DETAIL_LDFLAGS_MSVCRT) kernel32.lib
130 LIBRARY_LINK_FLAGS=/DLL /DEBUGTYPE:cv
131 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) /DEF:$(PRJ)/settings/component.uno.def
132 EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1b000000 /DEBUGTYPE:cv $(LIBO_SDK_LDFLAGS_STDLIBS)
133 ifeq "$(DEBUG)" "yes"
134 LIBRARY_LINK_FLAGS+=/DEBUG
135 EXE_LINK_FLAGS+=/DEBUG
136 endif
138 LINK_JAVA_LIBS=/LIBPATH:"$(OO_SDK_JAVA_HOME)/lib"
140 ifneq "$(OO_SDK_URE_HOME)" ""
141 URE_MISC=$(OO_SDK_URE_HOME)\misc
142 endif
144 # use this for release version
145 #EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1100000
146 #LIBRARY_LINK_FLAGS=/DLL
147 endif
151 ###########################################################################
153 # Solaris specific settings
155 ###########################################################################
156 ifneq (,$(findstring solaris,$(PLATFORM)))
157 # Settings for Solaris using Sun Workshop compiler
159 PROCTYPE := $(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)
161 ifeq "$(PROCTYPE)" "sparc"
162 PLATFORM=solsparc
163 UNOPKG_PLATFORM=Solaris_SPARC
164 JAVA_PROC_TYPE=sparc
165 else
166 ifeq "$(PROCTYPE)" "sparc64"
167 PLATFORM=solsparc
168 UNOPKG_PLATFORM=Solaris_SPARC64
169 JAVA_PROC_TYPE=sparcv9
170 else
171 PLATFORM=solintel
172 UNOPKG_PLATFORM=Solaris_x86
173 JAVA_PROC_TYPE=i386
174 endif
175 endif
177 OS=SOLARIS
178 PS=/
179 ICL=\$$
180 CC=CC
181 LINK=CC
182 LIB=CC
183 ECHO=@echo
184 MKDIR=mkdir -p
185 CAT=cat
186 OBJ_EXT=o
187 SHAREDLIB_EXT=so
188 SHAREDLIB_PRE=lib
189 SHAREDLIB_OUT=$(OUT_LIB)
191 OSEP=\<
192 CSEP=\>
193 QUOTE=$(subst S,\,S)
194 QM=\"
195 SQM='
196 ECHOLINE=@echo
197 P2BG=&
199 DEL=rm -f
200 DELRECURSIVE=rm -rf
201 COPY=cp
202 URLPREFIX=file://
204 COMID=gcc3
205 CPPU_ENV=gcc3
207 #SALLIB=-luno_sal
208 #CPPULIB=-luno_cppu
209 #CPPUHELPERLIB=-luno_cppuhelperC52
210 #SALHELPERLIB=-luno_salhelperC52
211 SALLIB=-luno_sal
212 CPPULIB=-luno_cppu
213 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
214 SALHELPERLIB=-luno_salhelper$(COMID)
215 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
217 EMPTYSTRING=
218 PATH_SEPARATOR=:
220 ifeq "$(DEBUG)" "yes"
221 OPT_FLAGS=-g
222 endif
223 #CC_FLAGS_JNI=-c -KPIC $(OPT_FLAGS)
224 #CC_FLAGS=-c -KPIC -xldscope=hidden $(OPT_FLAGS)
225 CC_FLAGS_JNI=-c -fpic $(OPT_FLAGS)
226 CC_FLAGS=-c -fpic -fvisibility=hidden $(OPT_FLAGS)
227 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
228 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/solaris"
230 # define for used compiler necessary for UNO
231 # -DCPPU_ENV=sunpro5 -- sunpro cc 5.x solaris sparc/intel
233 #CC_DEFINES_JNI=-DUNX -DSOLARIS -DCPPU_ENV=sunpro5
234 CC_DEFINES_JNI=-DUNX -DSOLARIS -DCPPU_ENV=$(CPPU_ENV) -DGCC
235 #CC_DEFINES=-DUNX -DSOLARIS -DSPARC -DCPPU_ENV=sunpro5 -DHAVE_GCC_VISIBILITY_FEATURE
236 CC_DEFINES=-DUNX -DSOLARIS -DSPARC -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE -DGCC
237 CC_OUTPUT_SWITCH=-o
239 LIBO_SDK_LDFLAGS_STDLIBS =
241 #LIBRARY_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp '-R$$ORIGIN' -z text -norunpath -G -Bdirect -Bdynamic -lpthread -lCrun -lc -lm
242 LIBRARY_LINK_FLAGS=-w -mt -z combreloc -fPIC -PIC -temp=/tmp '-R$$ORIGIN' -z text -norunpath -G -Bdirect -Bdynamic -lpthread -lCrun -lc -lm
243 # means if used CC is lower then version 5.5 use option -instance=static
244 ifeq ($(OO_SDK_CC_55_OR_HIGHER),)
245 LIBRARY_LINK_FLAGS+=-instances=static
246 endif
247 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
249 EXE_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -Bdirect -z defs
250 LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)"
251 LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
253 ifeq "$(PROCTYPE)" "sparc64"
254 CC_FLAGS+=-m64
255 LIBRARY_LINK_FLAGS+=-m64
256 EXE_LINK_FLAGS+=-m64
257 endif
259 ifneq "$(OO_SDK_URE_HOME)" ""
260 URE_MISC=$(OO_SDK_URE_HOME)/share/misc
261 endif
263 endif
267 ###########################################################################
269 # Linux specific settings
271 ###########################################################################
272 ifneq (,$(findstring linux,$(PLATFORM)))
273 # Settings for Linux using gcc compiler
275 PROCTYPE := $(shell $(PRJ)/config.guess | cut -d "-" -f1 | sed -e 's/^i.86$$/i386/')
276 PLATFORM=linux
278 UNOPKG_PLATFORM=Linux_$(PROCTYPE)
279 JAVA_PROC_TYPE=$(PROCTYPE)
281 ifeq "$(PROCTYPE)" "i386"
282 UNOPKG_PLATFORM=Linux_x86
283 JAVA_PROC_TYPE=i386
284 endif
286 ifeq "$(PROCTYPE)" "powerpc"
287 UNOPKG_PLATFORM=Linux_PowerPC
288 JAVA_PROC_TYPE=ppc
289 endif
291 ifeq "$(PROCTYPE)" "sparc"
292 UNOPKG_PLATFORM=Linux_SPARC
293 JAVA_PROC_TYPE=sparc
294 endif
296 ifeq "$(PROCTYPE)" "x86_64"
297 JAVA_PROC_TYPE=amd64
298 endif
300 ifeq "$(PROCTYPE)" "powerpc64"
301 JAVA_PROC_TYPE=ppc64
302 endif
304 OS=LINUX
305 PS=/
306 ICL=\$$
307 CC=gcc
308 LINK=g++
309 LIB=g++
310 ECHO=@echo
311 MKDIR=mkdir -p
312 CAT=cat
313 OBJ_EXT=o
314 SHAREDLIB_EXT=so
315 SHAREDLIB_PRE=lib
316 SHAREDLIB_OUT=$(OUT_LIB)
318 GCC_VERSION=$(shell $(CC) -dumpversion)
320 COMID=gcc3
321 CPPU_ENV=gcc3
323 OSEP=\<
324 CSEP=\>
325 QUOTE=$(subst S,\,S)
326 QM=\"
327 SQM='
328 ECHOLINE=@echo
329 P2BG=&
331 DEL=rm -f
332 DELRECURSIVE=rm -rf
333 COPY=cp
334 URLPREFIX=file://
336 SALLIB=-luno_sal
337 CPPULIB=-luno_cppu
338 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
339 SALHELPERLIB=-luno_salhelper$(COMID)
340 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
342 EMPTYSTRING=
343 PATH_SEPARATOR=:
345 # -O is necessary for inlining (see gcc documentation)
346 ifeq "$(DEBUG)" "yes"
347 OPT_FLAGS=-g
348 else
349 OPT_FLAGS=-O
350 endif
351 CC_FLAGS_JNI=-c -fpic $(OPT_FLAGS)
352 CC_FLAGS=-c -fpic -fvisibility=hidden $(OPT_FLAGS)
354 ifeq "$(PROCTYPE)" "ppc"
355 CC_FLAGS+=-fPIC
356 endif
358 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux"
359 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
360 CC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV)
361 CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE
363 CC_OUTPUT_SWITCH=-o
365 LIBO_SDK_LDFLAGS_STDLIBS =
367 LIBRARY_LINK_FLAGS=-shared -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
369 ifeq "$(PROCTYPE)" "ppc"
370 LIBRARY_LINK_FLAGS+=-fPIC
371 endif
372 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
374 EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--no-whole-archive
375 LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)"
376 LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
378 ifneq "$(OO_SDK_URE_HOME)" ""
379 URE_MISC=$(OO_SDK_URE_HOME)/share/misc
380 endif
382 endif
384 ###########################################################################
386 # MacOSX/Darwin specific settings
388 ###########################################################################
389 ifneq (,$(findstring darwin,$(PLATFORM)))
390 # Settings for MacOSX using gcc 4.0.1 compiler
392 PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)
394 # Default is MacOSX on a Intel machine
395 PLATFORM=macosx
397 ifeq "$(PROCTYPE)" "i386"
398 UNOPKG_PLATFORM=MacOSX_x86
399 JAVA_PROC_TYPE=x86
400 else
401 ifeq "$(PROCTYPE)" "x86_64"
402 UNOPKG_PLATFORM=MacOSX_x86
403 JAVA_PROC_TYPE=x86
404 endif
405 endif
406 JAVABIN=Commands
408 GCC_VERSION =$(shell gcc -dumpversion| cut -d"." -f1,2)
409 ifeq "$(GCC_VERSION)" "4.2"
410 GCC_ARCH_OPTION=-arch i386
411 endif
413 OS=MACOSX
414 PS=/
415 ICL=\$$
416 CC=gcc-$(GCC_VERSION)
417 LINK=g++-$(GCC_VERSION)
418 LIB=g++-$(GCC_VERSION)
419 ECHO=@echo
420 MKDIR=mkdir -p
421 CAT=cat
422 OBJ_EXT=o
423 SHAREDLIB_EXT=dylib
424 SHAREDLIB_PRE=lib
425 SHAREDLIB_OUT=$(OUT_LIB)
427 COMID=gcc3
428 CPPU_ENV=gcc3
430 OSEP=\<
431 CSEP=\>
432 QUOTE=$(subst S,\,S)
433 QM=\"
434 SQM='
435 ECHOLINE=@echo
436 P2BG=&
438 DEL=rm -f
439 DELRECURSIVE=rm -rf
440 COPY=cp
441 URLPREFIX=file://
443 SALLIB=-luno_sal
444 CPPULIB=-luno_cppu
445 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
446 SALHELPERLIB=-luno_salhelper$(COMID)
447 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
449 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
451 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
453 EMPTYSTRING=
454 PATH_SEPARATOR=:
456 # -O is necessary for inlining (see gcc documentation)
457 ifeq "$(DEBUG)" "yes"
458 OPT_FLAGS=-g
459 else
460 OPT_FLAGS=-O
461 endif
462 CC_FLAGS_JNI=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) $(OPT_FLAGS)
463 CC_FLAGS=-malign-natural -c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden $(OPT_FLAGS)
465 SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers
466 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
467 CC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV)
468 CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE
470 CC_OUTPUT_SWITCH=-o
472 LIBO_SDK_LDFLAGS_STDLIBS =
474 LIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress $(GCC_ARCH_OPTION)
476 # install_name '@executable_path$/(@:f)'
477 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
479 EXE_LINK_FLAGS=$(GCC_ARCH_OPTION) -Wl,-multiply_defined,suppress
480 LINK_LIBS=-L$(OUT)/lib -L$(OO_SDK_OUT)/$(PLATFORM)/lib -L"$(OO_SDK_URE_LIB_DIR)"
481 LINK_JAVA_LIBS=-framework JavaVM
483 ifneq "$(OO_SDK_URE_HOME)" ""
484 URE_MISC=$(OO_SDK_URE_HOME)/share/misc
485 endif
487 endif
489 ###########################################################################
491 # FreeBSD specific settings
493 ###########################################################################
494 ifneq (,$(findstring freebsd,$(PLATFORM)))
495 # Settings for FreeBSD using gcc compiler
497 PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)
499 ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
500 PLATFORM=kfreebsd
501 ifeq "$(PROCTYPE)" "x86_64"
502 UNOPKG_PLATFORM=kFreeBSD_x86_64
503 else
504 UNOPKG_PLATFORM=kFreeBSD_x86
505 endif
506 else
507 PLATFORM=freebsd
508 ifeq "$(PROCTYPE)" "x86_64"
509 UNOPKG_PLATFORM=FreeBSD_x86_64
510 else
511 UNOPKG_PLATFORM=FreeBSD_x86
512 endif
513 endif
515 ifeq "$(PROCTYPE)" "x86_64"
516 JAVA_PROC_TYPE=amd64
517 else
518 JAVA_PROC_TYPE=i386
519 endif
521 ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
522 OS=LINUX
523 else
524 OS=FREEBSD
525 endif
526 PS=/
527 ICL=\$$
528 CC=gcc
529 LINK=g++
530 LIB=g++
531 ECHO=@echo
532 MKDIR=mkdir -p
533 CAT=cat
534 OBJ_EXT=o
535 SHAREDLIB_EXT=so
536 SHAREDLIB_PRE=lib
537 SHAREDLIB_OUT=$(OUT_LIB)
539 GCC_VERSION=$(shell $(CC) -dumpversion)
541 COMID=gcc3
542 CPPU_ENV=gcc3
544 OSEP=\<
545 CSEP=\>
546 QUOTE=$(subst S,\,S)
547 QM=\"
548 SQM='
549 ECHOLINE=@echo
550 P2BG=&
552 DEL=rm -f
553 DELRECURSIVE=rm -rf
554 COPY=cp
555 URLPREFIX=file://
557 SALLIB=-luno_sal
558 CPPULIB=-luno_cppu
559 CPPUHELPERLIB=-luno_cppuhelper$(COMID)
560 SALHELPERLIB=-luno_salhelper$(COMID)
561 PURPENVHELPERLIB=-luno_purpenvhelper$(COMID)
563 EMPTYSTRING=
564 PATH_SEPARATOR=:
566 # -O is necessary for inlining (see gcc documentation)
567 ifeq "$(DEBUG)" "yes"
568 OPT_FLAGS=-g
569 else
570 OPT_FLAGS=-O
571 endif
572 CC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) $(OPT_FLAGS)
573 CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden $(OPT_FLAGS)
575 SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd"
576 CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
577 CC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV)
578 CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DHAVE_GCC_VISIBILITY_FEATURE
580 CC_OUTPUT_SWITCH=-o
582 LIBO_SDK_LDFLAGS_STDLIBS =
584 LIBRARY_LINK_FLAGS=-shared -Wl,-z,origin '-Wl,-rpath,$$ORIGIN'
585 COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
587 EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined
588 LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_URE_LIB_DIR)" $(PTHREAD_LIBS)
589 LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
591 ifneq "$(OO_SDK_URE_HOME)" ""
592 URE_MISC=$(OO_SDK_URE_HOME)/share/misc
593 endif
595 endif