Makefile revision 3477
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra#
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# CDDL HEADER START
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra#
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# The contents of this file are subject to the terms of the
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# Common Development and Distribution License (the "License").
84765788c559bfdead67172a79759ac60c77231bTilo Mitra# You may not use this file except in compliance with the License.
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra#
8f0dc35284b10842ef7c44ffc3d410227804fcedTilo Mitra# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# or http://www.opensolaris.org/os/licensing.
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# See the License for the specific language governing permissions
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# and limitations under the License.
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra#
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# When distributing Covered Code, include this CDDL HEADER in each
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# If applicable, add the following below this CDDL HEADER, with the
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# fields enclosed by brackets "[]" replaced with your own identifying
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# information: Portions Copyright [yyyy] [name of copyright owner]
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra#
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# CDDL HEADER END
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra#
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra#
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitrainclude ../../make-rules/shared-macros.mk
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra
8f0dc35284b10842ef7c44ffc3d410227804fcedTilo MitraCOMPONENT_NAME= gnupg
84765788c559bfdead67172a79759ac60c77231bTilo MitraCOMPONENT_VERSION= 2.0.22
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo MitraCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo MitraCOMPONENT_PROJECT_URL= http://www.gnupg.org/
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo MitraCOMPONENT_ARCHIVE_HASH= \
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra sha256:437d0ab259854359fc48aa8795af80cff4975e559c111c92c03d0bc91408e251
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCOMPONENT_ARCHIVE_URL= ftp://ftp.gnupg.org/gcrypt/gnupg/$(COMPONENT_ARCHIVE)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCOMPONENT_BUGDB= utility/gnupg
84765788c559bfdead67172a79759ac60c77231bTilo Mitra
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraTPNO= 17706
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitrainclude ../../make-rules/prep.mk
84765788c559bfdead67172a79759ac60c77231bTilo Mitrainclude ../../make-rules/configure.mk
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitrainclude ../../make-rules/ips.mk
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# Enable C99 mode + -Xc for its additional warnings.
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitrastudio_C99MODE = -Xc $(studio_C99_ENABLE)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra# -xinline=%auto -- we like inlining where appropriate
8f0dc35284b10842ef7c44ffc3d410227804fcedTilo MitraCFLAGS += -xinline=%auto
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# -xbuiltin=%none -- builtins have been known to be buggy
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo MitraCFLAGS += -xbuiltin=%none
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo MitraCFLAGS += $(CPP_LARGEFILES)
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo MitraCFLAGS += $(XPG6MODE)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCFLAGS += $(CPP_POSIX)
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo MitraCFLAGS += $(CPP_C99_EXTENDED_MATH)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCFLAGS += $(studio_PIC)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# If we pass -lc, -mt won't link with -lthread
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# (which is what it does by default, and we don't
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# want that, because we use POSIX threads).
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo MitraLDFLAGS += -lc -z defs
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraLD_OPTIONS += -z defs
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_ENV += CFLAGS="$(CFLAGS)"
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_ENV += INSTALL="$(INSTALL)"
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_OPTIONS += --localstatedir=/var
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_OPTIONS += --libexecdir=$(USRBINDIR)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_OPTIONS += --datadir=$(CONFIGURE_PREFIX)/share
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_OPTIONS += --sysconfdir=/etc
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_OPTIONS += --enable-nls
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_OPTIONS += --enable-largefile
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_OPTIONS += --disable-selinux-support
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_OPTIONS += --with-pinentry-pgm=$(CONFIGURE_PREFIX)/lib/pinentry
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo MitraCONFIGURE_OPTIONS += --with-gpg-error-prefix=$(CONFIGURE_PREFIX)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_OPTIONS += --with-libassuan-prefix=$(CONFIGURE_PREFIX)
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo MitraCONFIGURE_OPTIONS += --with-ksba-prefix=$(CONFIGURE_PREFIX)
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo MitraCONFIGURE_OPTIONS += --with-pth-prefix=$(CONFIGURE_PREFIX)
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo MitraCONFIGURE_OPTIONS += --with-libcurl=$(CONFIGURE_PREFIX)
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo MitraCONFIGURE_OPTIONS += --with-libiconv-prefix=$(CONFIGURE_PREFIX)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_OPTIONS += --with-libintl-prefix=$(CONFIGURE_PREFIX)
ff8b03787b79f0f9ab8c1a7fac736c5e47d02648Tilo MitraCONFIGURE_OPTIONS += --with-zlib=$(CONFIGURE_PREFIX)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_OPTIONS += --with-bzip2=$(CONFIGURE_PREFIX)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_OPTIONS += --with-readline=$(CONFIGURE_PREFIX)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_BINDIR.64 = $(CONFIGURE_PREFIX)/bin
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraCONFIGURE_SBINDIR.64 = $(CONFIGURE_PREFIX)/sbin
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraLIBKSBA_MANIFEST = manifest-$(MACH)-libksba.depend
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraLIBASSUAN_MANIFEST = manifest-$(MACH)-libassuan.depend
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraGPGME_MANIFEST = manifest-$(MACH)-gpgme.depend
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraPINENTRY_MANIFEST = manifest-$(MACH)-pinentry.depend
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# Work around pkgdepend bug which doesn't resolve dependencies from
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra# the local workspace repo. Fortunately we only have to do this once.
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraDEPENDED += $(WS_TOP)/components/libksba/build/$(LIBKSBA_MANIFEST)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraDEPENDED += $(WS_TOP)/components/libassuan/build/$(LIBASSUAN_MANIFEST)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraDEPENDED += $(WS_TOP)/components/gpgme/build/$(GPGME_MANIFEST)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraDEPENDED += $(WS_TOP)/components/pinentry/build/$(PINENTRY_MANIFEST)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraPKG_PROTO_DIRS += $(WS_TOP)/components/libksba
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraPKG_PROTO_DIRS += $(WS_TOP)/components/libassuan
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraPKG_PROTO_DIRS += $(WS_TOP)/components/gpgme
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraPKG_PROTO_DIRS += $(WS_TOP)/components/pinentry
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraMAN8LIST = addgnupghome applygnupgdefaults
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo MitraASLR_MODE = $(ASLR_ENABLE)
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitraconfigure: $(CONFIGURE_64)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitrabuild: $(BUILD_64)
8f0dc35284b10842ef7c44ffc3d410227804fcedTilo Mitra
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitrainstall: $(INSTALL_64)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra ( cd $(PROTOUSRSHARELOCALEDIR) ; \
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra $(CP) -R 'en@boldquot' en )
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra ( cd $(PROTOUSRSHAREMANDIR) ; \
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra if test -d man8 ; then \
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra $(MV) man8 man1m ; fi )
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra ( cd $(PROTOUSRSHAREMANDIR)/man1m ; \
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitra list1='$(MAN8LIST)' ; for f in $$list1; do \
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra if test -f $$f.8 ; then \
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra $(MV) $$f.8 $$f.1m ; fi ; \
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra done )
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitratest: $(TEST_64)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra
a31d4503481b752a9ea058cce3d9b025d040a87cTilo MitraBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra
1b94590fd02ca19669dfb4b5deb563a290459d81Tilo Mitrainclude ../../make-rules/depend.mk
a31d4503481b752a9ea058cce3d9b025d040a87cTilo Mitra