Makefile revision 6479
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# CDDL HEADER START
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# The contents of this file are subject to the terms of the
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# Common Development and Distribution License (the "License").
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# You may not use this file except in compliance with the License.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# or http://www.opensolaris.org/os/licensing.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# See the License for the specific language governing permissions
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# and limitations under the License.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# CDDL HEADER END
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinBUILD_BITS= 64_and_32
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude ../../make-rules/shared-macros.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_NAME= pcre
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_VERSION= 8.38
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_ARCHIVE_HASH= \
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein sha256:9883e419c336c63b0cb5202b09537c140966d585e4d0da66147dc513da13e629
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_ARCHIVE_URL= http://sourceforge.net/projects/pcre/files/pcre/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_ARCHIVE_URL= ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$(COMPONENT_ARCHIVE)
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas GustafssonCOMPONENT_PROJECT_URL= http://pcre.org/
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_BUGDB= library/pcre
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinTPNO= 25877
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude $(WS_MAKE_RULES)/common.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# pick up -xc99=all in CFLAGS
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinstudio_C99MODE= $(studio_C99_ENABLE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# pick up -xlang=c99 in XPG5MODE
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrewsstudio_cplusplus_C99MODE= $(studio_cplusplus_C99_ENABLE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# turn on largefile support
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas GustafssonCFLAGS+= $(CPP_LARGEFILES)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCFLAGS+= $(XPG6MODE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Although -norunpath is set for CXXFLAGS, we need to put -norunpath
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# here, otherwise -norunpath doesn't get set when creating the shared
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# libraries (CC -G).
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCXX+= $(studio_NORUNPATH)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCXXFLAGS+= $(CC_PIC)
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# turn on support for large files
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCXXFLAGS+= $(CPP_LARGEFILES)
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCXXFLAGS+= $(XPG5MODE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinLINT_FLAGS+= $(CPP_LARGEFILES)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_ENV+= "CPP=$(CC) $(CPPFLAGS) $(CFLAGS) -E"
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCONFIGURE_ENV+= "CXXCPP=$(CXX) $(CPPFLAGS) $(CXXFLAGS) -E"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_ENV+= "CXXLDFLAGS=$(LDFLAGS)"
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCONFIGURE_ENV+= "CXXLD=$(CXX) $(CXXFLAGS) $(LDFLAGS)"
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCONFIGURE_ENV+= "INSTALL=$(INSTALL)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_ENV+= "MAKE=$(GMAKE)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_ENV.64+= "CXXLINKLIB=$(CXX) $(CCFLAGS) $(LDFLAGS)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_ENV.64+= "MACH64=$(MACH64)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCONFIGURE_OPTIONS+= --includedir=$(CONFIGURE_INCLUDEDIR)/pcre
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --localstatedir=$(VARDIR)
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCONFIGURE_OPTIONS+= --disable-static
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCONFIGURE_OPTIONS+= --enable-cpp
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --enable-rebuild-chartables
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --enable-utf8
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCONFIGURE_OPTIONS+= --enable-unicode-properties
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --enable-newline-is-any
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas GustafssonCONFIGURE_OPTIONS+= --disable-stack-for-recursion
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --enable-pcregrep-libz
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --enable-pcregrep-libbz2
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas GustafssonCONFIGURE_OPTIONS+= --with-posix-malloc-threshold=20
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --with-link-size=4
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --with-match-limit=10000000
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --with-pic
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS.64+= --libexecdir=$(CONFIGURE_PREFIX)/libexec/$(MACH64)
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_BUILD_ENV+= "LDFLAGS=$(LDFLAGS)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_BUILD_ENV+= "INSTALL=$(INSTALL)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_BUILD_ENV+= "MAKE=$(GMAKE)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_BUILD_ARGS+= -e
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# Master test results are the same for 32-bit and 64-bit, so override
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson# here, rather than create multiple identical master files.
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas GustafssonCOMPONENT_TEST_MASTER = $(COMPONENT_TEST_RESULTS_DIR)/results-all.master
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas GustafssonCOMPONENT_TEST_TRANSFORMS += \
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson '-e "s|Testsuite summary for PCRE .*|Testsuite summary for PCRE|" '
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonASLR_MODE = $(ASLR_ENABLE)
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCOMPONENT_INSTALL_ARGS+= "INSTALL=$(INSTALL)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_INSTALL_ARGS+= "MAKE=$(GMAKE)"
86b0285d7e65601645db4090d62ee6cb63abad6cAndreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += compress/bzip2
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += library/zlib
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += shell/ksh93
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/library/c++-runtime
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein