add fetch to dependencies of gbuildtojson / Rdb target
[LibreOffice.git] / sal / Library_sal.mk
blobe0bf325e38cd5439f2eb0d1aa8e0e552a49ea614
1 # -*- Mode: makefile-gmake; 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,sal/inc/pch/precompiled_sal))
17 $(eval $(call gb_Library_set_is_ure_library_or_dependency,sal))
19 $(eval $(call gb_Library_set_include,sal,\
20 $$(INCLUDE) \
21 -I$(SRCDIR)/sal/inc \
22 $(BACKTRACE_CFLAGS) \
25 $(eval $(call gb_Library_add_defs,sal,\
26 $(if $(filter FUZZERS,$(BUILD_TYPE)), \
27 -DFORCE_DEFAULT_SIGNAL \
28 ) \
29 $(if $(filter iOS,$(OS)), \
30 -DNO_CHILD_PROCESSES \
31 ) \
32 -DSAL_DLLIMPLEMENTATION \
33 -DRTL_OS="\"$(RTL_OS)\"" \
34 -DRTL_ARCH="\"$(RTL_ARCH)\"" \
35 -DSRCDIR="\"$(SRCDIR)\"" \
36 $(call gb_CondLibSalTextenc,-DCOND_LIB_SAL_TEXTENC) \
39 $(eval $(call gb_Library_use_libraries,sal,\
40 $(if $(filter ANDROID EMSCRIPTEN,$(OS)), \
41 lo-bootstrap \
42 ) \
45 $(eval $(call gb_Library_use_externals,sal,\
46 dragonbox \
47 dtoa \
48 valgrind \
49 zlib \
52 $(eval $(call gb_Library_use_system_win32_libs,sal,\
53 advapi32 \
54 comdlg32 \
55 dbghelp \
56 mpr \
57 ole32 \
58 shell32 \
59 user32 \
60 userenv \
61 wer \
62 ws2_32 \
65 $(eval $(call gb_Library_add_libs,sal,\
66 $(if $(filter LINUX,$(OS)), \
67 -ldl \
68 -lrt \
69 ) \
70 $(if $(filter SOLARIS,$(OS)), \
71 -lnsl \
72 -lsocket \
73 ) \
74 $(if $(filter HAIKU,$(OS)), \
75 -lnetwork \
76 ) \
77 $(BACKTRACE_LIBS) \
80 ifeq ($(OS),MACOSX)
81 $(eval $(call gb_Library_use_system_darwin_frameworks,sal,\
82 Carbon \
83 CoreFoundation \
84 Foundation \
85 $(if $(ENABLE_MACOSX_SANDBOX),Security) \
87 endif
89 $(eval $(call gb_Library_add_exception_objects,sal,\
90 sal/osl/all/compat \
91 sal/osl/all/debugbase \
92 sal/osl/all/filepath \
93 sal/osl/all/loadmodulerelative \
94 sal/osl/all/log \
95 sal/osl/all/mutexshared \
96 sal/osl/all/signalshared \
97 sal/osl/all/threadshared \
98 sal/osl/all/utility \
99 sal/rtl/alloc_arena \
100 sal/rtl/alloc_cache \
101 sal/rtl/alloc_fini \
102 sal/rtl/alloc_global \
103 sal/rtl/bootstrap \
104 sal/rtl/byteseq \
105 sal/rtl/cipher \
106 sal/rtl/cmdargs \
107 sal/rtl/crc \
108 sal/rtl/digest \
109 sal/rtl/hash \
110 sal/rtl/locale \
111 sal/rtl/math \
112 sal/rtl/random \
113 sal/rtl/rtl_process \
114 sal/rtl/strbuf \
115 sal/rtl/strimp \
116 sal/rtl/string \
117 sal/rtl/unload \
118 sal/rtl/uri \
119 sal/rtl/ustrbuf \
120 sal/rtl/ustring \
121 sal/rtl/uuid \
122 sal/textenc/converter \
123 sal/textenc/convertsimple \
124 sal/textenc/handleundefinedunicodetotextchar \
125 sal/textenc/tcvtutf8 \
126 sal/textenc/tencinfo \
127 sal/textenc/textcvt \
128 sal/textenc/textenc \
129 sal/textenc/unichars \
132 ifeq ($(OS),iOS)
133 $(eval $(call gb_Library_add_cxxflags,sal,\
134 $(gb_OBJCXXFLAGS) \
136 endif
138 ifeq (,$(call gb_CondLibSalTextenc,$(true)))
139 $(eval $(call gb_Library_add_exception_objects,sal,\
140 sal/textenc/context \
141 sal/textenc/convertbig5hkscs \
142 sal/textenc/converteuctw \
143 sal/textenc/convertgb18030 \
144 sal/textenc/convertisciidevangari \
145 sal/textenc/convertiso2022cn \
146 sal/textenc/convertiso2022jp \
147 sal/textenc/convertiso2022kr \
148 sal/textenc/convertsinglebytetobmpunicode \
149 sal/textenc/tables \
150 sal/textenc/tcvtbyte \
151 sal/textenc/tcvtmb \
152 sal/textenc/tcvtutf7 \
154 endif
156 ifneq ($(OS),WNT)
157 $(eval $(call gb_Library_add_exception_objects,sal,\
158 sal/osl/unx/backtraceapi \
159 sal/osl/unx/conditn \
160 sal/osl/unx/file \
161 sal/osl/unx/file_error_transl \
162 sal/osl/unx/file_misc \
163 sal/osl/unx/file_path_helper \
164 sal/osl/unx/file_stat \
165 sal/osl/unx/file_url \
166 sal/osl/unx/file_volume \
167 sal/osl/unx/memory \
168 sal/osl/unx/module \
169 sal/osl/unx/mutex \
170 sal/osl/unx/nlsupport \
171 sal/osl/unx/pipe \
172 sal/osl/unx/process \
173 sal/osl/unx/process_impl \
174 sal/osl/unx/profile \
175 sal/osl/unx/random \
176 sal/osl/unx/readwrite_helper \
177 sal/osl/unx/salinit \
178 sal/osl/unx/security \
179 sal/osl/unx/signal \
180 sal/osl/unx/socket \
181 sal/osl/unx/soffice \
182 sal/osl/unx/tempfile \
183 sal/osl/unx/thread \
184 sal/osl/unx/time \
187 # Note that the uunxapi.mm file just includes the uunxapi.cxx one. Ditto for system.mm
188 ifeq ($(OS),MACOSX)
189 $(eval $(call gb_Library_add_objcxxobjects,sal,\
190 sal/osl/unx/uunxapi \
191 sal/osl/unx/system \
193 else
194 $(eval $(call gb_Library_add_exception_objects,sal,\
195 sal/osl/unx/uunxapi \
196 sal/osl/unx/system \
198 endif
200 ifneq ($(filter MACOSX iOS,$(OS)),)
201 $(eval $(call gb_Library_add_exception_objects,sal,\
202 sal/osl/unx/osxlocale \
204 endif
205 ifneq ($(OS),WNT)
206 $(eval $(call gb_Library_add_cobjects,sal,\
207 sal/osl/unx/backtrace \
209 endif
210 ifneq ($(filter SPARC64 SPARC,$(CPUNAME)),)
211 $(eval $(call gb_Library_add_asmobjects,sal,\
212 sal/osl/unx/asm/interlck_sparc \
214 else
215 $(eval $(call gb_Library_add_exception_objects,sal,\
216 sal/osl/unx/interlck \
218 endif
220 else # $(OS) == WNT
222 $(eval $(call gb_Library_add_exception_objects,sal,\
223 sal/osl/w32/backtrace \
224 sal/osl/w32/conditn \
225 sal/osl/w32/dllentry \
226 sal/osl/w32/file \
227 sal/osl/w32/file_dirvol \
228 sal/osl/w32/file_error \
229 sal/osl/w32/file_url \
230 sal/osl/w32/interlck \
231 sal/osl/w32/memory \
232 sal/osl/w32/module \
233 sal/osl/w32/mutex \
234 sal/osl/w32/nlsupport \
235 sal/osl/w32/path_helper \
236 sal/osl/w32/pipe \
237 sal/osl/w32/process \
238 sal/osl/w32/procimpl \
239 sal/osl/w32/profile \
240 sal/osl/w32/random \
241 sal/osl/w32/salinit \
242 sal/osl/w32/security \
243 sal/osl/w32/signal \
244 sal/osl/w32/socket \
245 sal/osl/w32/tempfile \
246 sal/osl/w32/thread \
247 sal/osl/w32/time \
250 endif # ifneq ($(OS),WNT)
252 ifeq ($(ENABLE_CIPHER_OPENSSL_BACKEND),TRUE)
253 $(eval $(call gb_Library_add_defs,sal,-DLIBO_CIPHER_OPENSSL_BACKEND))
254 $(eval $(call gb_Library_use_externals,sal, \
255 openssl \
256 openssl_headers \
258 endif
260 # vim: set noet sw=4 ts=4: