Makefile revision 1273
3946N/A# CDDL HEADER START
3946N/A#
3946N/A# The contents of this file are subject to the terms of the
3946N/A# Common Development and Distribution License (the "License").
3946N/A# You may not use this file except in compliance with the License.
3946N/A#
3946N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3946N/A# or http://www.opensolaris.org/os/licensing.
3946N/A# See the License for the specific language governing permissions
3946N/A# and limitations under the License.
3946N/A#
3946N/A# When distributing Covered Code, include this CDDL HEADER in each
3946N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3946N/A# If applicable, add the following below this CDDL HEADER, with the
3946N/A# fields enclosed by brackets "[]" replaced with your own identifying
3946N/A# information: Portions Copyright [yyyy] [name of copyright owner]
3946N/A#
3946N/A# CDDL HEADER END
3946N/A#
3946N/A
3946N/A#
3946N/A# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3996N/A#
3996N/A
3946N/Ainclude ../../make-rules/shared-macros.mk
3946N/A
3946N/APATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
3946N/A
3946N/ACOMPONENT_NAME= mpfr
3946N/ACOMPONENT_VERSION= 2.4.2
3946N/ACOMPONENT_PROJECT_URL= http://www.mpfr.org/
3946N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
3946N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
3946N/ACOMPONENT_ARCHIVE_HASH= \
3946N/A sha256:246d7e184048b1fc48d3696dd302c9774e24e921204221540745e5464022b637
3946N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
3946N/ACOMPONENT_BUGDB= library/libmpfr
3946N/A
3946N/Ainclude ../../make-rules/prep.mk
3946N/Ainclude ../../make-rules/configure.mk
3946N/Ainclude ../../make-rules/ips.mk
3946N/Ainclude ../../make-rules/lint-libraries.mk
3946N/A
3946N/ACLOBBER_PATHS += libmpfr.pc
3946N/APATCH_LEVEL = 0
3946N/A
3946N/ACFLAGS += -features=extinl,extensions
3946N/ACFLAGS += -xustr=ascii_utf16_ushort -xcsi
3946N/A# -xthreadvar=%all: allow thread-local storage via __thread
3946N/A# qualifier for all types of variables (global, static and dynamic)
3946N/ACFLAGS += -xthreadvar=%all -mt $(CPP_C99_EXTENDED_MATH)
3946N/ACFLAGS += $(studio_C99_ENABLE) $(CPP_XPG6MODE)
3946N/ACFLAGS += $(studio_PIC)
3946N/ALDFLAGS += $(LD_Z_REDLOCSYM) $(LD_Z_RESCAN_NOW)
3946N/A
3946N/AMPN32_i386 = x86/pentium x86 generic
3946N/AMPN64_i386 = x86_64/pentium4 x86_64 generic
3946N/AMPN32_sparc = sparc32/v9 sparc32 generic
3946N/AMPN64_sparc = sparc64 generic
3946N/AMPN32 = $(MPN32_$(MACH))
3946N/AMPN64 = $(MPN64_$(MACH))
3946N/A
3946N/AGMPINCDIR = /usr/include/gmp
3946N/AGMPLIBDIR_32 = /usr/lib
3946N/AGMPLIBDIR_64 = /usr/lib/$(MACH64)
3946N/AMPFRMULHIGH = 2048
3946N/A
3946N/AGSED = /usr/bin/gsed
3946N/A
3946N/ACONFIGURE_ENV += CC="$(CC)"
3946N/ACONFIGURE_ENV += CFLAGS="$(CFLAGS)"
3946N/ACONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"
3946N/ACONFIGURE_ENV += LD="$(CC) $(CFLAGS) $(LDFLAGS)"
3946N/ACONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
3946N/ACONFIGURE_ENV += CPP="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
3946N/ACONFIGURE_ENV += INSTALL="$(INSTALL)"
3946N/ACONFIGURE_ENV += SED="$(GSED)"
3946N/ACONFIGURE_ENV += ABI="$(BITS)"
3946N/ACONFIGURE_ENV += "MPN_PATH=$(MPN_$(BITS))"
3946N/A
3946N/ACONFIGURE_OPTIONS += --includedir=/usr/include/mpfr
3946N/ACONFIGURE_OPTIONS += --localstatedir=/var
3946N/ACONFIGURE_OPTIONS += --enable-shared
3946N/ACONFIGURE_OPTIONS += --disable-static
3946N/ACONFIGURE_OPTIONS += --disable-libtool-lock
3946N/ACONFIGURE_OPTIONS += --enable-thread-safe
3946N/ACONFIGURE_OPTIONS += --enable-tests-timeout=0
3946N/ACONFIGURE_OPTIONS += --with-gmp-include=$(GMPINCDIR)
3946N/ACONFIGURE_OPTIONS += --with-gmp-lib=$(GMPLIBDIR_$(BITS))
3946N/ACONFIGURE_OPTIONS += --with-mulhigh-size=$(MPFRMULHIGH)
3946N/ACONFIGURE_OPTIONS += --with-pic
3946N/A
3946N/ALINT_FLAGS += -I/usr/include/gmp
3946N/A
3946N/APROTOUSRSHAREINFODIR = $(PROTOUSRSHAREDIR)/info
3946N/APROTOUSRSHAREHTMLDIR = $(PROTOUSRSHAREDIR)/doc/mpfr/html
3946N/APROTOUSRSHAREMAN3DIR = $(PROTOUSRSHAREDIR)/man/man3
3996N/APROTOUSRINCLUDEDIR = $(PROTOUSRDIR)/include
3996N/APROTOPKGCONFIGDIR = $(PROTOUSRLIBDIR)/pkgconfig
3996N/APROTOPKGCONFIGDIR64 = $(PROTOUSRLIBDIR64)/pkgconfig
3996N/A
3996N/ACOMPONENT_POST_INSTALL_ACTION = \
3996N/A ( $(MKDIR) $(PROTOUSRSHAREHTMLDIR) ; \
3996N/A $(MKDIR) $(PROTOUSRSHAREMAN3DIR) ; \
3996N/A $(MKDIR) $(PROTOPKGCONFIGDIR) ; \
3996N/A $(MKDIR) $(PROTOPKGCONFIGDIR64) ; \
$(GSED) -e "s^\#include <gmp.h>^\#include <gmp/gmp.h>^g" \
$(PROTOUSRINCLUDEDIR)/mpfr/mpfr.h > \
$(PROTOUSRINCLUDEDIR)/mpfr/mpfr.h.sed ; \
$(CP) -fp $(PROTOUSRINCLUDEDIR)/mpfr/mpfr.h.sed \
$(PROTOUSRINCLUDEDIR)/mpfr/mpfr.h ; \
$(RM) -f $(PROTOUSRINCLUDEDIR)/mpfr/mpfr.h.sed ; \
$(GSED) -e "s/MACH64/$(MACH64)/g" \
$(COMPONENT_DIR)/Solaris/libmpfr-64.pc > $(COMPONENT_DIR)/libmpfr.pc ; \
$(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/index.html \
$(PROTOUSRSHAREHTMLDIR)/ ; \
$(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libmpfr.pc \
$(PROTOPKGCONFIGDIR) ; \
$(INSTALL) -m 0644 $(COMPONENT_DIR)/libmpfr.pc \
$(PROTOPKGCONFIGDIR64) ; \
$(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libmpfr.3 \
$(PROTOUSRSHAREMAN3DIR)/ )
# common targets
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_64)
test: $(TEST_32_and_64)
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include ../../make-rules/depend.mk