Makefile revision 230
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER START
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# The contents of this file are subject to the terms of the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Common Development and Distribution License (the "License").
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri Pankov# You may not use this file except in compliance with the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# or http://www.opensolaris.org/os/licensing.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# See the License for the specific language governing permissions
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# and limitations under the License.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# When distributing Covered Code, include this CDDL HEADER in each
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# If applicable, add the following below this CDDL HEADER, with the
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# fields enclosed by brackets "[]" replaced with your own identifying
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# information: Portions Copyright [yyyy] [name of copyright owner]
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# CDDL HEADER END
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe#
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude ../../make-rules/shared-macros.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_NAME= pcre
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_VERSION= 7.8
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri PankovCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri PankovCOMPONENT_ARCHIVE_HASH= sha1:229e6585ec816fbb7081a6b3d29daf1e048f362f
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri PankovCOMPONENT_ARCHIVE_URL= http://sourceforge.net/projects/pcre/files/pcre/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri PankovCOMPONENT_PROJECT_URL= http://pcre.org
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri Pankovinclude $(WS_TOP)/make-rules/prep.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude $(WS_TOP)/make-rules/configure.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude $(WS_TOP)/make-rules/ips.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude $(WS_TOP)/make-rules/lint-libraries.mk
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri Pankov
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# pick up -xc99=all in CFLAGS
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri Pankovstudio_C99MODE= $(studio_C99_ENABLE)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# pick up -xlang=c99 in XPG5MODE
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowestudio_cplusplus_C99MODE= $(studio_cplusplus_C99_ENABLE)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# turn on largefile support
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCFLAGS+= $(CPP_LARGEFILES)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCFLAGS+= $(XPG6MODE)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# Although -norunpath is set for CXXFLAGS, we need to put -norunpath
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# here, otherwise -norunpath doesn't get set when creating the shared
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# libraries (CC -G).
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCXX+= $(studio_NORUNPATH)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCXXFLAGS+= $(CC_PIC)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# turn on support for large files
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCXXFLAGS+= $(CPP_LARGEFILES)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCXXFLAGS+= $(XPG5MODE)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe# We need to do this because libtool adds wrong paths to RPATH.
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweLDFLAGS += -L$(CONFIGURE_LIBDIR.$(BITS)) -R$(CONFIGURE_LIBDIR.$(BITS))
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweLINTFLAGS+= -I. $(studio_XBITS) $(CPP_LARGEFILES)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_ENV+= "CC=$(CC)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_ENV+= "CFLAGS=$(CFLAGS)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_ENV+= "CPP=$(CC) $(CPPFLAGS) $(CFLAGS) -E"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_ENV+= "CXX=$(CXX)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_ENV+= "CXXFLAGS=$(CXXFLAGS)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_ENV+= "CXXCPP=$(CXX) $(CPPFLAGS) $(CXXFLAGS) -E"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_ENV+= "LDFLAGS=$(LDFLAGS)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_ENV+= "CXXLDFLAGS=$(LDFLAGS)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_ENV+= "CXXLD=$(CXX) $(CXXFLAGS) $(LDFLAGS)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_ENV+= "INSTALL=$(INSTALL)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_ENV+= "MAKE=$(GMAKE)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_ENV.64+= "CXXLINKLIB=$(CXX) $(CCFLAGS) $(LDFLAGS)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_ENV.64+= "MACH64=$(MACH64)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS+= --includedir=$(CONFIGURE_INCLUDEDIR)/pcre
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS+= --localstatedir=/var
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS+= --disable-static
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS+= --enable-cpp
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS+= --enable-rebuild-chartables
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS+= --enable-utf8
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS+= --enable-unicode-properties
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS+= --enable-newline-is-any
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS+= --disable-stack-for-recursion
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri PankovCONFIGURE_OPTIONS+= --enable-pcregrep-libz
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri PankovCONFIGURE_OPTIONS+= --enable-pcregrep-libbz2
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS+= --with-posix-malloc-threshold=20
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS+= --with-link-size=4
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS+= --with-match-limit=10000000
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS+= --with-pic
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCONFIGURE_OPTIONS.64+= --libexecdir=$(CONFIGURE_PREFIX)/libexec/$(MACH64)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_BUILD_ENV+= "LDFLAGS=$(LDFLAGS)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_BUILD_ENV+= "INSTALL=$(INSTALL)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_BUILD_ENV+= "MAKE=$(GMAKE)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_BUILD_ARGS+= -e
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_INSTALL_ARGS+= "INSTALL=$(INSTALL)"
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweCOMPONENT_INSTALL_ARGS+= "MAKE=$(GMAKE)"
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri Pankov
ed22c7109fc5dd9e1b7a5d0333bdc7ad2718e2abYuri Pankov# common targets
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowebuild: $(BUILD_32_and_64)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinstall: $(INSTALL_32_and_64)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowetest: $(TEST_32_and_64)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard LoweBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Loweinclude $(WS_TOP)/make-rules/depend.mk
c10c16dec587a0662068f6e2991c29ed3a9db943Richard Lowe