Makefile revision 4250
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# CDDL HEADER START
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# The contents of this file are subject to the terms of the
e62b9c9ce6413fb183c8116381e75dcd07ca5517Tinderbox User# Common Development and Distribution License (the "License").
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# You may not use this file except in compliance with the License.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# See the License for the specific language governing permissions
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# and limitations under the License.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# When distributing Covered Code, include this CDDL HEADER in each
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# If applicable, add the following below this CDDL HEADER, with the
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# CDDL HEADER END
14a656f94b1fd0ababd84a772228dfa52276ba15Evan Hunt# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserCOMPONENT_SRC= $(COMPONENT_SRC_NAME)-$(COMPONENT_VERSION)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User sha256:7be3ad1641b99b17f6a8be6a976f1f954e997c41e919ad7e0c418fe848c13c97
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gmp/$(COMPONENT_ARCHIVE)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# -xthreadvar=%all: allow thread-local storage via __thread
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# qualifier for all types of variables (global, static and dynamic)
14a656f94b1fd0ababd84a772228dfa52276ba15Evan HuntCFLAGS += -xthreadvar=%all $(CPP_C99_EXTENDED_MATH)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserCFLAGS += $(studio_C99_ENABLE) $(CPP_XPG6MODE)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserCXXFLAGS = -mt -features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserCXXFLAGS += -instances=global -template=geninlinefuncs
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCXXFLAGS += -xbuiltin=%none -xinline=%auto -xlibmil
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserCXXFLAGS += -xustr=ascii_utf16_ushort -xlibmopt
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserCXXFLAGS += $(studio_cplusplus_C99_ENABLE) $(studio_PIC)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# -Qoption ccfe -features=zla: allow VLA/ZLA in C++ (like in C99)
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserLDFLAGS += $(LD_Z_REDLOCSYM) $(LD_Z_RESCAN_NOW)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User '-e "/libtool/d"' \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User '-e "/-m32/d"' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User '-e "/-m64/d"' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User '-e "/DEPDIR=/d"' \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User '-e "/ld: warning/d"' \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User '-e "/creating /d"' \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User '-e "/gm4 /d"' \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User '-e "s/^make\[[0-9]\{1,\}\]/make/g"'
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# assembler detection for GNU MP and GNU MPFR is done via MPN_PATH
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# at ./configure time. GNU MPFR wants to know GNU MP's MPN_PATH.
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User# libgmpxx.so.4 always gets built with unnecessary paths in RUNPATH/RPATH
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_ENV += CXXFLAGS="$(CC_BITS) $(CXXFLAGS)"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserCONFIGURE_ENV += LD="$(CC) $(CFLAGS) $(LDFLAGS)"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserCONFIGURE_ENV += CXXLD="$(CXX) $(CC_BITS) $(CXXFLAGS) $(LDFLAGS)"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserCONFIGURE_ENV += CPP="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserCONFIGURE_ENV += CPP_FOR_BUILD="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserCONFIGURE_ENV += CXXCPP="$(CXX) $(CC_BITS) $(CPPFLAGS) $(CXXFLAGS) -E"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserCONFIGURE_ENV += CC_FOR_BUILD="$(CC) $(CPPFLAGS) $(CFLAGS)"
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserCONFIGURE_OPTIONS += --includedir=/usr/include/gmp
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserPROTOUSRSHAREINFODIR = $(PROTOUSRSHAREDIR)/info
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox UserPROTOUSRSHAREHTMLDIR = $(PROTOUSRSHAREDIR)/doc/gmp/html
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserPROTOUSRSHAREMAN3DIR = $(PROTOUSRSHAREDIR)/man/man3
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserPROTOPKGCONFIGDIR = $(PROTOUSRLIBDIR)/pkgconfig
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserPROTOPKGCONFIGDIR64 = $(PROTOUSRLIBDIR64)/pkgconfig
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(COMPONENT_DIR)/Solaris/libgmp-64.pc > $(COMPONENT_DIR)/libgmp.pc ; \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User $(MV) $(PROTOUSRINCLUDEDIR)/gmp.h $(PROTOUSRINCLUDEDIR)/gmp/ ; \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(MV) $(PROTOUSRINCLUDEDIR)/mp.h $(PROTOUSRINCLUDEDIR)/gmp/ ; \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/index.html \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmp.pc \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmpxx.pc \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(INSTALL) -m 0644 $(COMPONENT_DIR)/libgmp.pc \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(INSTALL) -m 0644 $(COMPONENT_DIR)/libgmpxx.pc \
9a5087bf58f651bfff841192aba5afd06760d6ceTinderbox User $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmp.3 \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# common targets