2013-01-01 08:39:36 -06:00
|
|
|
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
|
|
|
|
#
|
|
|
|
# This file is part of the LibreOffice project.
|
|
|
|
#
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
#
|
|
|
|
|
|
|
|
$(eval $(call gb_ExternalProject_ExternalProject,nss))
|
|
|
|
|
|
|
|
$(eval $(call gb_ExternalProject_use_unpacked,nss,nss))
|
|
|
|
|
2013-03-01 11:27:45 -06:00
|
|
|
$(eval $(call gb_ExternalProject_use_package,nss,soltools_inc))
|
|
|
|
|
|
|
|
|
2013-01-01 08:39:36 -06:00
|
|
|
$(eval $(call gb_ExternalProject_register_targets,nss,\
|
|
|
|
configure \
|
|
|
|
build \
|
|
|
|
))
|
|
|
|
|
|
|
|
$(call gb_ExternalProject_get_state_target,nss,configure):
|
2013-02-21 08:15:39 -06:00
|
|
|
$(call gb_ExternalProject_run,configure,\
|
|
|
|
$(if $(filter MSC,$(COM)),LIB="$(ILIB)") \
|
2013-01-01 08:39:36 -06:00
|
|
|
mozilla/nsprpub/configure --includedir=$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/out/include \
|
2013-02-21 08:15:39 -06:00
|
|
|
$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
|
|
|
|
$(if $(filter MSCX,$(COM)$(CPU)),--enable-64bit) \
|
|
|
|
$(if $(filter MACOSX,$(OS)),--prefix=/@.__________________________________________________OOO) \
|
2013-01-01 08:39:36 -06:00
|
|
|
&& sed -e 's%@prefix@%$(OUTDIR)%' \
|
2013-02-21 08:15:39 -06:00
|
|
|
-e 's%@includedir@%$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/public/nss%' \
|
|
|
|
-e 's%@MOD_MAJOR_VERSION@%$(NSS_MAJOR)%' \
|
|
|
|
-e 's%@MOD_MINOR_VERSION@%$(NSS_MINOR)%' \
|
|
|
|
-e 's%@MOD_PATCH_VERSION@%$(NSS_PATCH)%' \
|
|
|
|
$(SRCDIR)/nss/nss-config.in > $(EXTERNAL_WORKDIR)/config/nss-config \
|
2013-01-01 08:39:36 -06:00
|
|
|
&& chmod a+x $(EXTERNAL_WORKDIR)/config/nss-config \
|
2013-02-21 08:15:39 -06:00
|
|
|
,,nss_configure.log)
|
2013-01-01 08:39:36 -06:00
|
|
|
|
|
|
|
ifeq ($(OS),WNT)
|
|
|
|
ifeq ($(COM),MSC)
|
2013-01-02 17:10:13 -06:00
|
|
|
$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalProject_get_state_target,nss,configure) $(call gb_ExternalExecutable_get_dependencies,python)
|
2013-02-21 08:15:39 -06:00
|
|
|
$(call gb_ExternalProject_run,build,\
|
|
|
|
$(if $(debug),,BUILD_OPT=1) \
|
|
|
|
MOZ_MSVCVERSION=9 OS_TARGET=WIN95 \
|
|
|
|
$(if $(filter X,$(CPU)),USE_64=1) \
|
|
|
|
LIB="$(ILIB)" \
|
|
|
|
XCFLAGS="$(SOLARINC)" \
|
|
|
|
$(MAKE) -j1 nss_build_all RC="rc.exe $(SOLARINC)" \
|
|
|
|
NSINSTALL='$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/nss/nsinstall.py' \
|
|
|
|
,mozilla/security/nss)
|
2013-01-01 08:39:36 -06:00
|
|
|
|
|
|
|
|
|
|
|
else
|
2013-03-05 15:03:38 -06:00
|
|
|
$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalProject_get_state_target,nss,configure) $(call gb_ExternalExecutable_get_dependencies,python)
|
2013-02-21 08:15:39 -06:00
|
|
|
$(call gb_ExternalProject_run,build,\
|
|
|
|
CC="$(CC) $(if $(filter YES,$(MINGW_SHARED_GCCLIB)),-shared-libgcc)" \
|
|
|
|
CXX="$(CXX) $(if $(filter YES,$(MINGW_SHARED_GCCLIB)),-shared-libgcc)" \
|
|
|
|
OS_LIBS="-ladvapi32 -lws2_32 -lmwsock -lwinm $(if $(filter YES,$(MINGW_SHARED_GXXLIB)),$(MINGW_SHARED_LIBSTDCPP))" \
|
|
|
|
OS_TARGET=WINNT RC="$(WINDRES)" OS_RELEASE="5.0" \
|
|
|
|
IMPORT_LIB_SUFFIX=dll.a \
|
|
|
|
NSPR_CONFIGURE_OPTS="--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM) --enable-shared --disable-static" \
|
2013-03-05 15:03:38 -06:00
|
|
|
NSINSTALL="$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/nss/nsinstall.py" \
|
2013-02-21 08:15:39 -06:00
|
|
|
$(MAKE) -j1 nss_build_all \
|
|
|
|
,mozilla/security/nss)
|
2013-01-01 08:39:36 -06:00
|
|
|
|
|
|
|
endif
|
|
|
|
else # OS!=WNT
|
2013-03-05 15:03:38 -06:00
|
|
|
$(call gb_ExternalProject_get_state_target,nss,build): $(call gb_ExternalProject_get_state_target,nss,configure) $(call gb_ExternalExecutable_get_dependencies,python)
|
2013-02-21 08:15:39 -06:00
|
|
|
$(call gb_ExternalProject_run,build,\
|
|
|
|
$(if $(filter FREEBSD LINUX MACOSX,$(OS)),$(if $(filter X,$(CPU)),USE_64=1)) \
|
|
|
|
$(if $(filter MACOSX,$(OS)),MACOS_SDK_DIR=$(MACOSX_SDK_PATH) \
|
|
|
|
$(if $(filter 1060 1070 1080,$(MAC_OS_X_VERSION_MIN_REQUIRED)),NSS_USE_SYSTEM_SQLITE=1)) \
|
|
|
|
$(if $(filter SOLARIS,$(OS)),NS_USE_GCC=1) \
|
|
|
|
$(if $(filter YES,$(CROSS_COMPILING)),\
|
|
|
|
$(if $(filter MACOSXP,$(OS)$(CPU)),CPU_ARCH=ppc) \
|
2013-03-05 15:03:38 -06:00
|
|
|
NSINSTALL="$(call gb_ExternalExecutable_get_command,python) $(SRCDIR)/nss/nsinstall.py") \
|
2013-02-21 08:15:39 -06:00
|
|
|
NSDISTMODE=copy \
|
|
|
|
$(MAKE) -j1 nss_build_all \
|
|
|
|
,mozilla/security/nss)
|
2013-01-01 08:39:36 -06:00
|
|
|
|
|
|
|
endif
|
|
|
|
|
|
|
|
# vim: set noet sw=4 ts=4:
|