components/mysql-5-5/Makefile
changeset 1541 b62d499c009a
child 1950 16c7750a701f
equal deleted inserted replaced
1540:8a2bd4df5c52 1541:b62d499c009a
       
     1 #
       
     2 # CDDL HEADER START
       
     3 #
       
     4 # The contents of this file are subject to the terms of the
       
     5 # Common Development and Distribution License (the "License").
       
     6 # You may not use this file except in compliance with the License.
       
     7 #
       
     8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
     9 # or http://www.opensolaris.org/os/licensing.
       
    10 # See the License for the specific language governing permissions
       
    11 # and limitations under the License.
       
    12 #
       
    13 # When distributing Covered Code, include this CDDL HEADER in each
       
    14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    15 # If applicable, add the following below this CDDL HEADER, with the
       
    16 # fields enclosed by brackets "[]" replaced with your own identifying
       
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    18 #
       
    19 # CDDL HEADER END
       
    20 #
       
    21 # Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
       
    22 #
       
    23 include ../../make-rules/shared-macros.mk
       
    24 
       
    25 COMPONENT_NAME        = mysql
       
    26 COMPONENT_VERSION     = 5.5.31
       
    27 COMPONENT_SRC         = $(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    28 COMPONENT_ARCHIVE     = $(COMPONENT_SRC).tar.gz
       
    29 COMPONENT_ARCHIVE_HASH= \
       
    30     sha256:9cdd650b47e3ea864ab40d4ab23fa4a9fdfabc7fd018bf5c9cce30722c0abcea
       
    31 COMPONENT_ARCHIVE_URL = http://downloads.mysql.com/archives/mysql-5.5/$(COMPONENT_ARCHIVE)
       
    32 COMPONENT_PROJECT_URL = http://dev.mysql.com/ 
       
    33 COMPONENT_BUGDB       = database/mysql
       
    34 
       
    35 include ../../make-rules/prep.mk
       
    36 include ../../make-rules/justmake.mk
       
    37 include ../../make-rules/ips.mk
       
    38 
       
    39 # Enable ASLR for this component
       
    40 ASLR_MODE           = $(ASLR_ENABLE)
       
    41 
       
    42 # This component uses cmake to generate Makefiles and thus does not
       
    43 # run any configure script
       
    44 CMAKE               = $(shell which cmake)
       
    45 CMAKE_PREFIX        = /usr/mysql/5.5
       
    46 CONFDIR             = /etc/mysql/5.5
       
    47 DATA_PREFIX         = /var/mysql/5.5
       
    48 
       
    49 CMAKE_BINDIR.32     = bin/$(MACH32)
       
    50 CMAKE_BINDIR.64     = bin
       
    51 CMAKE_LIBDIR.32     = lib
       
    52 CMAKE_LIBDIR.64     = lib/$(MACH64)
       
    53 CMAKE_PLUGINDIR.32  = lib/plugin
       
    54 CMAKE_PLUGINDIR.64  = lib/$(MACH64)/plugin
       
    55 CMAKE_CFLAGS.64     = -m64
       
    56 CMAKE_CXXFLAGS.64   = -m64
       
    57 
       
    58 # Providing component specific build options to cmake
       
    59 CMAKE_OPTIONS += -DBUILD_CONFIG=mysql_release
       
    60 CMAKE_OPTIONS += -DINSTALL_LAYOUT=STANDALONE
       
    61 CMAKE_OPTIONS += -DCMAKE_INSTALL_PREFIX=$(CMAKE_PREFIX)
       
    62 CMAKE_OPTIONS += -DINSTALL_BINDIR=$(CMAKE_BINDIR.$(BITS))
       
    63 CMAKE_OPTIONS += -DINSTALL_SBINDIR=$(CMAKE_BINDIR.$(BITS))
       
    64 CMAKE_OPTIONS += -DINSTALL_SCRIPTDIR=$(CMAKE_BINDIR.$(BITS))
       
    65 CMAKE_OPTIONS += -DINSTALL_LIBDIR=$(CMAKE_LIBDIR.$(BITS))
       
    66 CMAKE_OPTIONS += -DINSTALL_PLUGINDIR=$(CMAKE_PLUGINDIR.$(BITS))
       
    67 CMAKE_OPTIONS += -DSYSCONFDIR=$(CONFDIR)
       
    68 CMAKE_OPTIONS += -DMYSQL_DATADIR=$(DATA_PREFIX)
       
    69 CMAKE_OPTIONS += -DWITH_SSL=bundled
       
    70 CMAKE_OPTIONS += -DWITH_READLINE=ON
       
    71 CMAKE_OPTIONS += -DENABLE_DTRACE=1
       
    72 CMAKE_OPTIONS += -DWITH_EXTRA_CHARSETS=complex
       
    73 CMAKE_OPTIONS += -DENABLED_LOCAL_INFILE=ON
       
    74 CMAKE_OPTIONS += -DWITH_ARCHIVE_STORAGE_ENGINE=1
       
    75 CMAKE_OPTIONS += -DWITH_BLACKHOLE_STORAGE_ENGINE=1
       
    76 CMAKE_OPTIONS += -DWITH_EXAMPLE_STORAGE_ENGINE=1
       
    77 CMAKE_OPTIONS += -DWITH_FEDERATED_STORAGE_ENGINE=1
       
    78 CMAKE_OPTIONS += -DWITH_INNOBASE_STORAGE_ENGINE=1
       
    79 CMAKE_OPTIONS += -DCMAKE_C_FLAGS=$(CMAKE_CFLAGS.$(BITS))
       
    80 CMAKE_OPTIONS += -DCMAKE_CXX_FLAGS=$(CMAKE_CXXFLAGS.$(BITS))
       
    81 CMAKE_OPTIONS += '-DCOMPILATION_COMMENT=MySQL Community Server (GPL)'
       
    82 CMAKE_OPTIONS += -DFEATURE_SET=community
       
    83 
       
    84 COMPONENT_PRE_BUILD_ACTION += cd $(@D);
       
    85 COMPONENT_PRE_BUILD_ACTION += export LDFLAGS=$(CMAKE_CXXFLAGS.$(BITS));
       
    86 COMPONENT_PRE_BUILD_ACTION += echo Running cmake with $(CMAKE_OPTIONS);
       
    87 COMPONENT_PRE_BUILD_ACTION += $(CMAKE) . $(CMAKE_OPTIONS);
       
    88 
       
    89 build: $(BUILD_32_and_64)
       
    90 
       
    91 install: $(INSTALL_32_and_64)
       
    92 
       
    93 test: $(NO_TESTS)
       
    94 
       
    95 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
       
    96 
       
    97 include ../../make-rules/depend.mk