Makefile revision 5835
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync#
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# CDDL HEADER START
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync#
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# The contents of this file are subject to the terms of the
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# Common Development and Distribution License (the "License").
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# You may not use this file except in compliance with the License.
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync#
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# or http://www.opensolaris.org/os/licensing.
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# See the License for the specific language governing permissions
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# and limitations under the License.
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync#
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# When distributing Covered Code, include this CDDL HEADER in each
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# If applicable, add the following below this CDDL HEADER, with the
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# fields enclosed by brackets "[]" replaced with your own identifying
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync#
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# CDDL HEADER END
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync#
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync#
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync#
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncBUILD_BITS= 64_and_32
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncexport PARFAIT_BUILD=no
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncinclude ../../make-rules/shared-macros.mk
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncCOMPONENT_NAME = mysql
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncCOMPONENT_VERSION = 5.6.29
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncCOMPONENT_SRC = $(COMPONENT_NAME)-$(COMPONENT_VERSION)
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncCOMPONENT_ARCHIVE = $(COMPONENT_SRC).tar.gz
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncCOMPONENT_ARCHIVE_HASH= \
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync sha256:6ac85b75b2dfa8c232725dda25469df37bf4e48b408cc0978d0dfc34c25a817f
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncCOMPONENT_ARCHIVE_URL = http://cdn.mysql.com/Downloads/MySQL-5.6/$(COMPONENT_ARCHIVE)
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncCOMPONENT_PROJECT_URL = http://dev.mysql.com/
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncCOMPONENT_BUGDB = database/mysql
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync#We use cp(1) instead of cloney because we use TAR to copy files and the TAR
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync#used doesn't handle long links
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncCLONEY = echo
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncCOMPONENT_PRE_BUILD_ACTION += $(CP) -rp $(SOURCE_DIR)/* $(@D);
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncBUILD_STYLE= justmake
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncTEST_TARGET= $(NO_TESTS)
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncSYSTEM_TEST_TARGET= $(NO_TESTS)
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsyncinclude $(WS_MAKE_RULES)/common.mk
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync
61cb83a8ccd1dd7f671f31fa93c9d8b7be09b4ccvboxsync# Enable ASLR for this component
ASLR_MODE = $(ASLR_ENABLE)
# MySQL being one of Oracle's own product doesn't require to have a
# TPNO License number.
# This component uses cmake to generate Makefiles and thus does not
# run any configure script
CMAKE = $(shell which cmake)
CMAKE_PREFIX = $(USRDIR)/mysql/5.6
CONFDIR = $(ETCDIR)/mysql/5.6
DATA_PREFIX = $(VARDIR)/mysql/5.6
CMAKE_BINDIR.32 = bin/$(MACH32)
CMAKE_BINDIR.64 = bin
CMAKE_LIBDIR.32 = lib
CMAKE_LIBDIR.64 = lib/$(MACH64)
CMAKE_PLUGINDIR.32 = lib/plugin
CMAKE_PLUGINDIR.64 = lib/$(MACH64)/plugin
CMAKE_CFLAGS.32 = -m32
CMAKE_CFLAGS.64 = -m64
CMAKE_CXXFLAGS.32 = -m32 -xnorunpath -std=c++03
CMAKE_CXXFLAGS.64 = -m64 -xnorunpath -std=c++03
# Providing component specific build options to cmake
CMAKE_OPTIONS += -DBUILD_CONFIG=mysql_release
CMAKE_OPTIONS += -DINSTALL_LAYOUT=STANDALONE
CMAKE_OPTIONS += -DCMAKE_INSTALL_PREFIX=$(CMAKE_PREFIX)
CMAKE_OPTIONS += -DINSTALL_BINDIR=$(CMAKE_BINDIR.$(BITS))
CMAKE_OPTIONS += -DINSTALL_SBINDIR=$(CMAKE_BINDIR.$(BITS))
CMAKE_OPTIONS += -DINSTALL_SCRIPTDIR=$(CMAKE_BINDIR.$(BITS))
CMAKE_OPTIONS += -DINSTALL_LIBDIR=$(CMAKE_LIBDIR.$(BITS))
CMAKE_OPTIONS += -DINSTALL_PLUGINDIR=$(CMAKE_PLUGINDIR.$(BITS))
CMAKE_OPTIONS += -DSYSCONFDIR=$(CONFDIR)
CMAKE_OPTIONS += -DMYSQL_DATADIR=$(DATA_PREFIX)
CMAKE_OPTIONS += -DWITH_SSL=bundled
CMAKE_OPTIONS += -DWITH_READLINE=ON
CMAKE_OPTIONS += -DENABLE_DTRACE=1
CMAKE_OPTIONS += -DHAVE_REAL_DTRACE_INSTRUMENTING=ON
CMAKE_OPTIONS += -DWITH_EXTRA_CHARSETS=complex
CMAKE_OPTIONS += -DENABLED_LOCAL_INFILE=ON
CMAKE_OPTIONS += -DWITH_ARCHIVE_STORAGE_ENGINE=1
CMAKE_OPTIONS += -DWITH_BLACKHOLE_STORAGE_ENGINE=1
CMAKE_OPTIONS += -DWITH_EXAMPLE_STORAGE_ENGINE=1
CMAKE_OPTIONS += -DWITH_FEDERATED_STORAGE_ENGINE=1
CMAKE_OPTIONS += -DCMAKE_CXX_COMPILER=$(CXX)
CMAKE_OPTIONS += -DCMAKE_C_COMPILER=$(CC)
CMAKE_OPTIONS += -DWITH_INNOBASE_STORAGE_ENGINE=1
CMAKE_OPTIONS += -DCMAKE_C_FLAGS="$(CMAKE_CFLAGS.$(BITS))"
CMAKE_OPTIONS += -DCMAKE_CXX_FLAGS="$(CMAKE_CXXFLAGS.$(BITS))"
CMAKE_OPTIONS += '-DCOMPILATION_COMMENT=MySQL Community Server (GPL)'
CMAKE_OPTIONS += -DFEATURE_SET=community
CMAKE_OPTIONS += -DCMAKE_VERBOSE_MAKEFILE:BOOL=TRUE
COMPONENT_PRE_BUILD_ACTION += cd $(@D);
COMPONENT_PRE_BUILD_ACTION += export LDFLAGS=$(CMAKE_CXXFLAGS.$(BITS));
COMPONENT_PRE_BUILD_ACTION += echo Running cmake with $(CMAKE_OPTIONS);
COMPONENT_PRE_BUILD_ACTION += $(CMAKE) . $(CMAKE_OPTIONS);
# Adjust '#!/usr/bin/perl'
$(INSTALL_64): PERL_SCRIPTS= \
$(PROTO_DIR)/$(CMAKE_PREFIX)/bin/mysql_convert_table_format \
$(PROTO_DIR)/$(CMAKE_PREFIX)/bin/mysql_find_rows \
$(PROTO_DIR)/$(CMAKE_PREFIX)/bin/mysql_fix_extensions \
$(PROTO_DIR)/$(CMAKE_PREFIX)/bin/mysql_install_db \
$(PROTO_DIR)/$(CMAKE_PREFIX)/bin/mysql_secure_installation \
$(PROTO_DIR)/$(CMAKE_PREFIX)/bin/mysql_setpermission \
$(PROTO_DIR)/$(CMAKE_PREFIX)/bin/mysql_zap \
$(PROTO_DIR)/$(CMAKE_PREFIX)/bin/mysqlaccess \
$(PROTO_DIR)/$(CMAKE_PREFIX)/bin/mysqld_multi \
$(PROTO_DIR)/$(CMAKE_PREFIX)/bin/mysqldumpslow \
$(PROTO_DIR)/$(CMAKE_PREFIX)/bin/mysqlhotcopy
REQUIRED_PACKAGES += database/mysql-56/client
REQUIRED_PACKAGES += library/security/openssl
REQUIRED_PACKAGES += $(PERL_PKG)
REQUIRED_PACKAGES += shell/ksh93
REQUIRED_PACKAGES += system/core-os
REQUIRED_PACKAGES += system/library/c++-runtime
REQUIRED_PACKAGES += system/library/gcc/gcc-c++-runtime
REQUIRED_PACKAGES += system/library/gcc/gcc-c-runtime
REQUIRED_PACKAGES += system/library/math
REQUIRED_PACKAGES += system/network