#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# or http://www.opensolaris.org/os/licensing.
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "@(#)Makefile.sfw 1.3 09/12/07 SMI"
include ../Makefile.cmd
VER =$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)
TARBALL =$(VER).tar.gz
CXXFLAGS_i386 = -i -xspace -pentium -mr -norunpath -xregs=no%frameptr -xO1 -I/usr/sfw/include -I/usr/include/ncurses -I$(ROOT)/usr/include
CXXFLAGS_sparc = -i -xspace -xarch=v8a -mr -norunpath -xO1 -I/usr/sfw/include -I/usr/include/ncurses -I$(ROOT)/usr/include
LDFLAGS = -Wl,-zignore -Wl,-zcombreloc -Wl,-Bdirect -L/usr/sfw/lib -R/usr/sfw/lib -L/usr/gnu/lib -R/usr/gnu/lib -L$(ROOT)/usr/lib/
PKG_CONFIG_PATH = /usr/lib/pkgconfig:$(ROOT)/usr/lib/pkgconfig
# Build rtorrent
# set CC to $CCC so that rak header files can be compile correctly
all: $(VER)/config.status
(cd $(VER); env - \
"CC=$(CCC)" \
"CXX=$(CCC)" \
"CXXFLAGS=$(CXXFLAGS_$(MACH))" \
"LDFLAGS=$(LDFLAGS)" \
"PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)" \
$(SFW_ENV) \
$(CCSMAKE))
install: all
VERSDIR=$(VER) $(SHELL) ./install-sfw
$(VER)/config.status: $(VER)/configure
(cd $(VER); env - \
$(SFW_ENV) \
"CC=$(CCC)" \
"CXX=$(CCC)" \
"CXXFLAGS=$(CXXFLAGS_$(MACH))" \
"LDFLAGS=$(LDFLAGS)" \
"PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)" \
$(SHELL) ./configure $(CONFIGURE_OPTIONS))
$(VER)/configure: $(TARBALL)
gzip -dc $(TARBALL) | tar xopf -
( cd $(VER); \
gpatch -p1 < ../patches/rtorrent-01-solaris.diff; \
gpatch -p1 < ../patches/rtorrent-02-event-ports.diff; \
gpatch -p1 < ../patches/rtorrent-03-curl-event.diff; \
gpatch -p1 < ../patches/rtorrent-04-sunpro.diff; \
gpatch -p1 < ../patches/rtorrent-05-sunpro-crash.diff; \
aclocal-1.10 -I./scripts -I. ; \
autoheader; \
libtoolize --automake --copy --force; \
automake-1.10; \
autoconf )
clean:
-rm -rf $(VER)
include ../Makefile.targ