Makefile revision 5228
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
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson#
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein#
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude ../../make-rules/shared-macros.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_NAME= pcre
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_VERSION= 8.38
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
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_PROJECT_URL= http://pcre.org/
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_BUGDB= library/pcre
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinTPNO= 25877
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude $(WS_MAKE_RULES)/prep.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude $(WS_MAKE_RULES)/configure.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude $(WS_MAKE_RULES)/ips.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude $(WS_MAKE_RULES)/lint-libraries.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
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinstudio_cplusplus_C99MODE= $(studio_cplusplus_C99_ENABLE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# turn on largefile support
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCFLAGS+= $(CPP_LARGEFILES)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCFLAGS+= $(XPG6MODE)
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# Although -norunpath is set for CXXFLAGS, we need to put -norunpath
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# here, otherwise -norunpath doesn't get set when creating the shared
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# libraries (CC -G).
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCXX+= $(studio_NORUNPATH)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCXXFLAGS+= $(CC_PIC)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# turn on support for large files
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCXXFLAGS+= $(CPP_LARGEFILES)
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCXXFLAGS+= $(XPG5MODE)
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson# We need to do this because libtool adds wrong paths to RPATH.
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinLDFLAGS += -L$(CONFIGURE_LIBDIR.$(BITS)) -R$(CONFIGURE_LIBDIR.$(BITS))
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonLINTFLAGS+= -I. $(studio_XBITS) $(CPP_LARGEFILES)
ddccd5811feff696ba460dabfb666ce61040f545Andreas Gustafsson
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_ENV+= "CC=$(CC)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_ENV+= "CFLAGS=$(CFLAGS)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_ENV+= "CPP=$(CC) $(CPPFLAGS) $(CFLAGS) -E"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_ENV+= "CXX=$(CXX)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_ENV+= "CXXFLAGS=$(CXXFLAGS)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_ENV+= "CXXCPP=$(CXX) $(CPPFLAGS) $(CXXFLAGS) -E"
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas GustafssonCONFIGURE_ENV+= "LDFLAGS=$(LDFLAGS)"
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas GustafssonCONFIGURE_ENV+= "CXXLDFLAGS=$(LDFLAGS)"
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas GustafssonCONFIGURE_ENV+= "CXXLD=$(CXX) $(CXXFLAGS) $(LDFLAGS)"
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas GustafssonCONFIGURE_ENV+= "INSTALL=$(INSTALL)"
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas GustafssonCONFIGURE_ENV+= "MAKE=$(GMAKE)"
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas GustafssonCONFIGURE_ENV.64+= "CXXLINKLIB=$(CXX) $(CCFLAGS) $(LDFLAGS)"
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas GustafssonCONFIGURE_ENV.64+= "MACH64=$(MACH64)"
8eea877894ea5bcf5cdd9ca124a8601ad421d753Andreas Gustafsson
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCONFIGURE_OPTIONS+= --includedir=$(CONFIGURE_INCLUDEDIR)/pcre
ddccd5811feff696ba460dabfb666ce61040f545Andreas GustafssonCONFIGURE_OPTIONS+= --localstatedir=/var
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --disable-static
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --enable-cpp
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --enable-rebuild-chartables
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --enable-utf8
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --enable-unicode-properties
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --enable-newline-is-any
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --disable-stack-for-recursion
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --enable-pcregrep-libz
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_OPTIONS+= --enable-pcregrep-libbz2
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCONFIGURE_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)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
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 AusteinASLR_MODE = $(ASLR_ENABLE)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_INSTALL_ARGS+= "INSTALL=$(INSTALL)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_INSTALL_ARGS+= "MAKE=$(GMAKE)"
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# common targets
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeinbuild: $(BUILD_32_and_64)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininstall: $(INSTALL_32_and_64)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeintest: $(TEST_32_and_64)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += compress/bzip2
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += library/zlib
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += shell/ksh93
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/library
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/library/c++-runtime
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein