Makefile revision 4581
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# CDDL HEADER START
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# The contents of this file are subject to the terms of the
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Common Development and Distribution License (the "License").
199767f8919635c4928607450d9e0abb932109ceToomas Soome# You may not use this file except in compliance with the License.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
199767f8919635c4928607450d9e0abb932109ceToomas Soome# or http://www.opensolaris.org/os/licensing.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# See the License for the specific language governing permissions
199767f8919635c4928607450d9e0abb932109ceToomas Soome# and limitations under the License.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# When distributing Covered Code, include this CDDL HEADER in each
199767f8919635c4928607450d9e0abb932109ceToomas Soome# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
199767f8919635c4928607450d9e0abb932109ceToomas Soome# If applicable, add the following below this CDDL HEADER, with the
199767f8919635c4928607450d9e0abb932109ceToomas Soome# fields enclosed by brackets "[]" replaced with your own identifying
199767f8919635c4928607450d9e0abb932109ceToomas Soome# information: Portions Copyright [yyyy] [name of copyright owner]
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# CDDL HEADER END
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
199767f8919635c4928607450d9e0abb932109ceToomas Soome#
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomeinclude ../../make-rules/shared-macros.mk
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCOMPONENT_NAME= pcre
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCOMPONENT_VERSION= 8.37
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCOMPONENT_ARCHIVE_HASH= \
199767f8919635c4928607450d9e0abb932109ceToomas Soome sha256:19d490a714274a8c4c9d131f651489b8647cdb40a159e9fb7ce17ba99ef992ab
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCOMPONENT_ARCHIVE_URL= http://sourceforge.net/projects/pcre/files/pcre/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCOMPONENT_PROJECT_URL= http://pcre.org/
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCOMPONENT_BUGDB= library/pcre
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeTPNO= 23018
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soomeinclude $(WS_MAKE_RULES)/prep.mk
199767f8919635c4928607450d9e0abb932109ceToomas Soomeinclude $(WS_MAKE_RULES)/configure.mk
199767f8919635c4928607450d9e0abb932109ceToomas Soomeinclude $(WS_MAKE_RULES)/ips.mk
199767f8919635c4928607450d9e0abb932109ceToomas Soomeinclude $(WS_MAKE_RULES)/lint-libraries.mk
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome# pick up -xc99=all in CFLAGS
199767f8919635c4928607450d9e0abb932109ceToomas Soomestudio_C99MODE= $(studio_C99_ENABLE)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome# pick up -xlang=c99 in XPG5MODE
199767f8919635c4928607450d9e0abb932109ceToomas Soomestudio_cplusplus_C99MODE= $(studio_cplusplus_C99_ENABLE)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome# turn on largefile support
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS+= $(CPP_LARGEFILES)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCFLAGS+= $(XPG6MODE)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome# Although -norunpath is set for CXXFLAGS, we need to put -norunpath
199767f8919635c4928607450d9e0abb932109ceToomas Soome# here, otherwise -norunpath doesn't get set when creating the shared
199767f8919635c4928607450d9e0abb932109ceToomas Soome# libraries (CC -G).
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCXX+= $(studio_NORUNPATH)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCXXFLAGS+= $(CC_PIC)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome# turn on support for large files
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCXXFLAGS+= $(CPP_LARGEFILES)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCXXFLAGS+= $(XPG5MODE)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas Soome# We need to do this because libtool adds wrong paths to RPATH.
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLDFLAGS += -L$(CONFIGURE_LIBDIR.$(BITS)) -R$(CONFIGURE_LIBDIR.$(BITS))
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeLINTFLAGS+= -I. $(studio_XBITS) $(CPP_LARGEFILES)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_ENV+= "CC=$(CC)"
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_ENV+= "CFLAGS=$(CFLAGS)"
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_ENV+= "CPP=$(CC) $(CPPFLAGS) $(CFLAGS) -E"
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_ENV+= "CXX=$(CXX)"
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_ENV+= "CXXFLAGS=$(CXXFLAGS)"
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_ENV+= "CXXCPP=$(CXX) $(CPPFLAGS) $(CXXFLAGS) -E"
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_ENV+= "LDFLAGS=$(LDFLAGS)"
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_ENV+= "CXXLDFLAGS=$(LDFLAGS)"
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_ENV+= "CXXLD=$(CXX) $(CXXFLAGS) $(LDFLAGS)"
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_ENV+= "INSTALL=$(INSTALL)"
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_ENV+= "MAKE=$(GMAKE)"
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_ENV.64+= "CXXLINKLIB=$(CXX) $(CCFLAGS) $(LDFLAGS)"
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_ENV.64+= "MACH64=$(MACH64)"
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --includedir=$(CONFIGURE_INCLUDEDIR)/pcre
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --localstatedir=/var
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --disable-static
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --enable-cpp
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --enable-rebuild-chartables
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --enable-utf8
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --enable-unicode-properties
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --enable-newline-is-any
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --disable-stack-for-recursion
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --enable-pcregrep-libz
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --enable-pcregrep-libbz2
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --with-posix-malloc-threshold=20
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --with-link-size=4
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --with-match-limit=10000000
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS+= --with-pic
199767f8919635c4928607450d9e0abb932109ceToomas Soome
199767f8919635c4928607450d9e0abb932109ceToomas SoomeCONFIGURE_OPTIONS.64+= --libexecdir=$(CONFIGURE_PREFIX)/libexec/$(MACH64)
199767f8919635c4928607450d9e0abb932109ceToomas Soome
COMPONENT_BUILD_ENV+= "LDFLAGS=$(LDFLAGS)"
COMPONENT_BUILD_ENV+= "INSTALL=$(INSTALL)"
COMPONENT_BUILD_ENV+= "MAKE=$(GMAKE)"
COMPONENT_BUILD_ARGS+= -e
ASLR_MODE = $(ASLR_ENABLE)
COMPONENT_INSTALL_ARGS+= "INSTALL=$(INSTALL)"
COMPONENT_INSTALL_ARGS+= "MAKE=$(GMAKE)"
# common targets
build: $(BUILD_32_and_64)
install: $(INSTALL_32_and_64)
test: $(TEST_32_and_64)
REQUIRED_PACKAGES += compress/bzip2
REQUIRED_PACKAGES += library/zlib
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/library
REQUIRED_PACKAGES += system/library/c++-runtime