Makefile revision 844
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# CDDL HEADER START
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# The contents of this file are subject to the terms of the
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Common Development and Distribution License (the "License").
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# You may not use this file except in compliance with the License.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# or http://www.opensolaris.org/os/licensing.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# See the License for the specific language governing permissions
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# and limitations under the License.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# When distributing Covered Code, include this CDDL HEADER in each
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# If applicable, add the following below this CDDL HEADER, with the
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# CDDL HEADER END
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews#
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsinclude ../../make-rules/shared-macros.mk
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsPATH=$(SPRO_VROOT)/bin:$(JAVA_HOME)/bin:/usr/bin
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCOMPONENT_NAME= db
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCOMPONENT_VERSION= 5.1.25
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCOMPONENT_PROJECT_URL= http://www.oracle.com/technetwork/database/berkeleydb/overview/index.html
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCOMPONENT_ARCHIVE_HASH= \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews sha256:72eac5fcae4b51b0f1edc727c0368407f29b42e3f2f50ebc31a282d0d6c0a617
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCOMPONENT_ARCHIVE_URL= http://download.oracle.com/berkeley-db/$(COMPONENT_ARCHIVE)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsinclude ../../make-rules/prep.mk
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsinclude ../../make-rules/configure.mk
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsinclude ../../make-rules/ips.mk
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCOMPONENT_PRE_CONFIGURE_ACTION = \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews ($(CLONEY) $(SOURCE_DIR) $(@D))
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCOMPONENT_POST_TEST_ACTION = \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews (cd $(@D); \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "source test/tcl/test.tcl" > $(@D)/run_bdb.tcl; \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews echo "$(RUN)" >> $(@D)/run_bdb.tcl; \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews cd $(@D); \
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews ulimit -n 1024; $(ENV) /usr/bin/tclsh run_bdb.tcl)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_SCRIPT = dist/configure
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# adding to the C++ compiler because libtool appears to strip it from CXXFLAGS
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCXX += $(studio_NORUNPATH)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# we need to enable large file support and build PIC for our shared libraries
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCFLAGS += $(CPP_LARGEFILES) $(CC_PIC)
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCXXFLAGS += $(CPP_LARGEFILES)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_ENV += CFLAGS="$(CFLAGS)"
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)"
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_ENV += PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_ENV += JAVA_HOME="$(JAVA_HOME)"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_OPTIONS += --includedir=/usr/include
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_OPTIONS += --enable-shared
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_OPTIONS += --disable-static
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_OPTIONS += --enable-cxx
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_OPTIONS += --enable-java
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_OPTIONS += --enable-sql
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_OPTIONS += --enable-sql_codegen
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_OPTIONS += --enable-jdbc
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_OPTIONS += --enable-tcl
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_OPTIONS += --with-tcl=/usr/lib
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_OPTIONS += --enable-dbm
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCONFIGURE_OPTIONS += $(configure_test)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsCOMPONENT_TEST_TARGETS = test
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews$(BUILD_DIR)/%/.tested: configure_test= --enable-test
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# common targets
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsbuild: $(BUILD_32_and_64)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsinstall: $(INSTALL_32_and_64)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews $(CP) berkeleydb.license $(PROTOUSRDIR)/docs/LICENSE
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewstest: $(TEST_32_and_64)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# By default "gmake test" runs standard tests, takes ~6 hrs (default).
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsRUN=run_std
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# Run all tests, takes ~3 days from command line using
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews# "gmake test RUN=run_all"
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark AndrewsBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrewsinclude ../../make-rules/depend.mk
5c526acb82c882e41b655c31f5fa4425c87b671cMark Andrews