Makefile revision 2669
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass#
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# CDDL HEADER START
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass#
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# The contents of this file are subject to the terms of the
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# Common Development and Distribution License (the "License").
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# You may not use this file except in compliance with the License.
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass#
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# or http://www.opensolaris.org/os/licensing.
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# See the License for the specific language governing permissions
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# and limitations under the License.
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass#
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# When distributing Covered Code, include this CDDL HEADER in each
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# If applicable, add the following below this CDDL HEADER, with the
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# fields enclosed by brackets "[]" replaced with your own identifying
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# information: Portions Copyright [yyyy] [name of copyright owner]
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass#
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# CDDL HEADER END
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass#
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass#
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glassinclude ../../make-rules/shared-macros.mk
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCOMPONENT_NAME= trousers
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCOMPONENT_VERSION= 0.3.6
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCOMPONENT_PROJECT_URL= http://sourceforge.net/projects/trousers/files/trousers/
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCOMPONENT_ARCHIVE_HASH= \
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass sha256:91025f60248af44df192e8df16fa6b0c0f1e48c54f6dc51626567ed95758b0d6
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCOMPONENT_BUGDB= utility/tss
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glassinclude ../../make-rules/prep.mk
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glassinclude ../../make-rules/configure.mk
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glassinclude ../../make-rules/ips.mk
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glassinclude ../../make-rules/lint-libraries.mk
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassPATCH_LEVEL=0
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassLIBS=-lnsl -lsocket -lgen
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCFLAGS += "-D_POSIX_PTHREAD_SEMANTICS"
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCONFIGURE_OPTIONS += --sbindir=/usr/lib
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCONFIGURE_OPTIONS += --with-gui=openssl
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCONFIGURE_OPTIONS += CC="$(CC)"
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCONFIGURE_OPTIONS += LD="$(CC)"
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS) -lpthread -lbsm -lscf -lresolv"
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCONFIGURE_OPTIONS += LIBS="$(LIBS)"
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# Enable ASLR for this component
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassASLR_MODE = $(ASLR_ENABLE)
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCOMPONENT_POST_CONFIGURE_ACTION = (cd $(COMPONENT_SRC); \
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass for f in `ls src/include/tss/*.h` ; do \
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass /usr/bin/dos2unix $$f $$f; \
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass done; \
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass for f in `ls src/include/trousers/*.h` ; do \
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass /usr/bin/dos2unix $$f $$f; \
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass done; \
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass for f in `ls src/include/*.h` ; do \
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass /usr/bin/dos2unix $$f $$f; \
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass done; \
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass /usr/bin/libtoolize -f; \
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass $(ACLOCAL); \
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass $(AUTOMAKE) src/tspi/Makefile; \
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass $(AUTOCONF))
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass#
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# We had to use cc as the linker (see CONFIGURE_OPTIONS above) so the
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# .init and .fini sections get set correctly. Because we use cc, we
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# must pass the -m64 flag through cc to the linker when building 64 bit
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# libraries. We can't just add it to LDFLAGS because then it gets used
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# when creating executables and static libs and generates lots of noise
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# in the build logs. LDARCHFLAG is only recognized by the Makefile in
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# the src/tspi directory.
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass#
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCOMPONENT_BUILD_ENV.64 += LDARCHFLAG="-Wl,$(CC_BITS)"
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCOMPONENT_TEST_TARGETS =
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassCOMPONENT_BUILD_TARGETS = all
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass# common targets
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glassbuild: $(BUILD_32_and_64)
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glassinstall: $(INSTALL_32_and_64)
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glasstest: $(NO_TESTS)
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav GlassBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glassinclude ../../make-rules/depend.mk
11472e48d0b0591b8f3753193304070c6a13cb05Dav Glass