Makefile revision 219
436aad11e01e916f75e68a2e9cb89ac217a990d3Tinderbox User# CDDL HEADER START
6fe48fb46e53ffc37542853a1edb74cb481b7d94Automatic Updater#
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox User# The contents of this file are subject to the terms of the
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox User# Common Development and Distribution License (the "License").
a5636b773fa05a272b6876afd99309c0b3090e2fMark Andrews# You may not use this file except in compliance with the License.
e9e4257668ff6c4e583b0c0db2508650b0b677b8Tinderbox User#
e9e4257668ff6c4e583b0c0db2508650b0b677b8Tinderbox User# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c57668a2fbbe558c1bd21652813616f2f517c469Tinderbox User# or http://www.opensolaris.org/os/licensing.
5e047890ac9b745db060d95f7d1b4f876511240dTinderbox User# See the License for the specific language governing permissions
137fdbc214e99c4cbe57551e9e14f2015c2e42aeTinderbox User# and limitations under the License.
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox User#
bed0874e1a09e810575328c4bfc346a47514b69fMark Andrews# When distributing Covered Code, include this CDDL HEADER in each
02b47c5d62e1e827743684c28a08e871da454a2dMark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User# If applicable, add the following below this CDDL HEADER, with the
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
e20309353e6246485c521278131d3fced73d7957Tinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
e20309353e6246485c521278131d3fced73d7957Tinderbox User#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# CDDL HEADER END
9a5217f827ac0e006016745e5305b31dc0c7767fTinderbox User#
3cc98b8ecedcbc8465f1cf2740b966b315662430Automatic Updater
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews#
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
e20309353e6246485c521278131d3fced73d7957Tinderbox User#
e20309353e6246485c521278131d3fced73d7957Tinderbox User
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrewsinclude ../../make-rules/shared-macros.mk
df4ebd8217d02dafc12145b55c4d93d0255d1ec7Tinderbox User
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsPATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCOMPONENT_NAME= gmp
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_VERSION= 4.3.2
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCOMPONENT_ARCHIVE_HASH= sha1:223c3c89ad98c62e5b8335a75ef37e8241f9bbb0
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox UserCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/gmp/$(COMPONENT_ARCHIVE)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Huntinclude ../../make-rules/prep.mk
e130ab53e992670e2a2ecf043976ac09f21358d1Automatic Updaterinclude ../../make-rules/configure.mk
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updaterinclude ../../make-rules/ips.mk
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Huntinclude ../../make-rules/lint-libraries.mk
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
24934f08b9ff81c2be711e566e8002d145573031Tinderbox UserPATCH_LEVEL = 0
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan HuntCFLAGS += -features=extinl,extensions
24934f08b9ff81c2be711e566e8002d145573031Tinderbox UserCFLAGS += -xustr=ascii_utf16_ushort -xcsi
e9e4257668ff6c4e583b0c0db2508650b0b677b8Tinderbox User# -xthreadvar=%all: allow thread-local storage via __thread
aa9c561961e9d877946ebaa8795fa2be054ab7bfEvan Hunt# qualifier for all types of variables (global, static and dynamic)
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox UserCFLAGS += -xthreadvar=%all $(CPP_C99_EXTENDED_MATH)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCFLAGS += $(studio_C99_ENABLE) $(CPP_XPG6MODE)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCFLAGS += $(studio_PIC)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCXXFLAGS = -mt -features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic UpdaterCXXFLAGS += -instances=global -template=geninlinefuncs -verbose=template
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic UpdaterCXXFLAGS += -xbuiltin=%none -xinline=%auto -xlibmil
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCXXFLAGS += -xustr=ascii_utf16_ushort -xlibmopt
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCXXFLAGS += $(studio_cplusplus_C99_ENABLE) $(studio_PIC)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic UpdaterCXXFLAGS += $(CPP_XPG5MODE)
9513a2a6670951f5cf5477fcfec9f933fcaff628Automatic Updater# -Qoption ccfe -features=zla: allow VLA/ZLA in C++ (like in C99)
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark AndrewsCXXFLAGS += -Qoption ccfe -features=zla
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark AndrewsCXXFLAGS += -xF=%none -xthreadvar=%all
eabc9c3c07cd956d3c436bd7614cb162dabdda76Mark AndrewsCPPFLAGS += $(CPP_POSIX) $(CPP_LARGEFILES)
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox UserLDFLAGS += $(LD_Z_REDLOCSYM) $(LD_Z_RESCAN_NOW)
e20309353e6246485c521278131d3fced73d7957Tinderbox User
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# assembler detection for GNU MP and GNU MPFR is done via MPN_PATH
24934f08b9ff81c2be711e566e8002d145573031Tinderbox User# at ./configure time. GNU MPFR wants to know GNU MP's MPN_PATH.
e20309353e6246485c521278131d3fced73d7957Tinderbox UserMPN32_i386 = x86/pentium x86 generic
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsMPN64_i386 = x86_64/pentium4 x86_64 generic
7feccf248d2a20a2ae48b290f58ded5abc853e9aTinderbox UserMPN32_sparc = sparc32/v9 sparc32 generic
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsMPN64_sparc = sparc64 generic
c59750de3ea3c7d5890000fb4606e8f5835a52aaTinderbox UserMPN_32 = $(MPN32_$(MACH))
80faf1588895fd26490f82f95a7a1b771df1c324Automatic UpdaterMPN_64 = $(MPN64_$(MACH))
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsGM4 = /usr/bin/gm4
ec7751119a08c6a7250f3187beed69a8b836d349Tinderbox UserGSED = /usr/bin/gsed
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# libgmpxx.so.4 always gets built with unnecessary paths in RUNPATH/RPATH
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark AndrewsELFEDIT = /usr/bin/elfedit
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark Andrews
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCONFIGURE_ENV += CC="$(CC)"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_ENV += CXX="$(CXX)"
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_ENV += CFLAGS="$(CFLAGS)"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_ENV += CXXFLAGS="$(CC_BITS) $(CXXFLAGS)"
efb0e886f18894a1d2489f1ad74ad14b579e11c7Mark AndrewsCONFIGURE_ENV += LD="$(CC) $(CFLAGS) $(LDFLAGS)"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_ENV += CXXLD="$(CXX) $(CC_BITS) $(CXXFLAGS) $(LDFLAGS)"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_ENV += CPP="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_ENV += CPP_FOR_BUILD="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_ENV += CXXCPP="$(CXX) $(CC_BITS) $(CPPFLAGS) $(CXXFLAGS) -E"
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic UpdaterCONFIGURE_ENV += INSTALL="$(INSTALL)"
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark AndrewsCONFIGURE_ENV += CC_FOR_BUILD="$(CC) $(CPPFLAGS) $(CFLAGS)"
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark AndrewsCONFIGURE_ENV += M4="$(GM4)"
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark AndrewsCONFIGURE_ENV += SED="$(GSED)"
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox UserCONFIGURE_ENV += ABI="$(BITS)"
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox UserCONFIGURE_ENV += "MPN_PATH=$(MPN_$(BITS))"
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark Andrews
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark AndrewsCONFIGURE_OPTIONS += --includedir=/usr/include/gmp
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark AndrewsCONFIGURE_OPTIONS += --localstatedir=/var
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark AndrewsCONFIGURE_OPTIONS += --enable-shared
28a5dd720187fddb16055a0f64b63a7b66f29f64Mark AndrewsCONFIGURE_OPTIONS += --disable-static
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCONFIGURE_OPTIONS += --disable-libtool-lock
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox UserCONFIGURE_OPTIONS += --disable-alloca
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox UserCONFIGURE_OPTIONS += --enable-cxx
2a31bd531072824ef252c18303859d6af7451b00Francis DupontCONFIGURE_OPTIONS += --enable-fft
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark AndrewsCONFIGURE_OPTIONS += --enable-mpbsd
2ba8f584b97cbab864570e38fd26b8cb90961428Tinderbox UserCONFIGURE_OPTIONS += --disable-fat
3349f0044fda807e1fd6681c833d3593a22dad86Tinderbox UserCONFIGURE_OPTIONS += --with-pic
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark AndrewsPROTOUSRSHAREINFODIR = $(PROTOUSRSHAREDIR)/info
bed0874e1a09e810575328c4bfc346a47514b69fMark AndrewsPROTOUSRSHAREHTMLDIR = $(PROTOUSRSHAREDIR)/doc/gmp/html
24bf1e02f03577db0feb50b80238c4150c96d05dAutomatic UpdaterPROTOUSRSHAREMAN3DIR = $(PROTOUSRSHAREDIR)/man/man3
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark AndrewsPROTOUSRINCLUDEDIR = $(PROTOUSRDIR)/include
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark AndrewsPROTOPKGCONFIGDIR = $(PROTOUSRLIBDIR)/pkgconfig
2ba8f584b97cbab864570e38fd26b8cb90961428Tinderbox UserPROTOPKGCONFIGDIR64 = $(PROTOUSRLIBDIR64)/pkgconfig
a308b69ac66fadf66863484f301314d6e6a3f1d2Automatic Updater
78f3ed4bc2fcd3d270bfd599804f3b27a1db4d91Mark AndrewsCOMPONENT_POST_INSTALL_ACTION = \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews ( $(MKDIR) $(PROTOUSRSHAREHTMLDIR) ; \
551271d8198ae06e37edf5da519d8ee153eeac0fTinderbox User $(MKDIR) $(PROTOUSRSHAREMAN3DIR) ; \
27c3c21f41520e8d6336d80a8094389e321cb6d2Mark Andrews $(MKDIR) $(PROTOPKGCONFIGDIR) ; \
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews $(MKDIR) $(PROTOPKGCONFIGDIR64) ; \
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrews $(ELFEDIT) -e "dyn:runpath $(USRLIBDIR)" \
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrews $(PROTOUSRLIBDIR)/libgmpxx.so.4.1.2 ; \
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrews $(ELFEDIT) -e "dyn:runpath $(USRLIBDIR64)" \
01a5c5503482fb3ba52088bf0178a7213273bf96Mark Andrews $(PROTOUSRLIBDIR64)/libgmpxx.so.4.1.2 ; \
551271d8198ae06e37edf5da519d8ee153eeac0fTinderbox User $(ELFEDIT) -e "dyn:rpath $(USRLIBDIR)" \
b871c7156eb037d41f53828c6fcb9cc876128962Mark Andrews $(PROTOUSRLIBDIR)/libgmpxx.so.4.1.2 ; \
df4ebd8217d02dafc12145b55c4d93d0255d1ec7Tinderbox User $(ELFEDIT) -e "dyn:rpath $(USRLIBDIR64)" \
cdfc81e048bd34c1d628380247bda6b80a89e20eAutomatic Updater $(PROTOUSRLIBDIR64)/libgmpxx.so.4.1.2 ; \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(GSED) -e "s/MACH64/$(MACH64)/g" \
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater $(COMPONENT_DIR)/Solaris/libgmp-64.pc > $(COMPONENT_DIR)/libgmp.pc ; \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(GSED) -e "s/MACH64/$(MACH64)/g" \
fa0326cc2cf428f67575b6ba3b97b528a31b0010Tinderbox User $(COMPONENT_DIR)/Solaris/libgmpxx-64.pc > \
fa0326cc2cf428f67575b6ba3b97b528a31b0010Tinderbox User $(COMPONENT_DIR)/libgmpxx.pc ; \
fa0326cc2cf428f67575b6ba3b97b528a31b0010Tinderbox User $(MV) $(PROTOUSRINCLUDEDIR)/gmp.h $(PROTOUSRINCLUDEDIR)/gmp/ ; \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(MV) $(PROTOUSRINCLUDEDIR)/mp.h $(PROTOUSRINCLUDEDIR)/gmp/ ; \
fe80a4909bf62b602feaf246866e9d29f7654194Automatic Updater $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/index.html \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(PROTOUSRSHAREHTMLDIR)/ ; \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmp.pc \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(PROTOPKGCONFIGDIR) ; \
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmpxx.pc \
aa1d397c4736cd86540555193d71e55fa3b37b2aMark Andrews $(PROTOPKGCONFIGDIR) ; \
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson $(INSTALL) -m 0644 $(COMPONENT_DIR)/libgmp.pc \
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater $(PROTOPKGCONFIGDIR64) ; \
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater $(INSTALL) -m 0644 $(COMPONENT_DIR)/libgmpxx.pc \
dd65eb1efb40b1c47d57963192bfc54873b219beAutomatic Updater $(PROTOPKGCONFIGDIR64) ; \
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libgmp.3 \
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater $(PROTOUSRSHAREMAN3DIR)/ )
133e6d43fa82e80d3798be4de00f4540f485ec6cAutomatic Updater
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater# common targets
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssonbuild: $(BUILD_32_and_64)
f2770f6b39a9b2a98afb7a11ed105f73f1570c1eAutomatic Updater
5f7586ddbd3edd11272cdd30ed613d936129328bTinderbox Userinstall: $(INSTALL_32_and_64)
5f7586ddbd3edd11272cdd30ed613d936129328bTinderbox User
5f7586ddbd3edd11272cdd30ed613d936129328bTinderbox Usertest: $(TEST_32_and_64)
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User
8e5fce1f9ceba17dd7e3ff0eb287e1e999c14249Mark AndrewsBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
b886b04d8d2b085cbf3e1bf4442dee87f43ba5e4Tinderbox User
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox Userinclude ../../make-rules/depend.mk
c7ef13f6c9ef4436bc804b150e0a93307b11fa27Tinderbox User
710bce1a85c96e85ca1a90471382055acd29d51fTinderbox User