Makefile revision 3817
5cd4555ad444fd391002ae32450572054369fd42Rob Austein#
5cd4555ad444fd391002ae32450572054369fd42Rob Austein# CDDL HEADER START
4eb998928b9aef0ceda42d7529980d658138698aEvan Hunt#
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# The contents of this file are subject to the terms of the
b129f72d951663755496670606e5f7303e8f2dc2Tinderbox User# Common Development and Distribution License (the "License").
c651f15b30f1dae5cc2f00878fb5da5b3a35a468Mark Andrews# You may not use this file except in compliance with the License.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington#
ec5347e2c775f027573ce5648b910361aa926c01Automatic Updater# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# or http://www.opensolaris.org/os/licensing.
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# See the License for the specific language governing permissions
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# and limitations under the License.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# When distributing Covered Code, include this CDDL HEADER in each
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# If applicable, add the following below this CDDL HEADER, with the
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# fields enclosed by brackets "[]" replaced with your own identifying
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews# information: Portions Copyright [yyyy] [name of copyright owner]
dafcb997e390efa4423883dafd100c975c4095d6Mark Andrews#
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# CDDL HEADER END
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark Andrews#
b5ad6dfea4cc3e7d1d322ac99f1e5a31096837c4Mark Andrews# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley#
2f5461d23b4044b62d4d668732611909d902e54dJeremy C. Reed
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halleyexport PARFAIT_BUILD=no
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halleyinclude ../../make-rules/shared-macros.mk
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCOMPONENT_NAME = mysql
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCOMPONENT_VERSION = 5.5.31
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCOMPONENT_SRC = $(COMPONENT_NAME)-$(COMPONENT_VERSION)
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCOMPONENT_ARCHIVE = $(COMPONENT_SRC).tar.gz
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCOMPONENT_ARCHIVE_HASH= \
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley sha256:9cdd650b47e3ea864ab40d4ab23fa4a9fdfabc7fd018bf5c9cce30722c0abcea
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCOMPONENT_ARCHIVE_URL = http://downloads.mysql.com/archives/mysql-5.5/$(COMPONENT_ARCHIVE)
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCOMPONENT_PROJECT_URL = http://dev.mysql.com/
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCOMPONENT_BUGDB = database/mysql
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude $(WS_MAKE_RULES)/prep.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude $(WS_MAKE_RULES)/justmake.mk
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austeininclude $(WS_MAKE_RULES)/ips.mk
c1a883f2e04d94e99c433b1f6cfd0c0338f4ed85Mark Andrews
cfa2326b5c96a3a4c720262e077b2baf9fc27970Tinderbox User# Enable ASLR for this component
81f58902eb5a1c1ab22742c72bd6cf318acbc06aTinderbox UserASLR_MODE = $(ASLR_ENABLE)
b129f72d951663755496670606e5f7303e8f2dc2Tinderbox User
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# This component uses cmake to generate Makefiles and thus does not
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein# run any configure script
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE = $(shell which cmake)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE_PREFIX = /usr/mysql/5.5
f5d30e2864e048a42c4dc1134993ae7efdb5d6c3Mark AndrewsCONFDIR = /etc/mysql/5.5
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinDATA_PREFIX = /var/mysql/5.5
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE_BINDIR.32 = bin/$(MACH32)
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCMAKE_BINDIR.64 = bin
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCMAKE_LIBDIR.32 = lib
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCMAKE_LIBDIR.64 = lib/$(MACH64)
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark AndrewsCMAKE_PLUGINDIR.32 = lib/plugin
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCMAKE_PLUGINDIR.64 = lib/$(MACH64)/plugin
a769eca4e3b223866b01dc8f7a4dde8d9e49bab0Mark AndrewsCMAKE_CFLAGS.64 = "-m64 -norunpath"
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCMAKE_CXXFLAGS.64 = "-m64 -norunpath"
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCMAKE_CFLAGS.32 = -norunpath
431859b442e89281a0d42652200a8de0668bc6b9Evan HuntCMAKE_CXXFLAGS.32 = -norunpath
b435b1ded3def3159f597953d21dffc1615cb250Brian Wellington
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley# Providing component specific build options to cmake
9b6a170d22d61026d31bde87523f3320628b6ebcBrian WellingtonCMAKE_OPTIONS += -DBUILD_CONFIG=mysql_release
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCMAKE_OPTIONS += -DINSTALL_LAYOUT=STANDALONE
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCMAKE_OPTIONS += -DCMAKE_INSTALL_PREFIX=$(CMAKE_PREFIX)
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCMAKE_OPTIONS += -DINSTALL_BINDIR=$(CMAKE_BINDIR.$(BITS))
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCMAKE_OPTIONS += -DINSTALL_SBINDIR=$(CMAKE_BINDIR.$(BITS))
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCMAKE_OPTIONS += -DINSTALL_SCRIPTDIR=$(CMAKE_BINDIR.$(BITS))
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE_OPTIONS += -DINSTALL_LIBDIR=$(CMAKE_LIBDIR.$(BITS))
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE_OPTIONS += -DINSTALL_PLUGINDIR=$(CMAKE_PLUGINDIR.$(BITS))
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE_OPTIONS += -DSYSCONFDIR=$(CONFDIR)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE_OPTIONS += -DMYSQL_DATADIR=$(DATA_PREFIX)
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE_OPTIONS += -DWITH_SSL=bundled
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE_OPTIONS += -DWITH_READLINE=ON
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE_OPTIONS += -DENABLE_DTRACE=1
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE_OPTIONS += -DWITH_EXTRA_CHARSETS=complex
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCMAKE_OPTIONS += -DENABLED_LOCAL_INFILE=ON
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE_OPTIONS += -DWITH_ARCHIVE_STORAGE_ENGINE=1
4eb998928b9aef0ceda42d7529980d658138698aEvan HuntCMAKE_OPTIONS += -DWITH_BLACKHOLE_STORAGE_ENGINE=1
4eb998928b9aef0ceda42d7529980d658138698aEvan HuntCMAKE_OPTIONS += -DWITH_EXAMPLE_STORAGE_ENGINE=1
4eb998928b9aef0ceda42d7529980d658138698aEvan HuntCMAKE_OPTIONS += -DWITH_FEDERATED_STORAGE_ENGINE=1
122c58bd11790c7576cdb1c6fd8e4439d0d7f7a5Mark AndrewsCMAKE_OPTIONS += -DWITH_INNOBASE_STORAGE_ENGINE=1
4eb998928b9aef0ceda42d7529980d658138698aEvan HuntCMAKE_OPTIONS += -DCMAKE_CXX_COMPILER=$(CXX)
4eb998928b9aef0ceda42d7529980d658138698aEvan HuntCMAKE_OPTIONS += -DCMAKE_C_COMPILER=$(CC)
4eb998928b9aef0ceda42d7529980d658138698aEvan HuntCMAKE_OPTIONS += -DCMAKE_EXE_LINKER_FLAGS="-norunpath"
4eb998928b9aef0ceda42d7529980d658138698aEvan HuntCMAKE_OPTIONS += -DCMAKE_C_FLAGS=$(CMAKE_CFLAGS.$(BITS))
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE_OPTIONS += -DCMAKE_CXX_FLAGS=$(CMAKE_CXXFLAGS.$(BITS))
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE_OPTIONS += '-DCOMPILATION_COMMENT=MySQL Community Server (GPL)'
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCMAKE_OPTIONS += -DFEATURE_SET=community
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob HalleyCOMPONENT_PRE_BUILD_ACTION += cd $(@D);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_PRE_BUILD_ACTION += export LDFLAGS=$(CMAKE_CXXFLAGS.$(BITS));
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_PRE_BUILD_ACTION += echo Running cmake with $(CMAKE_OPTIONS);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinCOMPONENT_PRE_BUILD_ACTION += $(CMAKE) . $(CMAKE_OPTIONS);
268a4475065fe6a8cd7cc707820982cf5e98f430Rob Austein
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halleybuild: $(BUILD_32_and_64)
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halleyinstall: $(INSTALL_32_and_64)
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halleytest: $(NO_TESTS)
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
4610465ed9408cbe434dbfb8be8ea53f48969c91Bob Halley
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark AndrewsREQUIRED_PACKAGES += developer/build/cmake
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark AndrewsREQUIRED_PACKAGES += library/security/openssl
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += runtime/perl-512
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += runtime/perl-516
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += shell/ksh93
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/core-os
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/library
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/library/c++-runtime
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/library/math
268a4475065fe6a8cd7cc707820982cf5e98f430Rob AusteinREQUIRED_PACKAGES += system/network
c4f9e613e12f03795bee18cf2ca8e6a9d39d6468Mark Andrews