Makefile revision 965
9eb24f1f84885d5c2e51a7f675264db398c31af7Tinderbox User# CDDL HEADER START
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# The contents of this file are subject to the terms of the
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# Common Development and Distribution License (the "License").
0c27b3fe77ac1d5094ba3521e8142d9e7973133fMark Andrews# You may not use this file except in compliance with the License.
866d106459313499d0ca7bfccb4b2d23d5e4377cDavid Lawrence# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
bff64bf12b58a6f80e740e94f2e42a32df18113aEvan Hunt# See the License for the specific language governing permissions
866d106459313499d0ca7bfccb4b2d23d5e4377cDavid Lawrence# and limitations under the License.
2baa66562a2f119edffded961d3391f87ff98ec0Ondřej Surý# When distributing Covered Code, include this CDDL HEADER in each
03e200df5dc283f24a6a349f0b31d3eab26da893Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# If applicable, add the following below this CDDL HEADER, with the
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# fields enclosed by brackets "[]" replaced with your own identifying
63dd46733010bb9622810faa17d88c3e3c28b730Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
a5d43b72413db3edd6b36a58f9bdf2cf6ff692f2Bob Halley# CDDL HEADER END
df3c4c7988b9bae7d121a8ac9ed17a23366a948dDavid Lawrence# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
8b56b8956fc1e6c70efacb4f71db28d0d1f0c577Mark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
8b56b8956fc1e6c70efacb4f71db28d0d1f0c577Mark AndrewsCOMPONENT_ARCHIVE_HASH= sha1:223c3c89ad98c62e5b8335a75ef37e8241f9bbb0
914eeb33149a0008e26741d9e7d89dcd6f8b6d0bMark AndrewsCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gmp/$(COMPONENT_ARCHIVE)
11dbf2fc38eea8c5d3fe7123718bf197a8bb2e6bMark Andrews# -xthreadvar=%all: allow thread-local storage via __thread
67247b4a8304bac790648a351a95b8b0f4c512a6Mark Andrews# qualifier for all types of variables (global, static and dynamic)
9ed37e8b9ccd53bc37b546fffe487b9547dda3a0Mark AndrewsCFLAGS += -xthreadvar=%all $(CPP_C99_EXTENDED_MATH)
11dbf2fc38eea8c5d3fe7123718bf197a8bb2e6bMark AndrewsCXXFLAGS = -mt -features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic
11dbf2fc38eea8c5d3fe7123718bf197a8bb2e6bMark AndrewsCXXFLAGS += -instances=global -template=geninlinefuncs -verbose=template
11dbf2fc38eea8c5d3fe7123718bf197a8bb2e6bMark AndrewsCXXFLAGS += -xbuiltin=%none -xinline=%auto -xlibmil
11dbf2fc38eea8c5d3fe7123718bf197a8bb2e6bMark AndrewsCXXFLAGS += $(studio_cplusplus_C99_ENABLE) $(studio_PIC)
11dbf2fc38eea8c5d3fe7123718bf197a8bb2e6bMark Andrews# -Qoption ccfe -features=zla: allow VLA/ZLA in C++ (like in C99)
31c7ab4fb3f7710af87dc9c3d64c5daf9a3dea35Mark Andrews# assembler detection for GNU MP and GNU MPFR is done via MPN_PATH
31c7ab4fb3f7710af87dc9c3d64c5daf9a3dea35Mark Andrews# at ./configure time. GNU MPFR wants to know GNU MP's MPN_PATH.
67247b4a8304bac790648a351a95b8b0f4c512a6Mark Andrews# libgmpxx.so.4 always gets built with unnecessary paths in RUNPATH/RPATH
32ebb157b1d9409a186c86002827f8a1f4931f5aMark AndrewsCONFIGURE_ENV += CXXFLAGS="$(CC_BITS) $(CXXFLAGS)"
740e7340c55e9f0cf80c6fbbf7e8d3c1bdeaa255Mark AndrewsCONFIGURE_ENV += LD="$(CC) $(CFLAGS) $(LDFLAGS)"
84f95ddb2572641022619950a211aff49e331c98Mukund SivaramanCONFIGURE_ENV += CXXLD="$(CXX) $(CC_BITS) $(CXXFLAGS) $(LDFLAGS)"
32ebb157b1d9409a186c86002827f8a1f4931f5aMark AndrewsCONFIGURE_ENV += CPP="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
32ebb157b1d9409a186c86002827f8a1f4931f5aMark AndrewsCONFIGURE_ENV += CPP_FOR_BUILD="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
32ebb157b1d9409a186c86002827f8a1f4931f5aMark AndrewsCONFIGURE_ENV += CXXCPP="$(CXX) $(CC_BITS) $(CPPFLAGS) $(CXXFLAGS) -E"
1c1290afabb3c8f4dd498170ac9592e5be450161Mark AndrewsCONFIGURE_ENV += CC_FOR_BUILD="$(CC) $(CPPFLAGS) $(CFLAGS)"
800cfc8a5ce9ffacfc076003b34b5f787f82c701Mark AndrewsCONFIGURE_OPTIONS += --includedir=/usr/include/gmp
19d80ce5844e00a021643759adcbe27c11b485a0Witold KrecickiPROTOUSRSHAREINFODIR = $(PROTOUSRSHAREDIR)/info
19d80ce5844e00a021643759adcbe27c11b485a0Witold KrecickiPROTOUSRSHAREHTMLDIR = $(PROTOUSRSHAREDIR)/doc/gmp/html
19d80ce5844e00a021643759adcbe27c11b485a0Witold KrecickiPROTOUSRSHAREMAN3DIR = $(PROTOUSRSHAREDIR)/man/man3
8bcd80824c51c802c2927236b012cd526f569b04Mark AndrewsPROTOPKGCONFIGDIR64 = $(PROTOUSRLIBDIR64)/pkgconfig
2a80bc01530013293016172b1dcc1d12471ccf33Mark Andrews $(COMPONENT_DIR)/Solaris/libgmp-64.pc > $(COMPONENT_DIR)/libgmp.pc ; \
6fa84a3e255ef9e6233f0a8d134fc6d273f04599Evan Hunt $(MV) $(PROTOUSRINCLUDEDIR)/gmp.h $(PROTOUSRINCLUDEDIR)/gmp/ ; \
6fa84a3e255ef9e6233f0a8d134fc6d273f04599Evan Hunt $(MV) $(PROTOUSRINCLUDEDIR)/mp.h $(PROTOUSRINCLUDEDIR)/gmp/ ; \
6fa84a3e255ef9e6233f0a8d134fc6d273f04599Evan Hunt $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/index.html \
6fa84a3e255ef9e6233f0a8d134fc6d273f04599Evan Hunt $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmp.pc \
6fa84a3e255ef9e6233f0a8d134fc6d273f04599Evan Hunt $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmpxx.pc \
6fa84a3e255ef9e6233f0a8d134fc6d273f04599Evan Hunt $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmp.3 \
6fa84a3e255ef9e6233f0a8d134fc6d273f04599Evan Hunt# common targets