Makefile revision 1467
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# CDDL HEADER START
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# The contents of this file are subject to the terms of the
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Common Development and Distribution License (the "License").
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# You may not use this file except in compliance with the License.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# or http://www.opensolaris.org/os/licensing.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# See the License for the specific language governing permissions
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# and limitations under the License.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# When distributing Covered Code, include this CDDL HEADER in each
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# If applicable, add the following below this CDDL HEADER, with the
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# fields enclosed by brackets "[]" replaced with your own identifying
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# information: Portions Copyright [yyyy] [name of copyright owner]
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# CDDL HEADER END
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCOMPONENT_PROJECT_URL= http://sourceforge.net/projects/trousers/files/trousers/
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson sha256:91025f60248af44df192e8df16fa6b0c0f1e48c54f6dc51626567ed95758b0d6
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafssoninclude ../../make-rules/lint-libraries.mk
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS) -lpthread -lbsm -lscf -lresolv"
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Enable ASLR for this component
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCOMPONENT_POST_CONFIGURE_ACTION = (cd $(COMPONENT_SRC); \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson for f in `ls src/include/trousers/*.h` ; do \
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# We had to use cc as the linker (see CONFIGURE_OPTIONS above) so the
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# .init and .fini sections get set correctly. Because we use cc, we
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# must pass the -m64 flag through cc to the linker when building 64 bit
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# libraries. We can't just add it to LDFLAGS because then it gets used
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# when creating executables and static libs and generates lots of noise
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# in the build logs. LDARCHFLAG is only recognized by the Makefile in
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# the src/tspi directory.
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCOMPONENT_BUILD_ENV.64 += LDARCHFLAG="-Wl,$(CC_BITS)"
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# common targets