components/libgsl/Makefile
changeset 4119 bdf7d6775e82
child 4158 120144d5f6f3
equal deleted inserted replaced
4118:14c44fb1869d 4119:bdf7d6775e82
       
     1 #
       
     2 # CDDL HEADER START
       
     3 #
       
     4 # The contents of this file are subject to the terms of the
       
     5 # Common Development and Distribution License (the "License").
       
     6 # You may not use this file except in compliance with the License.
       
     7 #
       
     8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
     9 # or http://www.opensolaris.org/os/licensing.
       
    10 # See the License for the specific language governing permissions
       
    11 # and limitations under the License.
       
    12 #
       
    13 # When distributing Covered Code, include this CDDL HEADER in each
       
    14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    15 # If applicable, add the following below this CDDL HEADER, with the
       
    16 # fields enclosed by brackets "[]" replaced with your own identifying
       
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    18 #
       
    19 # CDDL HEADER END
       
    20 #
       
    21 # Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
       
    22 #
       
    23 
       
    24 include ../../make-rules/shared-macros.mk
       
    25 
       
    26 COMPONENT_NAME=		gsl
       
    27 COMPONENT_VERSION=	1.16
       
    28 COMPONENT_PROJECT_URL=	http://www.gnu.org/software/gsl/
       
    29 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    30 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
       
    31 COMPONENT_ARCHIVE_HASH=	\
       
    32     sha256:73bc2f51b90d2a780e6d266d43e487b3dbd78945dd0b04b14ca5980fe28d2f53
       
    33 COMPONENT_ARCHIVE_URL=	http://ftp.gnu.org/gnu/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
       
    34 COMPONENT_BUGDB=	library/libgsl
       
    35 
       
    36 TPNO=			21884
       
    37 
       
    38 include $(WS_MAKE_RULES)/prep.mk
       
    39 include $(WS_MAKE_RULES)/configure.mk
       
    40 include $(WS_MAKE_RULES)/ips.mk
       
    41 
       
    42 # Recreate configure and various Makefiles to pickup libsunperf changes.
       
    43 COMPONENT_PREP_ACTION = \
       
    44 	(cd $(@D) ; ACLOCAL=aclocal-1.11 AUTOMAKE=automake-1.11 autoreconf -f)
       
    45 
       
    46 # Get rid of compiler path set in RUNPATH.
       
    47 LDFLAGS += $(studio_NORUNPATH)
       
    48 
       
    49 LDFLAGS += $(CC_BITS)
       
    50 LDFLAGS += $(studio_PIC)
       
    51 LDFLAGS += $(studio_OPT)
       
    52 LDFLAGS += $(LD_Z_TEXT)
       
    53 LDFLAGS += $(LD_Z_DEFS)
       
    54 LDFLAGS += $(LD_DEF_LIBS)
       
    55 
       
    56 STUDIO_LIBS_PATH.32 =	/usr/lib/studio
       
    57 STUDIO_LIBS_PATH.64 =	/usr/lib/studio/64
       
    58 
       
    59 LDFLAGS += -L$(STUDIO_LIBS_PATH.$(BITS)) -R$(STUDIO_LIBS_PATH.$(BITS)) \
       
    60 		-lsunperf -lfsu -lmtsk -lpicl -lkstat
       
    61 
       
    62 CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
       
    63 CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
       
    64 
       
    65 COMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)"
       
    66 COMPONENT_BUILD_ARGS += LDFLAGS="$(LDFLAGS)"
       
    67 
       
    68 CC += $(CC_BITS)
       
    69 
       
    70 # Needed to pass -norunpath to the shared library link.
       
    71 CC += $(studio_NORUNPATH)
       
    72 
       
    73 COMPONENT_TEST_ARGS =	-k -i
       
    74 
       
    75 # Master test results are different not only between 32-bit and 64-bit, but
       
    76 # also between x86 and SPARC (different # of tests run).
       
    77 COMPONENT_TEST_MASTER = \
       
    78 	$(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH)-$(BITS).master
       
    79 
       
    80 COMPONENT_TEST_TRANSFORMS += \
       
    81 	'-e "s|^.*$(CC).*$$|XXX_CC_XXX|g" ' \
       
    82 	'-e "s|^.*source=.*libtool=no.*$$|XXX_CC_XXX|g" ' \
       
    83 	'-e "s|^.*DEPDIR=.deps.*$$|XXX_CC_XXX|g" ' \
       
    84 	'-e "/^XXX_CC_XXX$$/d" '
       
    85 
       
    86 # Needed for "gmake test" to work successfully.
       
    87 # If SHELLOPTS is exported (as it is by the userland makefiles),
       
    88 # then all shell options get exported to child invocations of bash,
       
    89 # which results in test failures due to nounset and xtrace being
       
    90 # set unexpectedly, and errors such as "$1: unbound variable" and
       
    91 # diffs failing due to script tracing in output files.
       
    92 unexport SHELLOPTS
       
    93 
       
    94 ASLR_MODE = $(ASLR_ENABLE)
       
    95 
       
    96 configure:	$(CONFIGURE_32_and_64)
       
    97 
       
    98 build:		$(BUILD_32_and_64)
       
    99 
       
   100 install:	$(INSTALL_32_and_64)
       
   101 
       
   102 test:		$(TEST_32_and_64)
       
   103 
       
   104 REQUIRED_PACKAGES += shell/ksh93
       
   105 REQUIRED_PACKAGES += system/library
       
   106 REQUIRED_PACKAGES += system/library/math
       
   107 REQUIRED_PACKAGES += system/library/openmp
       
   108 REQUIRED_PACKAGES += system/library/sunperf