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
)),LIB
="$(ILIB)") \
20 mozilla
/nsprpub
/configure
--includedir=$(call gb_UnpackedTarball_get_dir
,nss
)/mozilla
/dist/out
/include \
21 $(if
$(filter YES
,$(CROSS_COMPILING
)),--build
=$(BUILD_PLATFORM
) --host
=$(HOST_PLATFORM
)) \
22 $(if
$(filter MSCX
,$(COM
)$(CPU
)),--enable-64bit
) \
23 && sed
-e
's%@prefix@%$(OUTDIR)%' \
24 -e
's%@includedir@%$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/public/nss%' \
25 -e
's%@MOD_MAJOR_VERSION@%$(NSS_MAJOR)%' \
26 -e
's%@MOD_MINOR_VERSION@%$(NSS_MINOR)%' \
27 -e
's%@MOD_PATCH_VERSION@%$(NSS_PATCH)%' \
28 $(SRCDIR
)/nss
/nss-config.in
> $(EXTERNAL_WORKDIR
)/config
/nss-config \
29 && chmod a
+x
$(EXTERNAL_WORKDIR
)/config
/nss-config \
34 $(call gb_ExternalProject_get_state_target
,nss
,build
): $(call gb_ExternalProject_get_state_target
,nss
,configure
) $(call gb_ExternalExecutable_get_dependencies
,python
)
35 $(call gb_ExternalProject_run
,build
,\
36 $(if
$(MSVC_USE_DEBUG_RUNTIME
),USE_DEBUG_RTL
=1,BUILD_OPT
=1) \
37 MOZ_MSVCVERSION
=9 OS_TARGET
=WIN95 \
38 $(if
$(filter X
,$(CPU
)),USE_64
=1) \
40 XCFLAGS
="$(SOLARINC)" \
41 $(MAKE
) -j1 nss_build_all RC
="rc.exe $(SOLARINC)" \
42 NSINSTALL
='$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/nss/nsinstall.py' \
43 ,mozilla
/security
/nss
)
47 $(call gb_ExternalProject_get_state_target
,nss
,build
): $(call gb_ExternalProject_get_state_target
,nss
,configure
) $(call gb_ExternalExecutable_get_dependencies
,python
)
48 $(call gb_ExternalProject_run
,build
,\
49 $(MAKE
) -j1 nss_build_all \
51 CC
="$(CC) $(if $(filter YES,$(MINGW_SHARED_GCCLIB)),-shared-libgcc)" \
52 CXX
="$(CXX) $(if $(filter YES,$(MINGW_SHARED_GCCLIB)),-shared-libgcc)" \
53 OS_LIBS
="-ladvapi32 -lws2_32 -lmswsock -lwinmm $(if $(filter YES,$(MINGW_SHARED_GXXLIB)),$(MINGW_SHARED_LIBSTDCPP))" \
57 OS_TARGET
=WINNT RC
="$(WINDRES)" OS_RELEASE
="5.0" \
58 IMPORT_LIB_SUFFIX
=dll.a \
59 NSPR_CONFIGURE_OPTS
="--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --enable-shared --disable-static" \
60 NSINSTALL
="$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/nss/nsinstall.py" \
61 ,mozilla
/security
/nss
)
65 $(call gb_ExternalProject_get_state_target
,nss
,build
): $(call gb_ExternalProject_get_state_target
,nss
,configure
) $(call gb_ExternalExecutable_get_dependencies
,python
)
66 $(call gb_ExternalProject_run
,build
,\
67 $(if
$(filter FREEBSD LINUX MACOSX
,$(OS
)),$(if
$(filter X
,$(CPU
)),USE_64
=1)) \
68 $(if
$(filter MACOSX
,$(OS
)),MACOS_SDK_DIR
=$(MACOSX_SDK_PATH
) \
69 NSS_USE_SYSTEM_SQLITE
=1) \
70 $(if
$(filter SOLARIS
,$(OS
)),NS_USE_GCC
=1) \
71 $(if
$(filter YES
,$(CROSS_COMPILING
)),\
72 NSINSTALL
="$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/nss/nsinstall.py") \
74 $(MAKE
) -j1 nss_build_all \
75 $(if
$(filter MACOSX
,$(OS
)),&& $(PERL
) \
76 $(SOLARENV
)/bin
/macosx-change-install-names.pl shl OOO \
77 $(gb_Package_SOURCEDIR_nss
)/mozilla
/dist/out
/lib
/libfreebl3.dylib \
78 $(gb_Package_SOURCEDIR_nss
)/mozilla
/dist/out
/lib
/libnspr4.dylib \
79 $(gb_Package_SOURCEDIR_nss
)/mozilla
/dist/out
/lib
/libnss3.dylib \
80 $(gb_Package_SOURCEDIR_nss
)/mozilla
/dist/out
/lib
/libnssckbi.dylib \
81 $(gb_Package_SOURCEDIR_nss
)/mozilla
/dist/out
/lib
/libnssdbm3.dylib \
82 $(gb_Package_SOURCEDIR_nss
)/mozilla
/dist/out
/lib
/libnssutil3.dylib \
83 $(gb_Package_SOURCEDIR_nss
)/mozilla
/dist/out
/lib
/libplc4.dylib \
84 $(gb_Package_SOURCEDIR_nss
)/mozilla
/dist/out
/lib
/libplds4.dylib \
85 $(gb_Package_SOURCEDIR_nss
)/mozilla
/dist/out
/lib
/libsmime3.dylib \
86 $(gb_Package_SOURCEDIR_nss
)/mozilla
/dist/out
/lib
/libsoftokn3.dylib \
87 $(gb_Package_SOURCEDIR_nss
)/mozilla
/dist/out
/lib
/libssl3.dylib
) \
88 ,mozilla
/security
/nss
)
92 # vim: set noet sw=4 ts=4: