Makefile revision 4156
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# CDDL HEADER START
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# The contents of this file are subject to the terms of the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Common Development and Distribution License (the "License").
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# You may not use this file except in compliance with the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# or http://www.opensolaris.org/os/licensing.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# See the License for the specific language governing permissions
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# and limitations under the License.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# When distributing Covered Code, include this CDDL HEADER in each
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# If applicable, add the following below this CDDL HEADER, with the
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# fields enclosed by brackets "[]" replaced with your own identifying
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# information: Portions Copyright [yyyy] [name of copyright owner]
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# CDDL HEADER END
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte#
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude ../../make-rules/shared-macros.mk
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_NAME= gsl
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_VERSION= 1.16
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_PROJECT_URL= http://www.gnu.org/software/gsl/
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_ARCHIVE_HASH= \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte sha256:73bc2f51b90d2a780e6d266d43e487b3dbd78945dd0b04b14ca5980fe28d2f53
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_BUGDB= library/libgsl
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteTPNO= 21884
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude $(WS_MAKE_RULES)/prep.mk
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude $(WS_MAKE_RULES)/configure.mk
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forteinclude $(WS_MAKE_RULES)/ips.mk
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# By default, tests in each GSL sub-directory are linked statically against
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# a set of .la files. We don't deliver those in the GSL package, so we
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# adjust all the tests to link against the dynamic GSL library instead.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_POST_UNPACK_ACTION = \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (cd $(COMPONENT_SRC); \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte for f in `ls */Makefile.am` ; do \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(GSED) -i -e \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte 's|^test_LDADD.*$$|test_LDFLAGS = -L`pwd`/../.libs/ -R`pwd`/../.libs/\ntest_LDADD = -lgsl|' \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $$f ; \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte done)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Recreate configure and top-level Makefile to pickup libsunperf changes.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_PREP_ACTION = \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte (cd $(@D) ; ACLOCAL=aclocal-1.11 AUTOMAKE=automake-1.11 autoreconf -f)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLDFLAGS += $(CC_BITS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLDFLAGS += $(studio_PIC)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLDFLAGS += $(studio_OPT)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLDFLAGS += $(LD_Z_TEXT)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLDFLAGS += $(LD_Z_DEFS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLDFLAGS += $(LD_DEF_LIBS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSTUDIO_LIBS_PATH.32 = /usr/lib/studio
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteSTUDIO_LIBS_PATH.64 = /usr/lib/studio/64
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteLDFLAGS += -L$(STUDIO_LIBS_PATH.$(BITS)) -R$(STUDIO_LIBS_PATH.$(BITS)) \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte -lsunperf -lfsu -lmtsk -lpicl -lkstat
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCONFIGURE_ENV += CFLAGS="$(CFLAGS)"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_BUILD_ARGS += LDFLAGS="$(LDFLAGS)"
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCC += $(CC_BITS)
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_TEST_ARGS = -k -i
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Master test results are different not only between 32-bit and 64-bit, but
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# also between x86 and SPARC (different # of tests run).
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_TEST_MASTER = \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH)-$(BITS).master
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn ForteCOMPONENT_TEST_TRANSFORMS += \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte '-e "s|^.*$(CC).*$$|XXX_CC_XXX|g" ' \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte '-e "s|^.*source=.*libtool=no.*$$|XXX_CC_XXX|g" ' \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte '-e "s|^.*DEPDIR=.deps.*$$|XXX_CC_XXX|g" ' \
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte '-e "/^XXX_CC_XXX$$/d" '
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# Needed for "gmake test" to work successfully.
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# If SHELLOPTS is exported (as it is by the userland makefiles),
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# then all shell options get exported to child invocations of bash,
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# which results in test failures due to nounset and xtrace being
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# set unexpectedly, and errors such as "$1: unbound variable" and
fcf3ce441efd61da9bb2884968af01cb7c1452ccJohn Forte# diffs failing due to script tracing in output files.
unexport SHELLOPTS
ASLR_MODE = $(ASLR_ENABLE)
configure: $(CONFIGURE_32_and_64)
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_64)
# There are known problems in libsunperf that are causing GSL test failures
# in Solaris 12 with Studio 12.4 just on the x86 platform:
# linalg: FAIL: LQ_update m(5,3) [88] (32-bit)
# caused by 20914954 cblas_gemm differences between x86 and sparcv7
# linalg: FAIL: cholesky_invert hilbert(4) (64-bit)
# caused by 20909151 cblas_dsymm differences between amd64 and sparcv9.
test: $(TEST_32_and_64)
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += system/library/openmp
REQUIRED_PACKAGES += system/library/sunperf