Makefile revision 844
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews# CDDL HEADER START
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# The contents of this file are subject to the terms of the
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Common Development and Distribution License (the "License").
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# You may not use this file except in compliance with the License.
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# or http://www.opensolaris.org/os/licensing.
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews# See the License for the specific language governing permissions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and limitations under the License.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# When distributing Covered Code, include this CDDL HEADER in each
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# If applicable, add the following below this CDDL HEADER, with the
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# CDDL HEADER END
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein sha256:7be3ad1641b99b17f6a8be6a976f1f954e997c41e919ad7e0c418fe848c13c97
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gmp/$(COMPONENT_ARCHIVE)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# -xthreadvar=%all: allow thread-local storage via __thread
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# qualifier for all types of variables (global, static and dynamic)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserCFLAGS += -xthreadvar=%all $(CPP_C99_EXTENDED_MATH)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserCXXFLAGS = -mt -features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCXXFLAGS += -instances=global -template=geninlinefuncs -verbose=template
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCXXFLAGS += -xbuiltin=%none -xinline=%auto -xlibmil
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCXXFLAGS += $(studio_cplusplus_C99_ENABLE) $(studio_PIC)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# -Qoption ccfe -features=zla: allow VLA/ZLA in C++ (like in C99)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserLDFLAGS += $(LD_Z_REDLOCSYM) $(LD_Z_RESCAN_NOW)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# assembler detection for GNU MP and GNU MPFR is done via MPN_PATH
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User# at ./configure time. GNU MPFR wants to know GNU MP's MPN_PATH.
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# libgmpxx.so.4 always gets built with unnecessary paths in RUNPATH/RPATH
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_ENV += CXXFLAGS="$(CC_BITS) $(CXXFLAGS)"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_ENV += CXXLD="$(CXX) $(CC_BITS) $(CXXFLAGS) $(LDFLAGS)"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_ENV += CPP="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserCONFIGURE_ENV += CPP_FOR_BUILD="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_ENV += CXXCPP="$(CXX) $(CC_BITS) $(CPPFLAGS) $(CXXFLAGS) -E"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_ENV += CC_FOR_BUILD="$(CC) $(CPPFLAGS) $(CFLAGS)"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_OPTIONS += --includedir=/usr/include/gmp
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserPROTOUSRSHAREHTMLDIR = $(PROTOUSRSHAREDIR)/doc/gmp/html
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinPROTOUSRSHAREMAN3DIR = $(PROTOUSRSHAREDIR)/man/man3
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserPROTOPKGCONFIGDIR = $(PROTOUSRLIBDIR)/pkgconfig
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinPROTOPKGCONFIGDIR64 = $(PROTOUSRLIBDIR64)/pkgconfig
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(COMPONENT_DIR)/Solaris/libgmp-64.pc > $(COMPONENT_DIR)/libgmp.pc ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(MV) $(PROTOUSRINCLUDEDIR)/gmp.h $(PROTOUSRINCLUDEDIR)/gmp/ ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(MV) $(PROTOUSRINCLUDEDIR)/mp.h $(PROTOUSRINCLUDEDIR)/gmp/ ; \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/index.html \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmp.pc \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmpxx.pc \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein $(INSTALL) -m 0644 $(COMPONENT_DIR)/libgmpxx.pc \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmp.3 \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# common targets