Makefile revision 219
436aad11e01e916f75e68a2e9cb89ac217a990d3Tinderbox User# CDDL HEADER START
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox User# The contents of this file are subject to the terms of the
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox User# Common Development and Distribution License (the "License").
a5636b773fa05a272b6876afd99309c0b3090e2fMark Andrews# You may not use this file except in compliance with the License.
e9e4257668ff6c4e583b0c0db2508650b0b677b8Tinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5e047890ac9b745db060d95f7d1b4f876511240dTinderbox User# See the License for the specific language governing permissions
137fdbc214e99c4cbe57551e9e14f2015c2e42aeTinderbox User# and limitations under the License.
bed0874e1a09e810575328c4bfc346a47514b69fMark Andrews# When distributing Covered Code, include this CDDL HEADER in each
02b47c5d62e1e827743684c28a08e871da454a2dMark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# If applicable, add the following below this CDDL HEADER, with the
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
e20309353e6246485c521278131d3fced73d7957Tinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# CDDL HEADER END
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_ARCHIVE_HASH= sha1:223c3c89ad98c62e5b8335a75ef37e8241f9bbb0
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox UserCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gmp/$(COMPONENT_ARCHIVE)
e9e4257668ff6c4e583b0c0db2508650b0b677b8Tinderbox User# -xthreadvar=%all: allow thread-local storage via __thread
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# qualifier for all types of variables (global, static and dynamic)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox UserCFLAGS += -xthreadvar=%all $(CPP_C99_EXTENDED_MATH)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCFLAGS += $(studio_C99_ENABLE) $(CPP_XPG6MODE)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCXXFLAGS = -mt -features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic UpdaterCXXFLAGS += -instances=global -template=geninlinefuncs -verbose=template
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic UpdaterCXXFLAGS += -xbuiltin=%none -xinline=%auto -xlibmil
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCXXFLAGS += -xustr=ascii_utf16_ushort -xlibmopt
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCXXFLAGS += $(studio_cplusplus_C99_ENABLE) $(studio_PIC)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# -Qoption ccfe -features=zla: allow VLA/ZLA in C++ (like in C99)
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox UserLDFLAGS += $(LD_Z_REDLOCSYM) $(LD_Z_RESCAN_NOW)
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# assembler detection for GNU MP and GNU MPFR is done via MPN_PATH
24934f08b9ff81c2be711e566e8002d145573031Tinderbox User# at ./configure time. GNU MPFR wants to know GNU MP's MPN_PATH.
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# libgmpxx.so.4 always gets built with unnecessary paths in RUNPATH/RPATH
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_ENV += CXXFLAGS="$(CC_BITS) $(CXXFLAGS)"
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsCONFIGURE_ENV += LD="$(CC) $(CFLAGS) $(LDFLAGS)"
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_ENV += CXXLD="$(CXX) $(CC_BITS) $(CXXFLAGS) $(LDFLAGS)"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_ENV += CPP="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_ENV += CPP_FOR_BUILD="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_ENV += CXXCPP="$(CXX) $(CC_BITS) $(CPPFLAGS) $(CXXFLAGS) -E"
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark AndrewsCONFIGURE_ENV += CC_FOR_BUILD="$(CC) $(CPPFLAGS) $(CFLAGS)"
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark AndrewsCONFIGURE_OPTIONS += --includedir=/usr/include/gmp
bed0874e1a09e810575328c4bfc346a47514b69fMark AndrewsPROTOUSRSHAREHTMLDIR = $(PROTOUSRSHAREDIR)/doc/gmp/html
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic UpdaterPROTOUSRSHAREMAN3DIR = $(PROTOUSRSHAREDIR)/man/man3
2ba8f584b97cbab864570e38fd26b8cb90961428Tinderbox UserPROTOPKGCONFIGDIR64 = $(PROTOUSRLIBDIR64)/pkgconfig
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater $(COMPONENT_DIR)/Solaris/libgmp-64.pc > $(COMPONENT_DIR)/libgmp.pc ; \
fa0326cc2cf428f67575b6ba3b97b528a31b0010Tinderbox User $(MV) $(PROTOUSRINCLUDEDIR)/gmp.h $(PROTOUSRINCLUDEDIR)/gmp/ ; \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(MV) $(PROTOUSRINCLUDEDIR)/mp.h $(PROTOUSRINCLUDEDIR)/gmp/ ; \
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/index.html \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmp.pc \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmpxx.pc \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(INSTALL) -m 0644 $(COMPONENT_DIR)/libgmp.pc \
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater $(INSTALL) -m 0644 $(COMPONENT_DIR)/libgmpxx.pc \
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmp.3 \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# common targets