1 # 2 # CDDL HEADER START 3 # 4 # The contents of this file are subject to the terms of the 5 # Common Development and Distribution License (the "License"). 6 # You may not use this file except in compliance with the License. 7 # 8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 # or http://www.opensolaris.org/os/licensing. 10 # See the License for the specific language governing permissions 11 # and limitations under the License. 12 # 13 # When distributing Covered Code, include this CDDL HEADER in each 14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 # If applicable, add the following below this CDDL HEADER, with the 16 # fields enclosed by brackets "[]" replaced with your own identifying 17 # information: Portions Copyright [yyyy] [name of copyright owner] 18 # 19 # CDDL HEADER END 20 # 21 22 # 23 # Copyright 2009 Sun Microsystems, Inc. All rights reserved. 24 # Use is subject to license terms. 25 # 26 # ident "@(#)Makefile.sfw 1.4 09/04/01 SMI" 27 # 28 29 VER=$(COMPONENT_NAME:sh)-$(COMPONENT_VERSION:sh) 30 31 LIGHTTPD_INSTALLDIR=/usr/lighttpd/1.4 32 33 MYSQL_DIR=/usr/mysql 34 MYSQL_LIBDIR=$(MYSQL_DIR)/lib/mysql 35 MYSQL_CONFIG=$(MYSQL_DIR)/bin/mysql_config 36 37 LIGHTTPD_CFLAGS="-xO4 -xbuiltin=%all -xinline=%auto -xprefetch=auto -xdepend -xc99=%all -D_XOPEN_SOURCE=600 -D__EXTENSIONS__=1 -xstrconst -I/usr/include/pcre" 38 39 LIGHTTPD_LDFLAGS="-L$(SPRO_VROOT)/lib -L$(ROOT)$(MYSQL_LIBDIR) -lsendfile" 40 41 include ../Makefile.cmd 42 43 all: $(VER)/config.status 44 (cd $(VER); \ 45 env - \ 46 PATH=$(SFW_PATH) \ 47 MAKE=$(CCSMAKE) \ 48 $(CCSMAKE)) 49 50 install: all 51 (cd $(VER); \ 52 env - \ 53 DESTDIR=$(ROOT) \ 54 PATH=$(SFW_PATH) \ 55 MAKE=$(CCSMAKE) \ 56 $(CCSMAKE) install) 57 env VER=$(VER) $(SHELL) ./install-sfw 58 59 $(VER)/config.status: $(VER)/configure 60 (cd $(VER); env - \ 61 CC=$(CC) \ 62 CFLAGS=$(LIGHTTPD_CFLAGS) \ 63 LDFLAGS=$(LIGHTTPD_LDFLAGS)\ 64 PATH=$(SFW_PATH) \ 65 MAKE=$(CCSMAKE) \ 66 PCRECONFIG=/usr/bin/pcre-config \ 67 INSTALL=$(GINSTALL) \ 68 ./configure --prefix=$(LIGHTTPD_INSTALLDIR) \ 69 --mandir=$(LIGHTTPD_INSTALLDIR)/man \ 70 --with-pic \ 71 --with-openssl \ 72 --with-pcre=/usr \ 73 --with-mysql=$(ROOT)$(MYSQL_CONFIG)) 74 75 $(VER)/configure: $(VER).tar.gz 76 /usr/bin/gzip -dc $(VER).tar.gz | \ 77 $(GTAR) xpf - --no-same-owner 78 touch $(VER)/configure 79 # lighttpd-nodelay.patch: See Lighttpd ticket #1239 80 # lighttpd-fix_mod_simple_vhost.patch: See Lighttpd ticket #1905 81 (cd $(VER)/src; \ 82 gpatch < ../../patches/lighttpd-nodelay.patch; \ 83 gpatch < ../../patches/lighttpd-fix_mod_simple_vhost.patch; \ 84 ) 85 86 clean: 87 -rm -rf $(VER) 88 89 include ../Makefile.targ 90 91 FRC: 92