259N/A#
259N/A# CDDL HEADER START
259N/A#
259N/A# The contents of this file are subject to the terms of the
259N/A# Common Development and Distribution License (the "License").
259N/A# You may not use this file except in compliance with the License.
259N/A#
259N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
259N/A# or http://www.opensolaris.org/os/licensing.
259N/A# See the License for the specific language governing permissions
259N/A# and limitations under the License.
259N/A#
259N/A# When distributing Covered Code, include this CDDL HEADER in each
259N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
259N/A# If applicable, add the following below this CDDL HEADER, with the
259N/A# fields enclosed by brackets "[]" replaced with your own identifying
259N/A# information: Portions Copyright [yyyy] [name of copyright owner]
259N/A#
259N/A# CDDL HEADER END
259N/A#
5680N/A
259N/A#
5680N/A# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
5680N/A#
5680N/ABUILD_BITS= 64_and_32
259N/Ainclude ../../make-rules/shared-macros.mk
259N/A
259N/ACOMPONENT_NAME= trousers
5939N/ACOMPONENT_VERSION= 0.3.13
618N/ACOMPONENT_PROJECT_URL= http://sourceforge.net/projects/trousers/files/trousers/
817N/ACOMPONENT_ARCHIVE_HASH= \
5939N/A sha256:bb908e4a3c88a17b247a4fc8e0fff3419d8a13170fe7bdfbe0e2c5c082a276d3
618N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
1258N/ACOMPONENT_BUGDB= utility/tss
259N/A
5939N/ATPNO= 27256
2899N/A
5680N/ATEST_TARGET= $(NO_TESTS)
5680N/Ainclude $(WS_MAKE_RULES)/common.mk
259N/A
259N/APATCH_LEVEL=0
259N/A
5680N/Aifeq ($(OS_VERSION),5.11)
5939N/A# These libraries are in libc for S12:
5680N/ALIBS=-lnsl -lsocket
5939N/A# Use the "new" POSIX thread API (not the "draft" prototype):
2669N/ACFLAGS += "-D_POSIX_PTHREAD_SEMANTICS"
5680N/Aendif
2669N/A
5939N/A# Trousers 0.3.13 requires automake/autoconf >= 1.13, but Userland default
5939N/A# is older than what is needed. So hard-coding to the next available, 1.15:
5939N/A# "--add-missing" needed to use default "compile" script.
5939N/AAUTOMAKE=/usr/bin/automake-1.15 --add-missing
5939N/AACLOCAL=/usr/bin/aclocal-1.15
5939N/A
5680N/ALIBS += -lgen
5680N/A
5680N/ALDFLAGS += -lbsm -lscf -lresolv
5680N/A
5680N/ACONFIGURE_OPTIONS += --sbindir=$(USRLIBDIR)
5680N/A# 'openssl' is an undocumented option that causes trousers to use OpenSSL's UI
5680N/A# interfaces for text-based PIN entry.
259N/ACONFIGURE_OPTIONS += --with-gui=openssl
259N/ACONFIGURE_OPTIONS += LD="$(CC)"
259N/ACONFIGURE_OPTIONS += LIBS="$(LIBS)"
259N/A
259N/ACOMPONENT_POST_CONFIGURE_ACTION = (cd $(COMPONENT_SRC); \
259N/A for f in `ls src/include/tss/*.h` ; do \
259N/A /usr/bin/dos2unix $$f $$f; \
259N/A done; \
259N/A for f in `ls src/include/trousers/*.h` ; do \
259N/A /usr/bin/dos2unix $$f $$f; \
259N/A done; \
259N/A for f in `ls src/include/*.h` ; do \
259N/A /usr/bin/dos2unix $$f $$f; \
259N/A done; \
259N/A /usr/bin/libtoolize -f; \
259N/A $(ACLOCAL); \
259N/A $(AUTOMAKE) src/tspi/Makefile; \
259N/A $(AUTOCONF))
259N/A
259N/A#
5939N/A# We had to use cc as the linker (see CONFIGURE_OPTIONS above) so the
5939N/A# .init and .fini sections get set correctly. Because we use cc, we
5939N/A# must pass the -m64 flag through cc to the linker when building 64 bit
5939N/A# libraries. We can't just add it to LDFLAGS because then it gets used
5939N/A# when creating executables and static libs and generates lots of noise
5939N/A# in the build logs. LDARCHFLAG is only recognized by the Makefile in
259N/A# the src/tspi directory.
259N/A#
259N/ACOMPONENT_BUILD_ENV.64 += LDARCHFLAG="-Wl,$(CC_BITS)"
259N/A
5939N/A# For regression testing, use STC test suite "tss".
5939N/A# It requires a machine with TPM hardware that's enabled and initialized.
5939N/ACOMPONENT_TEST_TARGETS =
259N/A
259N/ACOMPONENT_BUILD_TARGETS = all
259N/A
5939N/A# These are packages required for building, not for use:
5939N/AREQUIRED_PACKAGES += developer/build/automake-115
5939N/AREQUIRED_PACKAGES += developer/build/libtool
3817N/AREQUIRED_PACKAGES += library/security/openssl
3817N/AREQUIRED_PACKAGES += library/security/openssl/openssl-fips-140
3817N/AREQUIRED_PACKAGES += shell/ksh93
3817N/AREQUIRED_PACKAGES += system/core-os
3817N/AREQUIRED_PACKAGES += system/network