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 $(eval
$(call gb_ExternalProject_register_targets
,nss
,\
17 $(call gb_ExternalProject_get_state_target
,nss
,configure
):
18 $(call gb_ExternalProject_run
,configure
,\
19 $(if
$(filter MSC
,$(COM
)),INCLUDE
="$(COMPATH)/include" LIB
="$(ILIB)") \
20 $(if
$(CROSS_COMPILING
),\
21 NSINSTALL
="$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py") \
22 nspr
/configure
--includedir=$(call gb_UnpackedTarball_get_dir
,nss
)/mozilla
/dist/out
/include \
23 $(if
$(CROSS_COMPILING
),--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)) \
24 $(if
$(filter MSC-X86_64
,$(COM
)-$(CPUNAME
)),--enable-64bit
) \
29 $(call gb_ExternalProject_get_state_target
,nss
,build
): $(call gb_ExternalProject_get_state_target
,nss
,configure
) $(call gb_ExternalExecutable_get_dependencies
,python
)
30 $(call gb_ExternalProject_run
,build
,\
31 $(if
$(MSVC_USE_DEBUG_RUNTIME
),USE_DEBUG_RTL
=1,BUILD_OPT
=1) \
32 MOZ_MSVCVERSION
=9 OS_TARGET
=WIN95 \
33 $(if
$(filter X86_64
,$(CPUNAME
)),USE_64
=1) \
35 XCFLAGS
="-arch:SSE $(SOLARINC)" \
36 $(MAKE
) -j1 nss_build_all RC
="rc.exe $(SOLARINC)" \
37 NSINSTALL
='$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py' \
42 $(call gb_ExternalProject_get_state_target
,nss
,build
): $(call gb_ExternalProject_get_state_target
,nss
,configure
) $(call gb_ExternalExecutable_get_dependencies
,python
)
43 $(call gb_ExternalProject_run
,build
,\
44 $(MAKE
) -j1 nss_build_all \
46 CC
="$(CC) $(if $(MINGW_SHARED_GCCLIB),-shared-libgcc)" \
47 CXX
="$(CXX) $(if $(MINGW_SHARED_GCCLIB),-shared-libgcc)" \
48 OS_LIBS
="-ladvapi32 -lws2_32 -lmswsock -lwinmm $(if $(MINGW_SHARED_GXXLIB),$(MINGW_SHARED_LIBSTDCPP))" \
52 OS_TARGET
=WINNT RC
="$(WINDRES)" OS_RELEASE
="5.0" \
53 IMPORT_LIB_SUFFIX
=dll.a \
54 NSPR_CONFIGURE_OPTS
="--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --enable-shared --disable-static" \
55 NSINSTALL
="$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py" \
56 && rm -f
$(call gb_UnpackedTarball_get_dir
,nss
)/mozilla
/dist/out
/lib
/*.a \
61 $(call gb_ExternalProject_get_state_target
,nss
,build
): $(call gb_ExternalProject_get_state_target
,nss
,configure
) $(call gb_ExternalExecutable_get_dependencies
,python
)
62 $(call gb_ExternalProject_run
,build
,\
63 $(if
$(filter FREEBSD LINUX MACOSX
,$(OS
)),$(if
$(filter X86_64
,$(CPUNAME
)),USE_64
=1)) \
64 $(if
$(filter IOS
,$(OS
)),\
65 $(if
$(filter arm64
,$(CC
)),USE_64
=1)) \
66 $(if
$(filter MACOSX
,$(OS
)),\
67 $(if
$(filter-out POWERPC
,$(CPUNAME
)),MACOS_SDK_DIR
=$(MACOSX_SDK_PATH
)) \
68 NSS_USE_SYSTEM_SQLITE
=1) \
69 $(if
$(filter SOLARIS
,$(OS
)),NS_USE_GCC
=1) \
70 $(if
$(CROSS_COMPILING
),\
71 $(if
$(filter MACOSXPOWERPC
,$(OS
)$(CPUNAME
)),CPU_ARCH
=ppc
) \
72 $(if
$(filter IOS-ARM
,$(OS
)-$(CPUNAME
)),CPU_ARCH
=arm
) \
73 NSINSTALL
="$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/external/nss/nsinstall.py") \
75 $(MAKE
) -j1 AR
="$(AR)" \
78 $(if
$(CROSS_COMPILING
),NSPR_CONFIGURE_OPTS
="--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)") \
80 && rm -f
$(call gb_UnpackedTarball_get_dir
,nss
)/dist/out
/lib
/*.a \
81 $(if
$(filter MACOSX
,$(OS
)),\
82 && chmod u
+w
$(call gb_UnpackedTarball_get_dir
,nss
)/dist/out
/lib
/*.dylib \
84 $(SRCDIR
)/solenv
/bin
/macosx-change-install-names.pl shl OOO \
85 $(gb_Package_SOURCEDIR_nss
)/dist/out
/lib
/libfreebl3.dylib \
86 $(gb_Package_SOURCEDIR_nss
)/dist/out
/lib
/libnspr4.dylib \
87 $(gb_Package_SOURCEDIR_nss
)/dist/out
/lib
/libnss3.dylib \
88 $(gb_Package_SOURCEDIR_nss
)/dist/out
/lib
/libnssckbi.dylib \
89 $(gb_Package_SOURCEDIR_nss
)/dist/out
/lib
/libnssdbm3.dylib \
90 $(gb_Package_SOURCEDIR_nss
)/dist/out
/lib
/libnsspem.dylib \
91 $(gb_Package_SOURCEDIR_nss
)/dist/out
/lib
/libnssutil3.dylib \
92 $(gb_Package_SOURCEDIR_nss
)/dist/out
/lib
/libplc4.dylib \
93 $(gb_Package_SOURCEDIR_nss
)/dist/out
/lib
/libplds4.dylib \
94 $(gb_Package_SOURCEDIR_nss
)/dist/out
/lib
/libsmime3.dylib \
95 $(gb_Package_SOURCEDIR_nss
)/dist/out
/lib
/libsoftokn3.dylib \
96 $(gb_Package_SOURCEDIR_nss
)/dist/out
/lib
/libssl3.dylib
) \
101 # vim: set noet sw=4 ts=4: