Makefile revision 6935
44N/A#
44N/A# CDDL HEADER START
44N/A#
44N/A# The contents of this file are subject to the terms of the
44N/A# Common Development and Distribution License (the "License").
44N/A# You may not use this file except in compliance with the License.
44N/A#
44N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
44N/A# or http://www.opensolaris.org/os/licensing.
44N/A# See the License for the specific language governing permissions
44N/A# and limitations under the License.
44N/A#
44N/A# When distributing Covered Code, include this CDDL HEADER in each
44N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
44N/A# If applicable, add the following below this CDDL HEADER, with the
44N/A# fields enclosed by brackets "[]" replaced with your own identifying
44N/A# information: Portions Copyright [yyyy] [name of copyright owner]
44N/A#
44N/A# CDDL HEADER END
44N/A#
75N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
75N/A#
844N/Ainclude ../../make-rules/shared-macros.mk
44N/A
75N/ACOMPONENT_NAME= pam_pkcs11
44N/ACOMPONENT_VERSION= 0.6.8
44N/ACOMPONENT_PROJECT_URL= https://sourceforge.net/projects/opensc/
44N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
491N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
44N/ACOMPONENT_ARCHIVE_HASH= \
618N/A sha256:9d942e542ef35d0e1f990d9ff5bf9df0af84c828ed081add2eb1b4d84f0efbda
491N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)files/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
844N/ACOMPONENT_BUGDB= library/pam-pkcs11
844N/A
44N/ATPNO= 28155
1273N/A
44N/Ainclude $(WS_MAKE_RULES)/prep.mk
44N/Ainclude $(WS_MAKE_RULES)/configure.mk
44N/Ainclude $(WS_MAKE_RULES)/ips.mk
44N/A
44N/A# Force regeneration of ancient autoconf scripts to fix 64-bit build detection
515N/A# and due to patches to autoconf and automake files.
515N/ACOMPONENT_PREP_ACTION += (cd $(@D); autoreconf -fiv)
515N/A
44N/A# Enable ASLR for this component
44N/AASLR_MODE = $(ASLR_ENABLE)
44N/A
58N/A# We build two different variants of pam_pkcs11 for our users.
44N/AVARIANT_OPENLDAP = $(BUILD_DIR)/openldap
61N/AVARIANT_MOZILLALDAP = $(BUILD_DIR)/mozillaldap
44N/A
44N/AVARIANTS = $(VARIANT_OPENLDAP) $(VARIANT_MOZILLALDAP)
44N/A
59N/ABUILD_32 = $(VARIANTS:%=%/$(MACH32)/.built)
44N/ABUILD_64 = $(VARIANTS:%=%/$(MACH64)/.built)
44N/ABUILD_32_and_64 = $(BUILD_32) $(BUILD_64)
59N/A
59N/A$(VARIANT_OPENLDAP)/$(MACH64)/.configured: BITS=64
59N/A$(VARIANT_MOZILLALDAP)/$(MACH64)/.configured: BITS=64
177N/A
59N/A# Configure options for mozillaldap variant
59N/A$(VARIANT_MOZILLALDAP)/%/.configured: \
44N/A CONFIGURE_OPTIONS += --enable-openldap=no
44N/A$(VARIANT_MOZILLALDAP)/%/.configured: \
44N/A CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS) -DMODULE_ISA_FIX"
44N/A
181N/A# Configure options for openldap variant
44N/A$(VARIANT_OPENLDAP)/%/.configured: \
181N/A CONFIGURE_OPTIONS += --enable-openldap=yes
83N/A$(VARIANT_OPENLDAP)/%/.configured: \
44N/A CONFIGURE_OPTIONS += \
44N/A CFLAGS="$(CFLAGS) -I/usr/include/openldap -DMODULE_ISA_FIX"
44N/A
# Common configure options
CONFIGURE_BINDIR.32= $(USRLIBDIR)/pam_pkcs11
CONFIGURE_BINDIR.64= $(USRLIBDIR64)/pam_pkcs11
CONFIGURE_OPTIONS += --localstatedir=/var
CONFIGURE_OPTIONS += --with-confdir=/etc/security/pam_pkcs11
CONFIGURE_OPTIONS += --docdir=/etc/security/pam_pkcs11
CONFIGURE_OPTIONS += OPENSSL_LIBS="-lssl -lcrypto -lsocket"
CONFIGURE_OPTIONS.32 += --with-pcsclite=no
CONFIGURE_OPTIONS.64 += --with-pcsclite=yes
CONFIGURE_OPTIONS.64 += PCSC_CFLAGS="-I/usr/include/PCSC"
CONFIGURE_OPTIONS.64 += PCSC_LIBS="-lpcsclite"
# We install only the MozillaLDAP variant. We will cherry-pick binaries built
# against OpenLDAP out of the build directory to avoid re-installing
# everything.
INSTALL_32 = $(VARIANT_MOZILLALDAP)/$(MACH32)/.installed
INSTALL_64 = $(VARIANT_MOZILLALDAP)/$(MACH64)/.installed
INSTALL_32_and_64 = $(INSTALL_32) $(INSTALL_64)
# common targets
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_64)
test: $(NO_TESTS)
REQUIRED_PACKAGES += library/openldap
REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += library/security/pcsc/pcsclite
REQUIRED_PACKAGES += shell/bash
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/linker