speedo: Add new option STATIC=1

--

This can be used to build GnuPG with static versions of the core
gnupg libraries.  For example:

 make -f build-aux/speedo.mk STATIC=1 SELFCHECK=0 \
     INSTALL_PREFIX=/somewhere/gnupg22  native

The SELFCHECK=0 is only needed to build from a non-released version.
You don't need it with a released tarball.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2018-02-19 10:51:27 +01:00
parent 5e3679ae39
commit 7b928c2564
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 24 additions and 1 deletions

View File

@ -63,6 +63,7 @@ help:
@echo 'You may append INSTALL_PREFIX=<dir> for native builds.'
@echo 'Prepend TARGET with "git-" to build from GIT repos.'
@echo 'Prepend TARGET with "this-" to build from the source tarball.'
@echo 'Use STATIC=1 to build with statically linked libraries.'
@echo 'Use SELFCHECK=0 for a non-released version.'
@echo 'Use CUSTOM_SWDB=1 for an already downloaded swdb.lst.'
@ -140,6 +141,9 @@ UPD_SWDB=0
# Set to 0 to skip the GnuPG version self-check
SELFCHECK=1
# Set to 1 to build with statically linked libraries.
STATIC=0
# Set to the location of the directory with tarballs of
# external packages.
TARBALLS=$(shell pwd)/../tarballs
@ -208,8 +212,10 @@ speedo_spkgs += \
endif
endif
ifeq ($(STATIC),0)
speedo_spkgs += \
gpgme
endif
ifeq ($(TARGETOS),w32)
ifeq ($(WITH_GUI),1)
@ -461,6 +467,8 @@ speedo_pkg_gtk__tar = $(pkg2rep)/gtk+-$(gtk__ver).tar.xz
# Package build options
#
speedo_pkg_npth_configure = --enable-static
speedo_pkg_libgpg_error_configure = --enable-static
speedo_pkg_w64_libgpg_error_configure = --enable-static
@ -471,8 +479,23 @@ speedo_pkg_libgcrypt_configure = --disable-static
speedo_pkg_libksba_configure = --disable-static
speedo_pkg_ntbtls_configure = --enable-static
ifeq ($(STATIC),1)
speedo_pkg_npth_configure += --disable-shared
speedo_pkg_libgpg_error_configure += --disable-shared
speedo_pkg_libassuan_configure += --disable-shared
speedo_pkg_libgcrypt_configure += --disable-shared
speedo_pkg_libksba_configure += --disable-shared
endif
# For now we build ntbtls only static
speedo_pkg_ntbtls_configure = --enable-static --disable-shared
speedo_pkg_ntbtls_configure = --disable-shared
ifeq ($(TARGETOS),w32)
speedo_pkg_gnupg_configure = \