Version 4.2.0.1, tag libreoffice-4.2.0.1
[LibreOffice.git] / sal / Library_sal.mk
blobcbc52a7212bfb3407b2896b63d6f9eb03ae07ce1
1 # -*- Mode: makefile; tab-width: 4; indent-tabs-mode: t -*-
4 # This file is part of the LibreOffice project.
6 # This Source Code Form is subject to the terms of the Mozilla Public
7 # License, v. 2.0. If a copy of the MPL was not distributed with this
8 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
11 $(eval $(call gb_Library_Library,sal))
13 $(eval $(call gb_Library_set_soversion_script,sal,$(SRCDIR)/sal/util/sal.map))
15 $(eval $(call gb_Library_set_precompiled_header,sal,$(SRCDIR)/sal/inc/pch/precompiled_sal))
17 $(eval $(call gb_Library_set_include,sal,\
18 $$(INCLUDE) \
19 -I$(SRCDIR)/sal/inc \
22 $(eval $(call gb_Library_add_defs,sal,\
23 $(if $(filter $(ALLOC),SYS_ALLOC TCMALLOC JEMALLOC), \
24 -DFORCE_SYSALLOC \
25 ) \
26 $(if $(filter $(OS),IOS), \
27 -DNO_CHILD_PROCESSES \
28 ) \
29 $(LFS_CFLAGS) \
30 -DSAL_DLLIMPLEMENTATION \
31 -DRTL_OS="\"$(RTL_OS)"\" \
32 -DRTL_ARCH="\"$(RTL_ARCH)"\" \
33 -DSRCDIR="\"$(SRCDIR)\"" \
36 # need the "ure-link" symlink to exist in INSTDIR so it's possible to link sal
37 # FIXME: this creates cyclic dependency between ure and sal modules
38 $(eval $(call gb_Library_use_package,sal,ure_install))
40 $(eval $(call gb_Library_use_libraries,sal,\
41 $(if $(filter $(OS),ANDROID), \
42 lo-bootstrap \
43 ) \
44 $(gb_UWINAPI) \
47 $(eval $(call gb_Library_use_externals,sal,\
48 valgrind \
49 boost_headers \
52 $(eval $(call gb_Library_use_system_win32_libs,sal,\
53 advapi32 \
54 comdlg32 \
55 mpr \
56 ole32 \
57 shell32 \
58 user32 \
59 ws2_32 \
62 $(eval $(call gb_Library_add_libs,sal,\
63 $(if $(filter-out $(OS),WNT), \
64 $(if $(filter $(OS),ANDROID),, \
65 -lpthread \
66 ) \
67 ) \
68 $(if $(filter $(OS),LINUX), \
69 -ldl \
70 -lrt \
71 ) \
72 $(if $(filter $(OS),SOLARIS), \
73 -lnsl \
74 -lsocket \
75 ) \
78 ifeq ($(OS),MACOSX)
79 $(eval $(call gb_Library_use_system_darwin_frameworks,sal,\
80 Carbon \
81 CoreFoundation \
82 Foundation \
84 endif
86 $(eval $(call gb_Library_add_exception_objects,sal,\
87 sal/osl/all/compat \
88 sal/osl/all/debugbase \
89 sal/osl/all/loadmodulerelative \
90 sal/osl/all/log \
91 sal/osl/all/trace \
92 sal/osl/all/utility \
93 sal/rtl/alloc_arena \
94 sal/rtl/alloc_cache \
95 sal/rtl/alloc_fini \
96 sal/rtl/alloc_global \
97 sal/rtl/bootstrap \
98 sal/rtl/byteseq \
99 sal/rtl/cipher \
100 sal/rtl/cmdargs \
101 sal/rtl/crc \
102 sal/rtl/digest \
103 sal/rtl/hash \
104 sal/rtl/locale \
105 sal/rtl/logfile \
106 sal/rtl/math \
107 sal/rtl/random \
108 sal/rtl/rtl_process \
109 sal/rtl/strbuf \
110 sal/rtl/strimp \
111 sal/rtl/string \
112 sal/rtl/unload \
113 sal/rtl/uri \
114 sal/rtl/ustrbuf \
115 sal/rtl/ustring \
116 sal/rtl/uuid \
117 sal/textenc/converter \
118 sal/textenc/convertsimple \
119 sal/textenc/handleundefinedunicodetotextchar \
120 sal/textenc/tcvtutf8 \
121 sal/textenc/tencinfo \
122 sal/textenc/textcvt \
123 sal/textenc/textenc \
124 sal/textenc/unichars \
126 $(eval $(call gb_Library_add_cobjects,sal,\
127 sal/osl/all/filepath \
130 ifeq ($(OS),IOS)
131 $(eval $(call gb_Library_add_cxxflags,sal,\
132 $(gb_OBJCXXFLAGS) \
134 endif
136 ifeq ($(OS),ANDROID)
137 $(eval $(call gb_Library_add_exception_objects,sal,\
138 sal/textenc/context \
139 sal/textenc/convertbig5hkscs \
140 sal/textenc/converteuctw \
141 sal/textenc/convertgb18030 \
142 sal/textenc/convertisciidevangari \
143 sal/textenc/convertiso2022cn \
144 sal/textenc/convertiso2022jp \
145 sal/textenc/convertiso2022kr \
146 sal/textenc/convertsinglebytetobmpunicode \
147 sal/textenc/tables \
148 sal/textenc/tcvtbyte \
149 sal/textenc/tcvtmb \
150 sal/textenc/tcvtutf7 \
152 endif
154 ifneq ($(OS),WNT)
155 $(eval $(call gb_Library_add_exception_objects,sal,\
156 sal/osl/unx/conditn \
157 sal/osl/unx/diagnose \
158 sal/osl/unx/file \
159 sal/osl/unx/file_error_transl \
160 sal/osl/unx/file_misc \
161 sal/osl/unx/file_path_helper \
162 sal/osl/unx/file_stat \
163 sal/osl/unx/file_url \
164 sal/osl/unx/file_volume \
165 sal/osl/unx/module \
166 sal/osl/unx/process \
167 sal/osl/unx/process_impl \
168 $(if $(filter DESKTOP,$(BUILD_TYPE)), sal/osl/unx/salinit) \
170 $(eval $(call gb_Library_add_cobjects,sal,\
171 sal/osl/unx/mutex \
172 sal/osl/unx/nlsupport \
173 sal/osl/unx/pipe \
174 sal/osl/unx/profile \
175 sal/osl/unx/readwrite_helper \
176 sal/osl/unx/security \
177 sal/osl/unx/socket \
178 sal/osl/unx/system \
179 sal/osl/unx/tempfile \
180 sal/osl/unx/thread \
181 sal/osl/unx/time \
183 $(eval $(call gb_Library_add_cobject,sal,sal/osl/unx/signal, \
184 $(if $(filter $(ENABLE_CRASHDUMP),YES)$(filter $(ENABLE_DBGUTIL),TRUE), \
185 -DSAL_ENABLE_CRASH_REPORT) \
188 # Note that the uunxapi.mm file just includes the uunxapi.cxx one
189 ifeq ($(OS),MACOSX)
190 $(eval $(call gb_Library_add_objcxxobjects,sal,\
191 sal/osl/unx/uunxapi \
193 else
194 $(eval $(call gb_Library_add_exception_objects,sal,\
195 sal/osl/unx/uunxapi \
197 endif
199 ifneq ($(filter $(OS),MACOSX IOS),)
200 $(eval $(call gb_Library_add_exception_objects,sal,\
201 sal/osl/unx/osxlocale \
203 endif
204 ifneq ($(filter $(OS),SOLARIS FREEBSD NETBSD MACOSX AIX OPENBSD DRAGONFLY)$(filter $(OS)$(CPUNAME),LINUXSPARC),)
205 $(eval $(call gb_Library_add_cobjects,sal,\
206 sal/osl/unx/backtrace \
208 endif
209 ifneq ($(filter $(CPUNAME),SPARC64 SPARC),)
210 $(eval $(call gb_Library_add_asmobjects,sal,\
211 sal/osl/unx/asm/interlck_sparc \
213 else ifeq ($(OS)$(CPUNAME),SOLARISINTEL)
214 $(eval $(call gb_Library_add_asmobjects,sal,\
215 sal/osl/unx/asm/interlck_x86 \
217 else
218 $(eval $(call gb_Library_add_cobjects,sal,\
219 sal/osl/unx/interlck \
221 endif
223 else # $(OS) == WNT
225 # FIXME ?
226 # .IF "$(CCNUMVER)" >= "001400000000"
227 # $(eval $(call gb_Library_add_defs,sal,\
228 -D_CRT_NON_CONFORMING_SWPRINTFS \
230 # .ENDIF
232 $(eval $(call gb_Library_add_defs,sal,\
233 -D_WIN32_WINNT=0x0502 \
236 $(eval $(call gb_Library_add_exception_objects,sal,\
237 sal/osl/w32/file \
238 sal/osl/w32/file_dirvol \
239 sal/osl/w32/file_url \
240 sal/osl/w32/module \
241 sal/osl/w32/path_helper \
242 sal/osl/w32/process \
243 sal/osl/w32/procimpl \
244 sal/osl/w32/profile \
245 sal/osl/w32/salinit \
246 sal/osl/w32/signal \
247 sal/osl/w32/socket \
248 sal/osl/w32/tempfile \
250 $(eval $(call gb_Library_add_cobjects,sal,\
251 sal/osl/w32/conditn \
252 sal/osl/w32/diagnose \
253 sal/osl/w32/dllentry \
254 sal/osl/w32/file_error \
255 sal/osl/w32/interlck \
256 sal/osl/w32/mutex \
257 sal/osl/w32/nlsupport \
258 sal/osl/w32/pipe \
259 sal/osl/w32/security \
260 sal/osl/w32/thread \
261 sal/osl/w32/time \
264 endif # ifneq ($(OS),WNT)
266 # vim: set noet sw=4 ts=4: