Makefile revision 5680
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley#
11e9368a226272085c337e9e74b79808c16fbdbaTinderbox User# CDDL HEADER START
75c0816e8295e180f4bc7f10db3d0d880383bc1cMark Andrews#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# The contents of this file are subject to the terms of the
4a14ce5ba00ab7bc55c99ffdcf59c7a4ab902721Automatic Updater# Common Development and Distribution License (the "License").
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# You may not use this file except in compliance with the License.
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# or http://www.opensolaris.org/os/licensing.
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# See the License for the specific language governing permissions
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# and limitations under the License.
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews#
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
8a66318e41ed14c5a88130e8c362610e8faa2121Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# fields enclosed by brackets "[]" replaced with your own identifying
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# information: Portions Copyright [yyyy] [name of copyright owner]
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# CDDL HEADER END
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark AndrewsBUILD_BITS= 64_and_32
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userinclude ../../make-rules/shared-macros.mk
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_NAME= pcre
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCOMPONENT_VERSION= 8.38
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_ARCHIVE_HASH= \
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein sha256:9883e419c336c63b0cb5202b09537c140966d585e4d0da66147dc513da13e629
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_ARCHIVE_URL= http://sourceforge.net/projects/pcre/files/pcre/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_ARCHIVE_URL= ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$(COMPONENT_ARCHIVE)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_PROJECT_URL= http://pcre.org/
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_BUGDB= library/pcre
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinTPNO= 25877
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeininclude $(WS_MAKE_RULES)/common.mk
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# pick up -xc99=all in CFLAGS
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeinstudio_C99MODE= $(studio_C99_ENABLE)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# pick up -xlang=c99 in XPG5MODE
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userstudio_cplusplus_C99MODE= $(studio_cplusplus_C99_ENABLE)
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox User
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox User# turn on largefile support
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox UserCFLAGS+= $(CPP_LARGEFILES)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox UserCFLAGS+= $(XPG6MODE)
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox User
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox User# Although -norunpath is set for CXXFLAGS, we need to put -norunpath
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox User# here, otherwise -norunpath doesn't get set when creating the shared
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# libraries (CC -G).
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCXX+= $(studio_NORUNPATH)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCXXFLAGS+= $(CC_PIC)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# turn on support for large files
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCXXFLAGS+= $(CPP_LARGEFILES)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCXXFLAGS+= $(XPG5MODE)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# We need to do this because libtool adds wrong paths to RPATH.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# LDFLAGS += -L$(CONFIGURE_LIBDIR.$(BITS)) -R$(CONFIGURE_LIBDIR.$(BITS))
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserLINTFLAGS+= -I. $(studio_XBITS) $(CPP_LARGEFILES)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_ENV+= "CPP=$(CC) $(CPPFLAGS) $(CFLAGS) -E"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_ENV+= "CXXCPP=$(CXX) $(CPPFLAGS) $(CXXFLAGS) -E"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_ENV+= "CXXLDFLAGS=$(LDFLAGS)"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_ENV+= "CXXLD=$(CXX) $(CXXFLAGS) $(LDFLAGS)"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_ENV+= "INSTALL=$(INSTALL)"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_ENV+= "MAKE=$(GMAKE)"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_ENV.64+= "CXXLINKLIB=$(CXX) $(CCFLAGS) $(LDFLAGS)"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_ENV.64+= "MACH64=$(MACH64)"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS+= --includedir=$(CONFIGURE_INCLUDEDIR)/pcre
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS+= --localstatedir=$(VARDIR)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_OPTIONS+= --disable-static
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS+= --enable-cpp
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS+= --enable-rebuild-chartables
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS+= --enable-utf8
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS+= --enable-unicode-properties
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS+= --enable-newline-is-any
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS+= --disable-stack-for-recursion
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS+= --enable-pcregrep-libz
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS+= --enable-pcregrep-libbz2
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS+= --with-posix-malloc-threshold=20
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_OPTIONS+= --with-link-size=4
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS+= --with-match-limit=10000000
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS+= --with-pic
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserCONFIGURE_OPTIONS.64+= --libexecdir=$(CONFIGURE_PREFIX)/libexec/$(MACH64)
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserCOMPONENT_BUILD_ENV+= "LDFLAGS=$(LDFLAGS)"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCOMPONENT_BUILD_ENV+= "INSTALL=$(INSTALL)"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_BUILD_ENV+= "MAKE=$(GMAKE)"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_BUILD_ARGS+= -e
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User# Master test results are the same for 32-bit and 64-bit, so override
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User# here, rather than create multiple identical master files.
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
d3ddafd7469d1f3430ccd1b0fe0d13ccbbaf5debTinderbox UserCOMPONENT_TEST_TRANSFORMS += \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User '-e "s|Testsuite summary for PCRE .*|Testsuite summary for PCRE|" '
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserASLR_MODE = $(ASLR_ENABLE)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
6d45011a65dfc43f476ca15c3fd9ee5227eb968fTinderbox UserCOMPONENT_INSTALL_ARGS+= "INSTALL=$(INSTALL)"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_INSTALL_ARGS+= "MAKE=$(GMAKE)"
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserREQUIRED_PACKAGES += compress/bzip2
6d45011a65dfc43f476ca15c3fd9ee5227eb968fTinderbox UserREQUIRED_PACKAGES += library/zlib
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserREQUIRED_PACKAGES += shell/ksh93
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinREQUIRED_PACKAGES += system/library/c++-runtime
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User