lok: getSlideShowInfo: interactions: check that properties are available
[LibreOffice.git] / external / nss / ExternalProject_nss.mk
blobe129fba93d494d074df6f775e54434eff05ac340
1 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
3 # This file is part of the LibreOffice project.
5 # This Source Code Form is subject to the terms of the Mozilla Public
6 # License, v. 2.0. If a copy of the MPL was not distributed with this
7 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 $(eval $(call gb_ExternalProject_ExternalProject,nss))
12 # nss build calls configure for nspr itself - if for some reason the configure step should be split out,
13 # make sure to create config.status (aka run configure) in dir specified with OBJDIR_NAME (nspr/out)
14 $(eval $(call gb_ExternalProject_register_targets,nss,\
15 build \
18 $(eval $(call gb_ExternalProject_use_externals,nss,\
19 zlib \
22 ifeq ($(OS),WNT)
23 $(call gb_ExternalProject_get_state_target,nss,build): \
24 $(call gb_ExternalExecutable_get_dependencies,python) \
25 $(SRCDIR)/external/nss/nsinstall.py
26 $(call gb_Trace_StartRange,nss,EXTERNAL)
27 $(call gb_ExternalProject_run,build,\
28 $(if $(MSVC_USE_DEBUG_RUNTIME),USE_DEBUG_RTL=1,BUILD_OPT=1) \
29 $(if $(gb_Module_CURRENTMODULE_SYMBOLS_ENABLED), \
30 MOZ_DEBUG_SYMBOLS=1 \
31 MOZ_DEBUG_FLAGS=" " \
32 OPT_CODE_SIZE=0) \
33 OS_TARGET=WIN95 \
34 USE_SYSTEM_ZLIB=1 \
35 $(if $(filter X86_64,$(CPUNAME)),USE_64=1) \
36 $(if $(filter AARCH64,$(CPUNAME)),USE_64=1 CPU_ARCH=aarch64) \
37 LIB="$(ILIB)" \
38 XCFLAGS="$(SOLARINC) $(ZLIB_CFLAGS)" \
39 NSPR_CONFIGURE_OPTS="$(gb_CONFIGURE_PLATFORMS)" \
40 $(if $(CROSS_COMPILING),\
41 CROSS_COMPILE=1 \
42 $(if $(filter AARCH64,$(CPUNAME)),CPU_ARCH=aarch64)) \
43 $(MAKE) nss_build_all RC="rc.exe $(SOLARINC)" \
44 NSINSTALL='$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py' \
45 NSS_DISABLE_GTESTS=1 \
46 CCC="$(CXX)" \
47 ,nss)
48 $(call gb_Trace_EndRange,nss,EXTERNAL)
50 else # OS!=WNT
51 # make sure to specify NSPR_CONFIGURE_OPTS as env (before make command), so nss can append it's own defaults
52 # OTOH specify e.g. CC and NSINSTALL as arguments (after make command), so they will overrule nss makefile values
53 $(call gb_ExternalProject_get_state_target,nss,build): \
54 $(call gb_ExternalExecutable_get_dependencies,python) \
55 $(SRCDIR)/external/nss/nsinstall.py
56 $(call gb_Trace_StartRange,nss,EXTERNAL)
57 $(call gb_ExternalProject_run,build,\
58 $(if $(filter ANDROID FREEBSD LINUX MACOSX,$(OS)),$(if $(filter X86_64,$(CPUNAME)),USE_64=1)) \
59 $(if $(filter AARCH64,$(CPUNAME)),USE_64=1 CPU_ARCH=aarch64) \
60 $(if $(filter POWERPC64,$(CPUNAME)),USE_64=1 CPU_ARCH=ppc64le) \
61 $(if $(filter MACOSX,$(OS)),\
62 MACOS_SDK_DIR=$(MACOSX_SDK_PATH) \
63 NSS_USE_SYSTEM_SQLITE=1) \
64 $(if $(filter LINUX,$(OS)),$(if $(ENABLE_DBGUTIL),,BUILD_OPT=1)) \
65 $(if $(filter SOLARIS,$(OS)),NS_USE_GCC=1) \
66 $(if $(filter ARM,$(CPUNAME)),NSS_DISABLE_ARM32_NEON=1) \
67 NSPR_CONFIGURE_OPTS="$(gb_CONFIGURE_PLATFORMS)" \
68 $(if $(CROSS_COMPILING),CROSS_COMPILE=1) \
69 $(if $(filter MACOSX-X86_64-arm64,$(OS)-$(CPUNAME)-$(shell uname -m)), \
70 CPU_ARCH=x86_64) \
71 NSDISTMODE=copy \
72 $(MAKE) \
73 AR="$(AR)" \
74 RANLIB="$(RANLIB)" \
75 NMEDIT="$(NM)edit" \
76 COMMA=$(COMMA) \
77 CC="$(CC) $(gb_DEBUGINFO_FLAGS) \
78 $(if $(filter -fsanitize=undefined,$(CC)),-fno-sanitize=function) \
79 $(if $(filter iOS,$(OS)), -DNSS_STATIC_SOFTOKEN=1 -DNSS_STATIC_FREEBL=1 -DNSS_STATIC_PKCS11=1) \
80 $(if $(filter ANDROID,$(OS)), -D_PR_NO_LARGE_FILES=1 -DSQLITE_DISABLE_LFS=1)" \
81 CCC="$(CXX) $(gb_DEBUGINFO_FLAGS)" \
82 $(if $(CROSS_COMPILING),NSINSTALL="$(if $(filter MACOSX,$(OS_FOR_BUILD)),xcrun python3,$(call gb_ExternalExecutable_get_command,python)) $(SRCDIR)/external/nss/nsinstall.py") \
83 $(if $(filter ANDROID,$(OS)),OS_TARGET=Android OS_TARGET_RELEASE=$(ANDROID_API_LEVEL) ARCHFLAG="" DEFAULT_COMPILER=clang ANDROID_NDK=$(ANDROID_NDK_DIR) ANDROID_TOOLCHAIN_VERSION=$(ANDROID_GCC_TOOLCHAIN_VERSION) ANDROID_PREFIX=$(HOST_PLATFORM) ANDROID_SYSROOT=$(ANDROID_NDK_DIR)/sysroot) \
84 NSS_DISABLE_GTESTS=1 \
85 nss_build_all \
86 && rm -f $(gb_UnpackedTarball_workdir)/nss/dist/out/lib/*.a \
87 $(if $(filter MACOSX,$(OS)),\
88 && chmod u+w $(gb_UnpackedTarball_workdir)/nss/dist/out/lib/*.dylib \
89 && $(PERL) \
90 $(SRCDIR)/solenv/bin/macosx-change-install-names.pl shl OOO \
91 $(EXTERNAL_WORKDIR)/dist/out/lib/libfreebl3.dylib \
92 $(EXTERNAL_WORKDIR)/dist/out/lib/libnspr4.dylib \
93 $(EXTERNAL_WORKDIR)/dist/out/lib/libnss3.dylib \
94 $(EXTERNAL_WORKDIR)/dist/out/lib/libnssckbi.dylib \
95 $(EXTERNAL_WORKDIR)/dist/out/lib/libnssdbm3.dylib \
96 $(EXTERNAL_WORKDIR)/dist/out/lib/libnssutil3.dylib \
97 $(EXTERNAL_WORKDIR)/dist/out/lib/libplc4.dylib \
98 $(EXTERNAL_WORKDIR)/dist/out/lib/libplds4.dylib \
99 $(EXTERNAL_WORKDIR)/dist/out/lib/libsmime3.dylib \
100 $(EXTERNAL_WORKDIR)/dist/out/lib/libsoftokn3.dylib \
101 $(EXTERNAL_WORKDIR)/dist/out/lib/libssl3.dylib) \
102 ,nss)
103 $(call gb_Trace_EndRange,nss,EXTERNAL)
105 endif
107 # vim: set noet sw=4 ts=4: