components/libmemcached/Makefile
author Craig Mohrman <craig.mohrman@oracle.com>
Tue, 05 Jun 2012 14:17:28 -0700
changeset 857 2d92df98cbef
parent 800 2ad056ed89ec
child 1058 34d7aaa03423
permissions -rw-r--r--
7173724 libmemcached needs TPNO and license file modifications
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     1
#
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     3
#
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     7
#
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    12
#
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    18
#
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    20
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    21
#
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 358
diff changeset
    22
# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    23
#
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    24
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    25
include ../../make-rules/shared-macros.mk
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    26
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    27
COMPONENT_NAME=		libmemcached
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    28
COMPONENT_VERSION=	0.16
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    29
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    30
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 358
diff changeset
    31
COMPONENT_ARCHIVE_HASH=	\
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 358
diff changeset
    32
    sha256:d4fb3a64dc592c104caa4e98bc11f209fcb97eecdeb7f506797320dea75b9459
358
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    33
COMPONENT_ARCHIVE_URL= http://launchpadlibrarian.net/33299595/${COMPONENT_ARCHIVE}
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    34
COMPONENT_PROJECT_URL=  http://libmemcached.org/libMemcached.html
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    35
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    36
include $(WS_TOP)/make-rules/prep.mk
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    37
include $(WS_TOP)/make-rules/configure.mk
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    38
include $(WS_TOP)/make-rules/ips.mk
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    39
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    40
CFLAGS += -xstrconst
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    41
LDFLAGS += -lsocket -lnsl
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    42
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    43
CONFIGURE_ENV +=	MAKE=$(GMAKE)
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    44
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    45
CONFIGURE_OPTIONS +=	CFLAGS="$(CFLAGS)"
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    46
CONFIGURE_OPTIONS +=	CXXFLAGS="$(CXXFLAGS)"
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    47
CONFIGURE_OPTIONS +=	LDFLAGS="$(LDFLAGS)"
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    48
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    49
CONFIGURE_OPTIONS +=	--includedir=$(CONFIGURE_INCLUDEDIR)
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    50
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    51
# need some files in $(SOURCE_DIR)/docs during build
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    52
COMPONENT_PRE_CONFIGURE_ACTION = \
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    53
    ($(CLONEY) $(SOURCE_DIR) $(@D))
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    54
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    55
# need /usr/perl5/bin on path to access pod2man perl script, used by 
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    56
# the build to create docs
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    57
COMPONENT_BUILD_ENV +=	PATH=/usr/perl5/bin:$(PATH)
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    58
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    59
COMPONENT_BUILD_ENV +=	MAKE="$(GMAKE)"	
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    60
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    61
# Libmemcached's configure script sets an incorrect CFLAGS in the Makefiles
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    62
# it generates.  Make sure we use the correct one by passing CFLAGS in 
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    63
# as a build argument (CFLAGS in the environment won't take precedence
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    64
# over the Makefile one).
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    65
COMPONENT_BUILD_ARGS +=	CFLAGS="$(CFLAGS)"
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    66
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    67
# Similarly, set pkglibdir in the arguments to gmake; otherwise
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    68
# the Makefile sets runpath to a non-existent /usr/lib/libmemcached directory.
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    69
COMPONENT_BUILD_ARGS +=	pkglibdir=/usr/lib
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    70
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    71
COMPONENT_INSTALL_ENV +=	DESTDIR=$(PROTO_DIR)
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    72
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    73
COMPONENT_TEST_TARGETS =	test
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    74
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    75
# common targets
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    76
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    77
build:		$(BUILD_32_and_64)
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    78
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    79
install:	$(INSTALL_32_and_64)
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    80
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    81
# Tests fail, probably because memcached is not running.
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    82
test:		$(TEST_32_and_64)
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    83
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    84
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    85
b973df7d380a 7058577 Move libmemcached from SFW to Userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    86
include $(WS_TOP)/make-rules/depend.mk