Bump gmp to 6.1.2
[unleashed-userland.git] / components / mpfr / Makefile
blob3325273102e7cd0c6d2032434d0b94e1abdc24a0
1 # CDDL HEADER START
3 # The contents of this file are subject to the terms of the
4 # Common Development and Distribution License (the "License").
5 # You may not use this file except in compliance with the License.
7 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8 # or http://www.opensolaris.org/os/licensing.
9 # See the License for the specific language governing permissions
10 # and limitations under the License.
12 # When distributing Covered Code, include this CDDL HEADER in each
13 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
14 # If applicable, add the following below this CDDL HEADER, with the
15 # fields enclosed by brackets "[]" replaced with your own identifying
16 # information: Portions Copyright [yyyy] [name of copyright owner]
18 # CDDL HEADER END
22 # Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
25 include ../../make-rules/shared-macros.mk
27 PATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
29 COMPONENT_NAME= mpfr
30 COMPONENT_VERSION= 3.1.2
31 COMPONENT_PROJECT_URL= http://www.mpfr.org/
32 COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
33 COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.bz2
34 COMPONENT_ARCHIVE_HASH= \
35 sha256:79c73f60af010a30a5c27a955a1d2d01ba095b72537dab0ecaad57f5a7bb1b6b
36 COMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)$(COMPONENT_SRC)/$(COMPONENT_ARCHIVE)
37 COMPONENT_BUGDB= library/libmpfr
39 include ../../make-rules/prep.mk
40 include ../../make-rules/configure.mk
41 include ../../make-rules/ips.mk
43 CLOBBER_PATHS += libmpfr.pc
44 PATCH_LEVEL = 0
46 CFLAGS += $(CPP_C99_EXTENDED_MATH)
47 CFLAGS += -std=c99 $(CPP_XPG6MODE)
48 LDFLAGS += $(LD_Z_REDLOCSYM) $(LD_Z_RESCAN_NOW)
50 MPN32_i386 = x86/pentium x86 generic
51 MPN64_i386 = x86_64/pentium4 x86_64 generic
52 MPN32_sparc = sparc32/v9 sparc32 generic
53 MPN64_sparc = sparc64 generic
54 MPN32 = $(MPN32_$(MACH))
55 MPN64 = $(MPN64_$(MACH))
57 GMPINCDIR = /usr/include/gmp
58 GMPLIBDIR_32 = /usr/lib
59 GMPLIBDIR_64 = /usr/lib/$(MACH64)
60 MPFRMULHIGH = 2048
62 GSED = /usr/bin/gsed
64 CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"
65 CONFIGURE_ENV += LD="$(CC) $(CFLAGS) $(LDFLAGS)"
66 CONFIGURE_ENV += CPP="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
67 CONFIGURE_ENV += INSTALL="$(INSTALL)"
68 CONFIGURE_ENV += SED="$(GSED)"
69 CONFIGURE_ENV += ABI="$(BITS)"
70 CONFIGURE_ENV += "MPN_PATH=$(MPN_$(BITS))"
72 CONFIGURE_OPTIONS += --includedir=/usr/include/mpfr
73 CONFIGURE_OPTIONS += --localstatedir=/var
74 CONFIGURE_OPTIONS += --enable-shared
75 CONFIGURE_OPTIONS += --disable-static
76 CONFIGURE_OPTIONS += --disable-libtool-lock
77 CONFIGURE_OPTIONS += --enable-thread-safe
78 CONFIGURE_OPTIONS += --enable-tests-timeout=0
79 CONFIGURE_OPTIONS += --with-gmp-include=$(GMPINCDIR)
80 CONFIGURE_OPTIONS += --with-gmp-lib=$(GMPLIBDIR_$(BITS))
81 CONFIGURE_OPTIONS += --with-mulhigh-size=$(MPFRMULHIGH)
82 CONFIGURE_OPTIONS += --with-pic
84 LINT_FLAGS += -I/usr/include/gmp
86 PROTOUSRSHAREINFODIR = $(PROTOUSRSHAREDIR)/info
87 PROTOUSRSHAREHTMLDIR = $(PROTOUSRSHAREDIR)/doc/mpfr/html
88 PROTOUSRSHAREMAN3DIR = $(PROTOUSRSHAREDIR)/man/man3
89 PROTOUSRINCLUDEDIR = $(PROTOUSRDIR)/include
90 PROTOPKGCONFIGDIR = $(PROTOUSRLIBDIR)/pkgconfig
91 PROTOPKGCONFIGDIR64 = $(PROTOUSRLIBDIR64)/pkgconfig
93 COMPONENT_POST_INSTALL_ACTION = \
94 ( $(MKDIR) $(PROTOUSRSHAREHTMLDIR) ; \
95 $(MKDIR) $(PROTOUSRSHAREMAN3DIR) ; \
96 $(MKDIR) $(PROTOPKGCONFIGDIR) ; \
97 $(MKDIR) $(PROTOPKGCONFIGDIR64) ; \
98 $(GSED) -e "s^\#include <gmp.h>^\#include <gmp/gmp.h>^g" \
99 $(PROTOUSRINCLUDEDIR)/mpfr/mpfr.h > \
100 $(PROTOUSRINCLUDEDIR)/mpfr/mpfr.h.sed ; \
101 $(CP) -fp $(PROTOUSRINCLUDEDIR)/mpfr/mpfr.h.sed \
102 $(PROTOUSRINCLUDEDIR)/mpfr/mpfr.h ; \
103 $(RM) -f $(PROTOUSRINCLUDEDIR)/mpfr/mpfr.h.sed ; \
104 $(GSED) -e "s/MACH64/$(MACH64)/g" \
105 $(COMPONENT_DIR)/Solaris/libmpfr-64.pc > $(COMPONENT_DIR)/libmpfr.pc ; \
106 $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/index.html \
107 $(PROTOUSRSHAREHTMLDIR)/ ; \
108 $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libmpfr.pc \
109 $(PROTOPKGCONFIGDIR) ; \
110 $(INSTALL) -m 0644 $(COMPONENT_DIR)/libmpfr.pc \
111 $(PROTOPKGCONFIGDIR64) ; \
112 $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libmpfr.3 \
113 $(PROTOUSRSHAREMAN3DIR)/ )
115 # common targets
116 build: $(BUILD_32_and_64)
118 install: $(INSTALL_32_and_64)
120 test: $(TEST_32_and_64)
122 BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
124 include ../../make-rules/depend.mk