components/libtorrent/Makefile
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Tue, 14 Jun 2011 10:43:31 -0700
changeset 300 6bbccb36ba62
parent 248 3011f7a1ed77
child 673 bb9df3c906be
permissions -rw-r--r--
7054621 rtorrent doesn't build on 167
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
248
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     1
#
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     2
# CDDL HEADER START
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     3
#
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     7
#
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    11
# and limitations under the License.
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    12
#
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    18
#
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    19
# CDDL HEADER END
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    20
#
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    21
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    22
#
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    23
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    24
#
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    25
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    26
include ../../make-rules/shared-macros.mk
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    27
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    28
COMPONENT_NAME=		libtorrent
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    29
COMPONENT_VERSION=	0.12.2
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    30
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    31
COMPONENT_PROJECT_URL=	http://libtorrent.rakshasa.no/
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    32
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    33
COMPONENT_ARCHIVE_HASH=	sha1:a53d2c671e9f2dd971d0622d5b3672da91c46ef9
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    34
COMPONENT_ARCHIVE_URL=	http://libtorrent.rakshasa.no/downloads/$(COMPONENT_ARCHIVE)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    35
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    36
include ../../make-rules/prep.mk
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    37
include ../../make-rules/configure.mk
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    38
include ../../make-rules/ips.mk
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    39
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    40
COMPONENT_PRE_CONFIGURE_ACTION = \
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    41
	($(CLONEY) $(SOURCE_DIR) $(@D))
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    42
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    43
COMPONENT_PREP_ACTION = \
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    44
        (cd $(@D) ; \
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    45
	    aclocal-1.10 -I./scripts -I. ; \
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    46
	    autoheader; \
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    47
	    libtoolize --automake --copy --force; \
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    48
	    automake-1.10; \
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    49
	    autoconf )
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    50
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    51
# Although -norunpath is set for CXXFLAGS, we need to put -norunpath 
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    52
# here, otherwise -norunpath doesn't get set when creating the shared 
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    53
# libraries (CC -G).
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    54
CXX+=   $(studio_NORUNPATH)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    55
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    56
# this is needed or we can't compile the rak headers
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    57
CC=$(CXX)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    58
300
6bbccb36ba62 7054621 rtorrent doesn't build on 167
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 248
diff changeset
    59
CXXFLAGS +=	$(studio_OPT)
248
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    60
CXXFLAGS +=	-i
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    61
CXXFLAGS +=	-xspace
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    62
CXXFLAGS +=	-mr
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    63
CXXFLAGS +=	$(studio_XREGS)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    64
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    65
CONFIGURE_OPTIONS  +=	--enable-shared
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    66
CONFIGURE_OPTIONS  +=	--disable-debug
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    67
CONFIGURE_OPTIONS  +=	--disable-static
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    68
CONFIGURE_OPTIONS  +=	--with-ports
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    69
CONFIGURE_OPTIONS  +=	--disable-libtool-lock
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    70
CONFIGURE_OPTIONS.32 +=	--srcdir=$(BUILD_DIR_32)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    71
CONFIGURE_OPTIONS.64 +=	--srcdir=$(BUILD_DIR_64)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    72
CONFIGURE_OPTIONS  +=	CFLAGS="$(CFLAGS)"
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    73
CONFIGURE_OPTIONS  +=	CXXFLAGS="$(CXXFLAGS)"
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    74
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    75
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    76
# common targets
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    77
build:		$(BUILD_32_and_64)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    78
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    79
install:	$(INSTALL_32_and_64)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    80
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    81
test:		$(NO_TESTS)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    82
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    83
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    84
3011f7a1ed77 7046137 move *torrent to userland
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents:
diff changeset
    85
include ../../make-rules/depend.mk