xref: /trunk/main/odk/settings/settings.mk (revision e15a4534)
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)
75UNOPKG_PLATFORM=Windows
76
77OSEP=^<
78CSEP=^>
79QUOTE=
80QM=
81SQM=
82ECHOLINE=@echo.
83P2BG=
84
85DEL=del
86DELRECURSIVE=rd /S /Q
87URLPREFIX=file:///
88
89SALLIB=isal.lib
90CPPULIB=icppu.lib
91CPPUHELPERLIB=icppuhelper.lib
92SALHELPERLIB=isalhelper.lib
93REGLIB=ireg.lib
94STORELIB=istore.lib
95
96BLANK=
97EMPTYSTRING=
98PATH_SEPARATOR=;
99
100# use this for release version
101CC_FLAGS_JNI=-c -MT -Zm500 -Zc:wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -GR -EHa
102CC_FLAGS=-c -MT -Zm500 -Zc:wchar_t- -wd4251 -wd4275 -wd4290 -wd4675 -wd4786 -wd4800 -GR -EHa
103ifeq "$(CPP_MANIFEST)" "true"
104#CC_FLAGS+=-EHa -Zc:wchar_t-
105LINK_MANIFEST=mt -manifest $@.manifest "-outputresource:$@;2"
106else
107#CC_FLAGS+=
108LINK_MANIFEST=
109endif
110ifeq "$(DEBUG)" "yes"
111CC_FLAGS_JNI+=-Zi
112CC_FLAGS+=-Zi
113endif
114
115CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
116STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl"
117SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/win32"
118
119# define for used compiler necessary for UNO
120# -DCPPU_ENV=msci -- windows msvc 4.x - 7.x
121
122CC_DEFINES_JNI=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci
123CC_DEFINES=-DWIN32 -DWNT -D_DLL -DCPPU_ENV=msci
124CC_OUTPUT_SWITCH=-Fo
125
126LIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL /DEBUGTYPE:cv
127COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) /DEF:$(PRJ)/settings/component.uno.def
128EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1b000000 /DEBUGTYPE:cv /NODEFAULTLIB  msvcrt.lib msvcprt.lib kernel32.lib
129ifeq "$(DEBUG)" "yes"
130LIBRARY_LINK_FLAGS+=/DEBUG
131EXE_LINK_FLAGS+=/DEBUG
132endif
133
134LINK_JAVA_LIBS=/LIBPATH:"$(OO_SDK_JAVA_HOME)/lib"
135
136# use this for release version
137#EXE_LINK_FLAGS=/MAP /OPT:NOREF /SUBSYSTEM:CONSOLE /BASE:0x1100000
138#LIBRARY_LINK_FLAGS=/NODEFAULTLIB /DLL
139endif
140
141
142
143###########################################################################
144#
145# Solaris specific settings
146#
147###########################################################################
148ifneq (,$(findstring solaris,$(PLATFORM)))
149# Settings for Solaris using Sun Workshop compiler
150
151PROCTYPE := $(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)
152
153ifeq "$(PROCTYPE)" "sparc"
154PLATFORM=solsparc
155UNOPKG_PLATFORM=Solaris_SPARC
156JAVA_PROC_TYPE=sparc
157else
158ifeq "$(PROCTYPE)" "sparc64"
159PLATFORM=solsparc
160UNOPKG_PLATFORM=Solaris_SPARC64
161JAVA_PROC_TYPE=sparcv9
162else
163PLATFORM=solintel
164UNOPKG_PLATFORM=Solaris_x86
165JAVA_PROC_TYPE=i386
166endif
167endif
168
169OS=SOLARIS
170PS=/
171ICL=\$$
172CC=CC
173LINK=CC
174LIB=CC
175ECHO=@echo
176MKDIR=mkdir -p
177CAT=cat
178OBJ_EXT=o
179SHAREDLIB_EXT=so
180SHAREDLIB_PRE=lib
181SHAREDLIB_OUT=$(OUT_LIB)
182
183OSEP=\<
184CSEP=\>
185QUOTE=$(subst S,\,S)
186QM=\"
187SQM='
188ECHOLINE=@echo
189P2BG=&
190
191DEL=rm -f
192DELRECURSIVE=rm -rf
193COPY=cp
194URLPREFIX=file://
195
196# Include UDK version numbers
197include $(PRJ)/include/udkversion.mk
198
199SALLIB=-luno_sal
200CPPULIB=-luno_cppu
201CPPUHELPERLIB=-luno_cppuhelperC52
202SALHELPERLIB=-luno_salhelperC52
203REGLIB=-lreg
204STORELIB=-lstore
205
206EMPTYSTRING=
207PATH_SEPARATOR=:
208
209CC_FLAGS_JNI=-c -KPIC
210CC_FLAGS=-c -KPIC -xldscope=hidden
211ifeq "$(DEBUG)" "yes"
212CC_FLAGS_JNI+=-g
213CC_FLAGS+=-g
214endif
215CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
216STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl"
217SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/solaris"
218
219# define for used compiler necessary for UNO
220# -DCPPU_ENV=sunpro5 -- sunpro cc 5.x solaris sparc/intel
221
222CC_DEFINES_JNI=-DUNX -DSOLARIS -DCPPU_ENV=sunpro5
223CC_DEFINES=-DUNX -DSOLARIS -DSPARC -DCPPU_ENV=sunpro5  -DHAVE_GCC_VISIBILITY_FEATURE
224CC_OUTPUT_SWITCH=-o
225
226LIBRARY_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp '-R$$ORIGIN' -z text -norunpath -G -Bdirect -Bdynamic -lpthread -lCrun -lc -lm
227# means if used CC is lower then version 5.5 use option -instance=static
228ifeq ($(OO_SDK_CC_55_OR_HIGHER),)
229LIBRARY_LINK_FLAGS+=-instances=static
230endif
231#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -M $(PRJ)/settings/component.uno.map
232COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
233
234EXE_LINK_FLAGS=-w -mt -z combreloc -PIC -temp=/tmp -norunpath -Bdirect -z defs
235LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_OFFICE_LIB_DIR)"
236LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
237
238ifeq "$(PROCTYPE)" "sparc64"
239CC_FLAGS+=-m64
240LIBRARY_LINK_FLAGS+=-m64
241EXE_LINK_FLAGS+=-m64
242endif
243
244endif
245
246
247
248###########################################################################
249#
250# Linux specific settings
251#
252###########################################################################
253ifneq (,$(findstring linux,$(PLATFORM)))
254# Settings for Linux using gcc compiler
255
256PROCTYPE := $(shell $(PRJ)/config.guess | cut -d "-" -f1 | sed -e 's/^i.86$$/i386/')
257PLATFORM=linux
258
259UNOPKG_PLATFORM=Linux_$(PROCTYPE)
260JAVA_PROC_TYPE=$(PROCTYPE)
261
262ifeq "$(PROCTYPE)" "i386"
263UNOPKG_PLATFORM=Linux_x86
264JAVA_PROC_TYPE=i386
265endif
266
267ifeq "$(PROCTYPE)" "powerpc"
268UNOPKG_PLATFORM=Linux_PowerPC
269JAVA_PROC_TYPE=ppc
270endif
271
272ifeq "$(PROCTYPE)" "sparc"
273UNOPKG_PLATFORM=Linux_SPARC
274JAVA_PROC_TYPE=sparc
275endif
276
277ifeq "$(PROCTYPE)" "x86_64"
278JAVA_PROC_TYPE=amd64
279endif
280
281ifeq "$(PROCTYPE)" "powerpc64"
282JAVA_PROC_TYPE=ppc64
283endif
284
285OS=LINUX
286PS=/
287ICL=\$$
288CC=gcc
289LINK=g++
290LIB=g++
291ECHO=@echo
292MKDIR=mkdir -p
293CAT=cat
294OBJ_EXT=o
295SHAREDLIB_EXT=so
296SHAREDLIB_PRE=lib
297SHAREDLIB_OUT=$(OUT_LIB)
298
299GCC_VERSION=$(shell $(CC) -dumpversion)
300
301COMID=gcc3
302CPPU_ENV=gcc3
303
304OSEP=\<
305CSEP=\>
306QUOTE=$(subst S,\,S)
307QM=\"
308SQM='
309ECHOLINE=@echo
310P2BG=&
311
312DEL=rm -f
313DELRECURSIVE=rm -rf
314COPY=cp
315URLPREFIX=file://
316
317# Include UDK version numbers
318include $(PRJ)/include/udkversion.mk
319
320SALLIB=-luno_sal
321CPPULIB=-luno_cppu
322CPPUHELPERLIB=-luno_cppuhelper$(COMID)
323SALHELPERLIB=-luno_salhelper$(COMID)
324REGLIB=-lreg
325STORELIB=-lstore
326
327EMPTYSTRING=
328PATH_SEPARATOR=:
329
330CC_FLAGS_JNI=-c -fpic
331CC_FLAGS=-c -fpic -fvisibility=hidden
332# -O is necessary for inlining (see gcc documentation)
333ifeq "$(DEBUG)" "yes"
334CC_FLAGS_JNI+=-g
335CC_FLAGS+=-g
336else
337CC_FLAGS_JNI+=-O
338CC_FLAGS+=-O
339endif
340
341ifeq "$(PROCTYPE)" "ppc"
342CC_FLAGS+=-fPIC
343endif
344
345SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/linux"
346CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
347STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl"
348CC_DEFINES_JNI=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
349CC_DEFINES=-DUNX -DGCC -DLINUX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE
350
351# define for used compiler necessary for UNO
352#-DCPPU_ENV=gcc2 -- gcc 2.91/2.95
353#-DCPPU_ENV=gcc3 -- gcc3 3.0
354
355CC_OUTPUT_SWITCH=-o
356
357LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN'
358
359ifeq "$(PROCTYPE)" "ppc"
360LIBRARY_LINK_FLAGS+=-fPIC
361endif
362#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map
363COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
364
365#EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--whole-archive -lsalcpprt -Wl,--no-whole-archive
366EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined -Wl,-export-dynamic -Wl,-z,defs -Wl,--no-whole-archive
367LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_OFFICE_LIB_DIR)"
368LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
369
370endif
371
372###########################################################################
373#
374# MacOSX/Darwin specific settings
375#
376###########################################################################
377ifneq (,$(findstring darwin,$(PLATFORM)))
378# Settings for MacOSX using LLVM version 4.2 (clang-425.0.28)
379
380PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)
381
382# Default is MacOSX on a Intel machine
383PLATFORM=macosx
384
385ifeq "$(PROCTYPE)" "x86_64"
386UNOPKG_PLATFORM=MacOSX_x86_64
387endif
388
389JAVABIN=Commands
390
391GCC_ARCH_OPTION=-arch x86_64
392
393OS=MACOSX
394PS=/
395ICL=\$$
396CC=`xcrun -f clang` -arch x86_64
397CXX=`xcrun -f clang++` -arch x86_64 -std=c++11
398LINK=`xcrun -f clang++` -arch x86_64 -std=c++11
399LIB=`xcrun -f clang++` -arch x86_64 -std=c++11
400INSTALLTOOL=`xcrun -f install_name_tool`
401
402ECHO=@echo
403MKDIR=mkdir -p
404CAT=cat
405OBJ_EXT=o
406SHAREDLIB_EXT=dylib
407SHAREDLIB_PRE=lib
408SHAREDLIB_OUT=$(OUT_LIB)
409
410COMID=gcc3
411CPPU_ENV=gcc3
412COMID=s5abi
413CPPU_ENV=s5abi
414
415OSEP=\<
416CSEP=\>
417QUOTE=$(subst S,\,S)
418QM=\"
419SQM='
420ECHOLINE=@echo
421P2BG=&
422
423DEL=rm -f
424DELRECURSIVE=rm -rf
425COPY=cp
426URLPREFIX=file://
427
428# Include UDK version numbers
429include $(PRJ)/include/udkversion.mk
430
431SALLIB=-luno_sal
432CPPULIB=-luno_cppu
433CPPUHELPERLIB=-luno_cppuhelper$(COMID)
434SALHELPERLIB=-luno_salhelper$(COMID)
435REGLIB=-lreg
436STORELIB=-lstore
437
438SALDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_sal.dylib.3:'$(OO_SDK_OFFICE_LIB_DIR)/libuno_sal.dylib'
439CPPUDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppu.dylib.3:'$(OO_SDK_OFFICE_LIB_DIR)/libuno_cppu.dylib'
440CPPUHELPERDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_cppuhelper'$(COMID).dylib.3:$(OO_SDK_OFFICE_LIB_DIR)/libuno_cppuhelper$(COMID).dylib'
441SALHELPERDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libuno_salhelper$(COMID).dylib.3:'$(OO_SDK_OFFICE_LIB_DIR)/libuno_salhelper$(COMID).dylib'
442REGDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libreg.dylib.3:'$(OO_SDK_OFFICE_LIB_DIR)/libreg.dylib'
443STOREDYLIB=-Wl,-dylib_file,@__________________________________________________URELIB/libstore.dylib.3:'$(OO_SDK_OFFICE_LIB_DIR)/libstore.dylib'
444
445INSTALL_NAME_URELIBS=$(INSTALLTOOL) -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
446
447INSTALL_NAME_URELIBS_BIN=$(INSTALLTOOL) -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
448
449EMPTYSTRING=
450PATH_SEPARATOR=:
451
452CC_FLAGS_JNI=-c -fPIC -fno-common $(GCC_ARCH_OPTION)
453CC_FLAGS=-c -fPIC -fno-common $(GCC_ARCH_OPTION) -fvisibility=hidden
454
455# -O is necessary for inlining (see gcc documentation)
456ifeq "$(DEBUG)" "yes"
457CC_FLAGS_JNI+=-g
458CC_FLAGS+=-g
459else
460CC_FLAGS_JNI+=-O
461CC_FLAGS+=-O
462endif
463
464SDK_JAVA_INCLUDES = -I/System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers -I/System/Library/Frameworks/JavaVM.framework/Headers
465CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
466STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl"
467CC_DEFINES_JNI=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
468CC_DEFINES=-DUNX -DGCC -DMACOSX -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE
469
470CC_OUTPUT_SWITCH=-o
471
472LIBRARY_LINK_FLAGS=-dynamiclib -single_module -Wl,-multiply_defined,suppress $(GCC_ARCH_OPTION)
473#-fPIC -fno-common
474
475# install_name '@executable_path$/(@:f)'
476#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)  -Wl,-exported_symbols_list $(COMP_MAPFILE)
477COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
478
479EXE_LINK_FLAGS=$(GCC_ARCH_OPTION) -Wl,-multiply_defined,suppress
480LINK_LIBS=-L$(OUT)/lib -L$(OO_SDK_OUT)/$(PLATFORM)/lib -L"$(OO_SDK_OFFICE_LIB_DIR)"
481LINK_JAVA_LIBS=-framework JavaVM
482#LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/Libraries"
483
484endif
485
486###########################################################################
487#
488# FreeBSD specific settings
489#
490###########################################################################
491ifneq (,$(findstring freebsd,$(PLATFORM)))
492# Settings for FreeBSD using gcc compiler
493
494PROCTYPE := $(shell $(PRJ)/config.guess | cut -d"-" -f1)
495
496ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
497PLATFORM=kfreebsd
498ifeq "$(PROCTYPE)" "x86_64"
499UNOPKG_PLATFORM=kFreeBSD_x86_64
500else
501UNOPKG_PLATFORM=kFreeBSD_x86
502endif
503else
504PLATFORM=freebsd
505ifeq "$(PROCTYPE)" "x86_64"
506UNOPKG_PLATFORM=FreeBSD_x86_64
507else
508UNOPKG_PLATFORM=FreeBSD_x86
509endif
510ifeq "$(PROCTYPE)" "powerpc"
511UNOPKG_PLATFORM=FreeBSD_ppc
512endif
513endif
514
515ifeq "$(PROCTYPE)" "x86_64"
516JAVA_PROC_TYPE=amd64
517else
518JAVA_PROC_TYPE=i386
519endif
520
521ifeq "$(PROCTYPE)" "powerpc64"
522JAVA_PROC_TYPE=ppc64
523endif
524
525ifeq (kfreebsd,$(findstring kfreebsd,$(PLATFORM)))
526OS=LINUX
527else
528OS=FREEBSD
529endif
530PS=/
531ICL=\$$
532CC=gcc
533LINK=g++
534LIB=g++
535ECHO=@echo
536MKDIR=mkdir -p
537CAT=cat
538OBJ_EXT=o
539SHAREDLIB_EXT=so
540SHAREDLIB_PRE=lib
541SHAREDLIB_OUT=$(OUT_LIB)
542
543GCC_VERSION=$(shell $(CC) -dumpversion)
544
545COMID=gcc3
546CPPU_ENV=gcc3
547
548OSEP=\<
549CSEP=\>
550QUOTE=$(subst S,\,S)
551QM=\"
552SQM='
553ECHOLINE=@echo
554P2BG=&
555
556DEL=rm -f
557DELRECURSIVE=rm -rf
558COPY=cp
559URLPREFIX=file://
560
561# Include UDK version numbers
562include $(PRJ)/include/udkversion.mk
563
564SALLIB=-luno_sal
565CPPULIB=-luno_cppu
566CPPUHELPERLIB=-luno_cppuhelper$(COMID)
567SALHELPERLIB=-luno_salhelper$(COMID)
568REGLIB=-lreg
569STORELIB=-lstore
570
571EMPTYSTRING=
572PATH_SEPARATOR=:
573
574CC_FLAGS_JNI=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS)
575CC_FLAGS=-c -g -fPIC -DPIC $(PTHREAD_CFLAGS) -fvisibility=hidden
576# -O is necessary for inlining (see gcc documentation)
577ifeq "$(DEBUG)" "yes"
578CC_FLAGS_JNI+=-g
579CC_FLAGS+=-g
580else
581CC_FLAGS_JNI+=-O
582CC_FLAGS+=-O
583endif
584
585SDK_JAVA_INCLUDES = -I"$(OO_SDK_JAVA_HOME)/include" -I"$(OO_SDK_JAVA_HOME)/include/freebsd"
586CC_INCLUDES=-I. -I$(OUT)/inc -I$(OUT)/inc/examples -I$(PRJ)/include
587STL_INCLUDES=-I"$(OO_SDK_HOME)/include/stl"
588CC_DEFINES_JNI=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH)
589CC_DEFINES=-DUNX -DGCC -DFREEBSD -DCPPU_ENV=$(CPPU_ENV) -DGXX_INCLUDE_PATH=$(SDK_GXX_INCLUDE_PATH) -DHAVE_GCC_VISIBILITY_FEATURE
590
591CC_OUTPUT_SWITCH=-o
592
593LIBRARY_LINK_FLAGS=-shared '-Wl,-rpath,$$ORIGIN'
594#COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS) -Wl,--version-script,$(PRJ)/settings/component.uno.map
595COMP_LINK_FLAGS=$(LIBRARY_LINK_FLAGS)
596
597EXE_LINK_FLAGS=-Wl,--allow-shlib-undefined
598#EXE_LINK_FLAGS+=-Wl,-export-dynamic -Wl,-z,defs
599LINK_LIBS=-L"$(OUT)/lib" -L"$(OO_SDK_HOME)/lib" -L"$(OO_SDK_OFFICE_LIB_DIR)" $(PTHREAD_LIBS)
600LINK_JAVA_LIBS=-L"$(OO_SDK_JAVA_HOME)/jre/lib/$(JAVA_PROC_TYPE)"
601
602endif
603
604# add additional boost specific settings
605ifneq "$(OO_SDK_BOOST_HOME)" ""
606STL_INCLUDES+= -I"$(OO_SDK_BOOST_HOME)"
607endif
608
609# Add OSL_DEBUG_LEVEL to compiler the flags (for OSL_TRACE et. al.)
610ifeq "$(DEBUG)" "yes"
611CC_FLAGS += -DOSL_DEBUG_LEVEL=2
612endif
613