|
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 # When using Studio 12.1, we need to clear this flag otherwise we get an |
|
47 # error at configure time. |
|
48 studio_NORUNPATH = |
|
49 |
|
50 # Get rid of compiler path set in RUNPATH. |
|
51 LDFLAGS += $(studio_NORUNPATH) |
|
52 |
|
53 LDFLAGS += $(CC_BITS) |
|
54 LDFLAGS += $(studio_PIC) |
|
55 LDFLAGS += $(studio_OPT) |
|
56 LDFLAGS += $(LD_Z_TEXT) |
|
57 LDFLAGS += $(LD_Z_DEFS) |
|
58 LDFLAGS += $(LD_DEF_LIBS) |
|
59 |
|
60 STUDIO_LIBS_PATH.32 = /usr/lib/studio |
|
61 STUDIO_LIBS_PATH.64 = /usr/lib/studio/64 |
|
62 |
|
63 LDFLAGS += -L$(STUDIO_LIBS_PATH.$(BITS)) -R$(STUDIO_LIBS_PATH.$(BITS)) \ |
|
64 -lsunperf -lfsu -lmtsk -lpicl -lkstat |
|
65 |
|
66 CONFIGURE_ENV += CFLAGS="$(CFLAGS)" |
|
67 CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)" |
|
68 |
|
69 COMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)" |
|
70 COMPONENT_BUILD_ARGS += LDFLAGS="$(LDFLAGS)" |
|
71 |
|
72 CC += $(CC_BITS) |
|
73 |
|
74 # Needed to pass -norunpath to the shared library link. |
|
75 CC += $(studio_NORUNPATH) |
|
76 |
|
77 COMPONENT_TEST_ARGS = -k -i |
|
78 |
|
79 # Master test results are different not only between 32-bit and 64-bit, but |
|
80 # also between x86 and SPARC (different # of tests run). |
|
81 COMPONENT_TEST_MASTER = \ |
|
82 $(COMPONENT_TEST_RESULTS_DIR)/results-$(MACH)-$(BITS).master |
|
83 |
|
84 COMPONENT_TEST_TRANSFORMS += \ |
|
85 '-e "s|^.*$(CC).*$$|XXX_CC_XXX|g" ' \ |
|
86 '-e "s|^.*source=.*libtool=no.*$$|XXX_CC_XXX|g" ' \ |
|
87 '-e "s|^.*DEPDIR=.deps.*$$|XXX_CC_XXX|g" ' \ |
|
88 '-e "/^XXX_CC_XXX$$/d" ' |
|
89 |
|
90 # Needed for "gmake test" to work successfully. |
|
91 # If SHELLOPTS is exported (as it is by the userland makefiles), |
|
92 # then all shell options get exported to child invocations of bash, |
|
93 # which results in test failures due to nounset and xtrace being |
|
94 # set unexpectedly, and errors such as "$1: unbound variable" and |
|
95 # diffs failing due to script tracing in output files. |
|
96 unexport SHELLOPTS |
|
97 |
|
98 ASLR_MODE = $(ASLR_ENABLE) |
|
99 |
|
100 configure: $(CONFIGURE_32_and_64) |
|
101 |
|
102 build: $(BUILD_32_and_64) |
|
103 |
|
104 install: $(INSTALL_32_and_64) |
|
105 |
|
106 test: $(TEST_32_and_64) |
|
107 |
|
108 REQUIRED_PACKAGES += shell/ksh93 |
|
109 REQUIRED_PACKAGES += system/library |
|
110 REQUIRED_PACKAGES += system/library/math |
|
111 REQUIRED_PACKAGES += system/library/openmp |
|
112 REQUIRED_PACKAGES += system/library/sunperf |