Makefile revision 1713
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# CDDL HEADER START
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# The contents of this file are subject to the terms of the
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Common Development and Distribution License (the "License").
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# You may not use this file except in compliance with the License.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# or http://www.opensolaris.org/os/licensing.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# See the License for the specific language governing permissions
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# and limitations under the License.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# When distributing Covered Code, include this CDDL HEADER in each
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# If applicable, add the following below this CDDL HEADER, with the
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# fields enclosed by brackets "[]" replaced with your own identifying
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# information: Portions Copyright [yyyy] [name of copyright owner]
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# CDDL HEADER END
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
6398f22526303343193a18e514602f1af6fb29cbNikolai Kondrashov
6398f22526303343193a18e514602f1af6fb29cbNikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov#
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovinclude ../../make-rules/shared-macros.mk
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovPATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_NAME= berkeleydb
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_VERSION= 5.3.21
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_PROJECT_URL= http://www.oracle.com/technetwork/database/berkeleydb/overview/index.html
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_SRC_NAME= db
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_SRC= $(COMPONENT_SRC_NAME)-$(COMPONENT_VERSION)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_ARCHIVE_HASH= \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov sha256:ddd92a930317df92021054c03992392db9ea5cddba43bef8920d392a82114fb8
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_ARCHIVE_URL= http://download.oracle.com/berkeley-db/$(COMPONENT_ARCHIVE)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_BUGDB= database/berkeley
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovinclude ../../make-rules/prep.mk
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovinclude ../../make-rules/configure.mk
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovinclude ../../make-rules/ips.mk
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_PRE_CONFIGURE_ACTION = \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov ($(CLONEY) $(SOURCE_DIR) $(@D))
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Berkeley DB uses TCLSH to run all the test suite test cases.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Per the test suite instructions in the BDB build manual, the tclsh
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# include path must be correct in include.tcl then tclsh is run by
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# sourcing the test.tcl header and finally running the "run_std" command.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# COMPONENT_POST_TEST_ACTION does this after BDB has been recompiled
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# for test (--enable-test)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_POST_TEST_ACTION = \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov (cd $(@D); \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov echo "source test/tcl/test.tcl" > $(@D)/run_bdb.tcl; \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov echo "$(RUN)" >> $(@D)/run_bdb.tcl; \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov cd $(@D); \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(CP) include.tcl include.tcl.orig; \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(GSED) \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov 's;set tclsh_path .*;set tclsh_path '$(TCLSH)';' \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov < include.tcl.orig > include.tcl; \
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(ENV) $(TCLSH) run_bdb.tcl)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_SCRIPT = dist/configure
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# adding to the C++ compiler because libtool appears to strip it from CXXFLAGS
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCXX += $(studio_NORUNPATH)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# we need to enable large file support and build PIC for our shared libraries
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCFLAGS += $(CPP_LARGEFILES) $(CC_PIC)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCXXFLAGS += $(CPP_LARGEFILES)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_ENV += CFLAGS="$(CFLAGS)"
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)"
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_ENV += PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_ENV += JAVA_HOME="$(JAVA_HOME)"
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --includedir=/usr/include
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-shared
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --disable-static
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-cxx
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-java
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-sql
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-sql_codegen
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-jdbc
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-tcl
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --with-tcl=/usr/lib
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += --enable-dbm
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCONFIGURE_OPTIONS += $(configure_test)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovCOMPONENT_TEST_TARGETS = test
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Enable ASLR for this component
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovASLR_MODE = $(ASLR_ENABLE)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov$(BUILD_DIR)/%/.tested: configure_test= --enable-test
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# Do not apply the standard licence transforms for this component.
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovLICENSE_TRANSFORMS =
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# common targets
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovbuild: $(BUILD_32_and_64)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovinstall: $(INSTALL_32_and_64)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov $(CP) berkeleydb.license $(PROTOUSRDIR)/docs/LICENSE
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovtest: $(TEST_32_and_64)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov# By default "gmake test" runs standard tests, takes ~2 days per $(BITS).
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovRUN=run_std
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai KondrashovBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS) $(TCLSH)
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashovinclude ../../make-rules/depend.mk
3ce85a5f5264e7118beb6524e120fd8b53a13da4Nikolai Kondrashov