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