#
# 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 (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
#
# ident "@(#)Makefile.sfw 1.6 10/08/31 SMI"
#
VER=$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh)
TARBALL=$(VER).tar.gz
PATCHES:sh = echo Patches/*.patch
LIGHTTPD_INSTALLDIR=/usr/lighttpd/1.4
MYSQL_DIR=/usr/mysql
MYSQL_LIBDIR=$(MYSQL_DIR)/lib/mysql
MYSQL_CONFIG=$(MYSQL_DIR)/bin/mysql_config
LIGHTTPD_CFLAGS="-xO4 -xbuiltin=%all -xinline=%auto -xprefetch=auto -xdepend -xc99=%all -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -xstrconst -I/usr/include/pcre"
LIGHTTPD_LDFLAGS="-L$(SPRO_VROOT)/lib -L$(ROOT)$(MYSQL_LIBDIR) -lsendfile"
include ../Makefile.cmd
all: $(VER)/config.status
(cd $(VER); \
env - \
PATH=$(SFW_PATH) \
MAKE=$(CCSMAKE) \
$(CCSMAKE))
install: all
(cd $(VER); \
env - \
DESTDIR=$(ROOT) \
PATH=$(SFW_PATH) \
MAKE=$(CCSMAKE) \
$(CCSMAKE) install)
env VER=$(VER) $(SHELL) ./install-sfw
$(VER)/config.status: $(VER)/configure
(cd $(VER); env - \
CC=$(CC) \
CFLAGS=$(LIGHTTPD_CFLAGS) \
LDFLAGS=$(LIGHTTPD_LDFLAGS)\
PATH=$(SFW_PATH) \
MAKE=$(CCSMAKE) \
PCRECONFIG=/usr/bin/pcre-config \
INSTALL=$(GINSTALL) \
LUA_LIBS=$(ROOT)/usr/lib \
LUA_CFLAGS=-I$(ROOT)/usr/include \
./configure --prefix=$(LIGHTTPD_INSTALLDIR) \
--mandir=$(LIGHTTPD_INSTALLDIR)/man \
--with-pic \
--with-lua \
--with-openssl \
--with-pcre=/usr \
--with-mysql=$(ROOT)$(MYSQL_CONFIG))
$(VER)/configure: $(VER)/configure.in
(cd $(VER); env - \
AUTOMAKE=/usr/bin/automake-1.10 \
ACLOCAL=/usr/bin/aclocal-1.10 \
./autogen.sh )
$(VER)/configure.in: $(VER)/.patched
touch $@
clean:
-rm -rf $(VER)
include ../Makefile.targ
FRC: