Makefile revision 4337
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, 2015, Oracle and/or its affiliates. All rights reserved.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User#
5a4557e8de2951a2796676b5ec4b6a90caa5be14Mark Andrews
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userinclude ../../make-rules/shared-macros.mk
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_NAME= pcre
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCOMPONENT_VERSION= 8.21
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_ARCHIVE_HASH= \
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User sha256:62e1116549ce5b1ad92901f04d8338d5f7b59f92abce8d15e9a17cafe0efb102
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_ARCHIVE_URL= http://sourceforge.net/projects/pcre/files/pcre/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_PROJECT_URL= http://pcre.org/
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_BUGDB= library/pcre
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserTPNO= 9271
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox Userinclude $(WS_MAKE_RULES)/prep.mk
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeininclude $(WS_MAKE_RULES)/configure.mk
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeininclude $(WS_MAKE_RULES)/ips.mk
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austeininclude $(WS_MAKE_RULES)/lint-libraries.mk
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# pick up -xc99=all in CFLAGS
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox Userstudio_C99MODE= $(studio_C99_ENABLE)
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox User
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox User# pick up -xlang=c99 in XPG5MODE
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox Userstudio_cplusplus_C99MODE= $(studio_cplusplus_C99_ENABLE)
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox User
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox User# turn on largefile support
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox UserCFLAGS+= $(CPP_LARGEFILES)
b2f07642fd712c8fda81a116bcdde229ab291f33Tinderbox User
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCFLAGS+= $(XPG6MODE)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# Although -norunpath is set for CXXFLAGS, we need to put -norunpath
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# here, otherwise -norunpath doesn't get set when creating the shared
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# libraries (CC -G).
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCXX+= $(studio_NORUNPATH)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCXXFLAGS+= $(CC_PIC)
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# turn on support for large files
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCXXFLAGS+= $(CPP_LARGEFILES)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCXXFLAGS+= $(XPG5MODE)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein# We need to do this because libtool adds wrong paths to RPATH.
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserLDFLAGS += -L$(CONFIGURE_LIBDIR.$(BITS)) -R$(CONFIGURE_LIBDIR.$(BITS))
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserLINTFLAGS+= -I. $(studio_XBITS) $(CPP_LARGEFILES)
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_ENV+= "CC=$(CC)"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_ENV+= "CFLAGS=$(CFLAGS)"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_ENV+= "CPP=$(CC) $(CPPFLAGS) $(CFLAGS) -E"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_ENV+= "CXX=$(CXX)"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_ENV+= "CXXFLAGS=$(CXXFLAGS)"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_ENV+= "CXXCPP=$(CXX) $(CPPFLAGS) $(CXXFLAGS) -E"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_ENV+= "LDFLAGS=$(LDFLAGS)"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_ENV+= "CXXLDFLAGS=$(LDFLAGS)"
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_ENV+= "CXXLD=$(CXX) $(CXXFLAGS) $(LDFLAGS)"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_ENV+= "INSTALL=$(INSTALL)"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_ENV+= "MAKE=$(GMAKE)"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_ENV.64+= "CXXLINKLIB=$(CXX) $(CCFLAGS) $(LDFLAGS)"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_ENV.64+= "MACH64=$(MACH64)"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS+= --includedir=$(CONFIGURE_INCLUDEDIR)/pcre
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS+= --localstatedir=/var
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS+= --disable-static
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob AusteinCONFIGURE_OPTIONS+= --enable-cpp
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCONFIGURE_OPTIONS+= --enable-rebuild-chartables
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS+= --enable-utf8
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS+= --enable-unicode-properties
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserCONFIGURE_OPTIONS+= --enable-newline-is-any
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS+= --disable-stack-for-recursion
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox 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
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCONFIGURE_OPTIONS.64+= --libexecdir=$(CONFIGURE_PREFIX)/libexec/$(MACH64)
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_BUILD_ENV+= "LDFLAGS=$(LDFLAGS)"
d3ddafd7469d1f3430ccd1b0fe0d13ccbbaf5debTinderbox UserCOMPONENT_BUILD_ENV+= "INSTALL=$(INSTALL)"
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox UserCOMPONENT_BUILD_ENV+= "MAKE=$(GMAKE)"
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserCOMPONENT_BUILD_ARGS+= -e
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
6d45011a65dfc43f476ca15c3fd9ee5227eb968fTinderbox UserASLR_MODE = $(ASLR_ENABLE)
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserCOMPONENT_INSTALL_ARGS+= "INSTALL=$(INSTALL)"
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserCOMPONENT_INSTALL_ARGS+= "MAKE=$(GMAKE)"
6d45011a65dfc43f476ca15c3fd9ee5227eb968fTinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox User# common targets
60e5e10f8d2e2b0c41e8abad38cacd867caa6ab2Rob Austein
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userconfigure: $(CONFIGURE_32_and_64)
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userbuild: $(BUILD_32_and_64)
c247e3f281613fabe1af362e9f3157e35ebbe52cMark Andrews
fd2597f75693a2279fdf588bd40dfe2407c42028Tinderbox Userinstall: $(INSTALL_32_and_64)
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox Usertest: $(TEST_32_and_64)
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox Usersystem-test: $(SYSTEM_TESTS_NOT_IMPLEMENTED)
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox User
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserREQUIRED_PACKAGES += compress/bzip2
2eeb74d1cf5355dd98f6d507a10086e16bb08c4bTinderbox UserREQUIRED_PACKAGES += library/zlib
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserREQUIRED_PACKAGES += shell/ksh93
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserREQUIRED_PACKAGES += system/library
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox UserREQUIRED_PACKAGES += system/library/c++-runtime
659d063f23a35d77ad5826e6556d3137672bb937Tinderbox User