components/serf/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Thu, 07 Jan 2016 13:22:27 -0800
changeset 5243 cb29cf94919d
child 5251 884af3874810
permissions -rw-r--r--
PSARC 2015/152 serf - High-performance asynchronous HTTP client library 20780708 We should integrate serf into Solaris
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5243
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
#
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
#
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
#
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
#
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
#
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
#
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
#
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
COMPONENT_NAME=		serf
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
COMPONENT_VERSION=	1.3.8
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    28
COMPONENT_PROJECT_URL=	http://serf.googlecode.com/
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    29
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
COMPONENT_ARCHIVE_HASH=	\
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
    sha256:e0500be065dbbce490449837bb2ab624e46d64fc0b090474d9acaa87c82b2590
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    32
COMPONENT_ARCHIVE_URL=	$(COMPONENT_PROJECT_URL)svn/src_releases/$(COMPONENT_ARCHIVE)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
COMPONENT_BUGDB=	library/libserf
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    35
TPNO=			22208
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    36
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
include $(WS_MAKE_RULES)/prep.mk
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    38
# Needed by the test: target. We override build and install.
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    39
include $(WS_MAKE_RULES)/justmake.mk
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    40
include $(WS_MAKE_RULES)/ips.mk
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    41
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    42
USED_APR =		/usr/apr/1.5
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    43
USED_APU =		/usr/apr-util/1.5
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    44
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    45
APR_32 =		$(USED_APR)/bin/apr-1-config
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    46
APR_64 =		$(USED_APR)/bin/$(MACH64)/apr-1-config
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    47
APU_32 =		$(USED_APU)/bin/apu-1-config
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    48
APU_64 =		$(USED_APU)/bin/$(MACH64)/apu-1-config
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    49
SERFLIBPATH_32 =	-R$(USED_APR)/lib -R$(USED_APU)/lib
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    50
SERFLIBPATH_64 =	-R$(USED_APR)/lib/64 -R$(USED_APU)/lib/64
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    51
SERFLIBDIR_32 =		/usr/lib
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    52
SERFLIBDIR_64 =		/usr/lib/64
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    53
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    54
# We have to roll our own as serf is built with scons.
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    55
SCONS =			/usr/bin/scons
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    56
COMPONENT_BUILD_ARGS +=	CPPFLAGS=-D__EXTENSIONS__
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    57
COMPONENT_BUILD_ARGS +=	CFLAGS=$(CC_BITS)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    58
COMPONENT_BUILD_ARGS +=	LINKFLAGS="$(CC_BITS) $(SERFLIBPATH_$(BITS))"
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    59
COMPONENT_BUILD_ARGS += APR=$(APR_$(BITS))
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    60
COMPONENT_BUILD_ARGS += APU=$(APU_$(BITS))
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    61
COMPONENT_BUILD_ARGS += PREFIX=/usr
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    62
COMPONENT_BUILD_ARGS += LIBDIR=$(SERFLIBDIR_$(BITS))
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    63
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    64
COMPONENT_TEST_CMD =	$(SCONS)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    65
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    66
COMPONENT_TEST_TRANSFORMS += \
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    67
	'-e "/^cc /d" ' \
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    68
	'-e "/warning:/d"' \
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    69
	'-e "/prototype:/d"' \
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    70
	'-e "/argument/d"'
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    71
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    72
ASLR_MODE = $(ASLR_ENABLE)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    73
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    74
$(BUILD_DIR)/%/.built:  $(SOURCE_DIR)/.prep
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    75
	$(RM) -r $(@D) ; $(MKDIR) $(@D)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    76
	$(CLONEY) $(SOURCE_DIR) $(@D)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    77
	(cd $(@D) ; $(SCONS) $(COMPONENT_BUILD_ARGS))
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    78
ifeq   ($(strip $(PARFAIT_BUILD)),yes)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    79
	-$(PARFAIT) $(@D)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    80
endif
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    81
	$(TOUCH) $@
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    82
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    83
configure:	$(CONFIGURE_32_and_64)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    84
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    85
build:		$(BUILD_32_and_64)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    86
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    87
# As there aren't many files, just get them out of the build directory.
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    88
install:	build
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    89
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    90
test:		$(TEST_32_and_64)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    91
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    92
system-test:	$(SYSTEM_TESTS_NOT_IMPLEMENTED)
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    93
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    94
REQUIRED_PACKAGES += developer/build/scons-27
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    95
REQUIRED_PACKAGES += library/apr-15
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    96
REQUIRED_PACKAGES += library/apr-util-15
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    97
REQUIRED_PACKAGES += library/expat
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    98
REQUIRED_PACKAGES += library/openldap
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    99
REQUIRED_PACKAGES += library/security/openssl
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   100
REQUIRED_PACKAGES += library/zlib
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   101
REQUIRED_PACKAGES += system/library
cb29cf94919d PSARC 2015/152 serf - High-performance asynchronous HTTP client library
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
   102
REQUIRED_PACKAGES += system/library/math