Makefile revision 830
219N/A# CDDL HEADER START
219N/A#
219N/A# The contents of this file are subject to the terms of the
219N/A# Common Development and Distribution License (the "License").
219N/A# You may not use this file except in compliance with the License.
219N/A#
219N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
219N/A# or http://www.opensolaris.org/os/licensing.
219N/A# See the License for the specific language governing permissions
219N/A# and limitations under the License.
219N/A#
219N/A# When distributing Covered Code, include this CDDL HEADER in each
219N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
219N/A# If applicable, add the following below this CDDL HEADER, with the
219N/A# fields enclosed by brackets "[]" replaced with your own identifying
219N/A# information: Portions Copyright [yyyy] [name of copyright owner]
219N/A#
219N/A# CDDL HEADER END
219N/A#
219N/A
219N/A#
814N/A# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
219N/A#
219N/A
219N/Ainclude ../../make-rules/shared-macros.mk
219N/A
219N/APATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
219N/A
219N/ACOMPONENT_NAME= gmp
219N/ACOMPONENT_VERSION= 4.3.2
618N/ACOMPONENT_PROJECT_URL= http://gmplib.org/
219N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
219N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
219N/ACOMPONENT_ARCHIVE_HASH= sha1:223c3c89ad98c62e5b8335a75ef37e8241f9bbb0
219N/ACOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gmp/$(COMPONENT_ARCHIVE)
219N/A
219N/Ainclude ../../make-rules/prep.mk
219N/Ainclude ../../make-rules/configure.mk
219N/Ainclude ../../make-rules/ips.mk
219N/Ainclude ../../make-rules/lint-libraries.mk
219N/A
219N/APATCH_LEVEL = 0
219N/A
814N/ACLOBBER_PATHS += libgmp.pc libgmpxx.pc
814N/A
219N/ACFLAGS += -features=extinl,extensions
219N/ACFLAGS += -xustr=ascii_utf16_ushort -xcsi
219N/A# -xthreadvar=%all: allow thread-local storage via __thread
219N/A# qualifier for all types of variables (global, static and dynamic)
219N/ACFLAGS += -xthreadvar=%all $(CPP_C99_EXTENDED_MATH)
219N/ACFLAGS += $(studio_C99_ENABLE) $(CPP_XPG6MODE)
219N/ACFLAGS += $(studio_PIC)
219N/ACXXFLAGS = -mt -features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic
219N/ACXXFLAGS += -instances=global -template=geninlinefuncs -verbose=template
219N/ACXXFLAGS += -xbuiltin=%none -xinline=%auto -xlibmil
219N/ACXXFLAGS += -xustr=ascii_utf16_ushort -xlibmopt
219N/ACXXFLAGS += $(studio_cplusplus_C99_ENABLE) $(studio_PIC)
219N/ACXXFLAGS += $(CPP_XPG5MODE)
219N/A# -Qoption ccfe -features=zla: allow VLA/ZLA in C++ (like in C99)
219N/ACXXFLAGS += -Qoption ccfe -features=zla
219N/ACXXFLAGS += -xF=%none -xthreadvar=%all
219N/ACPPFLAGS += $(CPP_POSIX) $(CPP_LARGEFILES)
219N/ALDFLAGS += $(LD_Z_REDLOCSYM) $(LD_Z_RESCAN_NOW)
219N/A
219N/A# assembler detection for GNU MP and GNU MPFR is done via MPN_PATH
219N/A# at ./configure time. GNU MPFR wants to know GNU MP's MPN_PATH.
219N/AMPN32_i386 = x86/pentium x86 generic
219N/AMPN64_i386 = x86_64/pentium4 x86_64 generic
219N/AMPN32_sparc = sparc32/v9 sparc32 generic
219N/AMPN64_sparc = sparc64 generic
219N/AMPN_32 = $(MPN32_$(MACH))
219N/AMPN_64 = $(MPN64_$(MACH))
219N/AGM4 = /usr/bin/gm4
219N/AGSED = /usr/bin/gsed
219N/A# libgmpxx.so.4 always gets built with unnecessary paths in RUNPATH/RPATH
219N/AELFEDIT = /usr/bin/elfedit
219N/A
219N/ACONFIGURE_ENV += CC="$(CC)"
219N/ACONFIGURE_ENV += CXX="$(CXX)"
219N/ACONFIGURE_ENV += CFLAGS="$(CFLAGS)"
219N/ACONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"
219N/ACONFIGURE_ENV += CXXFLAGS="$(CC_BITS) $(CXXFLAGS)"
219N/ACONFIGURE_ENV += LD="$(CC) $(CFLAGS) $(LDFLAGS)"
219N/ACONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
219N/ACONFIGURE_ENV += CXXLD="$(CXX) $(CC_BITS) $(CXXFLAGS) $(LDFLAGS)"
219N/ACONFIGURE_ENV += CPP="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
219N/ACONFIGURE_ENV += CPP_FOR_BUILD="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
219N/ACONFIGURE_ENV += CXXCPP="$(CXX) $(CC_BITS) $(CPPFLAGS) $(CXXFLAGS) -E"
219N/ACONFIGURE_ENV += INSTALL="$(INSTALL)"
219N/ACONFIGURE_ENV += CC_FOR_BUILD="$(CC) $(CPPFLAGS) $(CFLAGS)"
219N/ACONFIGURE_ENV += M4="$(GM4)"
219N/ACONFIGURE_ENV += SED="$(GSED)"
219N/ACONFIGURE_ENV += ABI="$(BITS)"
219N/ACONFIGURE_ENV += "MPN_PATH=$(MPN_$(BITS))"
219N/A
219N/ACONFIGURE_OPTIONS += --includedir=/usr/include/gmp
219N/ACONFIGURE_OPTIONS += --localstatedir=/var
219N/ACONFIGURE_OPTIONS += --enable-shared
219N/ACONFIGURE_OPTIONS += --disable-static
219N/ACONFIGURE_OPTIONS += --disable-libtool-lock
219N/ACONFIGURE_OPTIONS += --disable-alloca
219N/ACONFIGURE_OPTIONS += --enable-cxx
219N/ACONFIGURE_OPTIONS += --enable-fft
219N/ACONFIGURE_OPTIONS += --enable-mpbsd
219N/ACONFIGURE_OPTIONS += --disable-fat
219N/ACONFIGURE_OPTIONS += --with-pic
219N/A
219N/APROTOUSRSHAREINFODIR = $(PROTOUSRSHAREDIR)/info
219N/APROTOUSRSHAREHTMLDIR = $(PROTOUSRSHAREDIR)/doc/gmp/html
219N/APROTOUSRSHAREMAN3DIR = $(PROTOUSRSHAREDIR)/man/man3
219N/APROTOUSRINCLUDEDIR = $(PROTOUSRDIR)/include
219N/APROTOPKGCONFIGDIR = $(PROTOUSRLIBDIR)/pkgconfig
219N/APROTOPKGCONFIGDIR64 = $(PROTOUSRLIBDIR64)/pkgconfig
219N/A
219N/ACOMPONENT_POST_INSTALL_ACTION = \
219N/A ( $(MKDIR) $(PROTOUSRSHAREHTMLDIR) ; \
219N/A $(MKDIR) $(PROTOUSRSHAREMAN3DIR) ; \
219N/A $(MKDIR) $(PROTOPKGCONFIGDIR) ; \
219N/A $(MKDIR) $(PROTOPKGCONFIGDIR64) ; \
219N/A $(ELFEDIT) -e "dyn:runpath $(USRLIBDIR)" \
219N/A $(PROTOUSRLIBDIR)/libgmpxx.so.4.1.2 ; \
219N/A $(ELFEDIT) -e "dyn:runpath $(USRLIBDIR64)" \
219N/A $(PROTOUSRLIBDIR64)/libgmpxx.so.4.1.2 ; \
219N/A $(ELFEDIT) -e "dyn:rpath $(USRLIBDIR)" \
219N/A $(PROTOUSRLIBDIR)/libgmpxx.so.4.1.2 ; \
219N/A $(ELFEDIT) -e "dyn:rpath $(USRLIBDIR64)" \
219N/A $(PROTOUSRLIBDIR64)/libgmpxx.so.4.1.2 ; \
219N/A $(GSED) -e "s/MACH64/$(MACH64)/g" \
219N/A $(COMPONENT_DIR)/Solaris/libgmp-64.pc > $(COMPONENT_DIR)/libgmp.pc ; \
219N/A $(GSED) -e "s/MACH64/$(MACH64)/g" \
219N/A $(COMPONENT_DIR)/Solaris/libgmpxx-64.pc > \
219N/A $(COMPONENT_DIR)/libgmpxx.pc ; \
219N/A $(MV) $(PROTOUSRINCLUDEDIR)/gmp.h $(PROTOUSRINCLUDEDIR)/gmp/ ; \
219N/A $(MV) $(PROTOUSRINCLUDEDIR)/mp.h $(PROTOUSRINCLUDEDIR)/gmp/ ; \
219N/A $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/index.html \
219N/A $(PROTOUSRSHAREHTMLDIR)/ ; \
219N/A $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmp.pc \
219N/A $(PROTOPKGCONFIGDIR) ; \
219N/A $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmpxx.pc \
219N/A $(PROTOPKGCONFIGDIR) ; \
219N/A $(INSTALL) -m 0644 $(COMPONENT_DIR)/libgmp.pc \
219N/A $(PROTOPKGCONFIGDIR64) ; \
219N/A $(INSTALL) -m 0644 $(COMPONENT_DIR)/libgmpxx.pc \
219N/A $(PROTOPKGCONFIGDIR64) ; \
219N/A $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmp.3 \
219N/A $(PROTOUSRSHAREMAN3DIR)/ )
219N/A
219N/A# common targets
219N/Abuild: $(BUILD_32_and_64)
219N/A
219N/Ainstall: $(INSTALL_32_and_64)
219N/A
219N/Atest: $(TEST_32_and_64)
219N/A
219N/ABUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
219N/A
219N/Ainclude ../../make-rules/depend.mk
219N/A