Makefile revision 618
293N/A#
293N/A# CDDL HEADER START
293N/A#
293N/A# The contents of this file are subject to the terms of the
293N/A# Common Development and Distribution License (the "License").
293N/A# You may not use this file except in compliance with the License.
293N/A#
293N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
293N/A# or http://www.opensolaris.org/os/licensing.
293N/A# See the License for the specific language governing permissions
293N/A# and limitations under the License.
293N/A#
293N/A# When distributing Covered Code, include this CDDL HEADER in each
293N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
293N/A# If applicable, add the following below this CDDL HEADER, with the
293N/A# fields enclosed by brackets "[]" replaced with your own identifying
293N/A# information: Portions Copyright [yyyy] [name of copyright owner]
293N/A#
293N/A# CDDL HEADER END
293N/A#
293N/A
293N/A#
3996N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
293N/A#
293N/A
293N/Ainclude ../../make-rules/shared-macros.mk
293N/A
293N/ACOMPONENT_NAME= zlib
293N/ACOMPONENT_VERSION= 1.2.3
293N/ACOMPONENT_PROJECT_URL= http://www.zlib.net/
1191N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
293N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
293N/ACOMPONENT_ARCHIVE_HASH= sha1:60faeaaf250642db5c0ea36cd6dcc9f99c8f3902
293N/ACOMPONENT_ARCHIVE_URL= http://downloads.sourceforge.net/project/libpng/zlib/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
844N/A
1191N/Ainclude ../../make-rules/prep.mk
293N/Ainclude ../../make-rules/configure.mk
1273N/Ainclude ../../make-rules/ips.mk
293N/Ainclude ../../make-rules/lint-libraries.mk
3661N/A
3661N/A# Zlib won't build without cloning. We need also to get rid of default
3996N/A# Makefile and get our own version of zlib.h to avoid interactions
3996N/A# between 32 and 64 bit builds.
293N/ACOMPONENT_PRE_CONFIGURE_ACTION = ( \
4374N/A $(CLONEY) $(SOURCE_DIR) $(@D); \
4374N/A $(RM) $(@D)/Makefile $(@D)/zconf.h; \
4374N/A $(CP) $(SOURCE_DIR)/zconf.h $(@D) )
4374N/A
4374N/ACFLAGS += $(CC_PIC)
293N/A
293N/A# We need to reset configure options here because zlib is confused with
293N/A# CC and CFLAGS definitions as configure parameters.
293N/ACONFIGURE_OPTIONS = --shared
293N/ACONFIGURE_OPTIONS += --prefix=/usr
293N/ACONFIGURE_OPTIONS += $(CONFIGURE_OPTIONS.$(BITS))
293N/ACONFIGURE_OPTIONS.64 += --libdir=/usr/lib/$(MACH64)
293N/A
293N/ACONFIGURE_ENV += CC="$(CC)"
293N/ACONFIGURE_ENV += CFLAGS="$(CFLAGS)"
293N/ACONFIGURE_ENV += LDSHARED="$(CC) $(CFLAGS) -G"
716N/A
293N/A# This LDSHARED definitions is forced to get all required options plus
293N/A# mapfile for result linking. While the one used with configure is just
293N/A# to allow Zlib detect capability of creating shared libraries.
293N/ACOMPONENT_BUILD_ARGS = LDSHARED="$(CC) $(CFLAGS) -G -h libz.so.1 $(LD_OPTIONS_SO) -M ../../mapfile -L."
293N/A
293N/ACOMPONENT_TEST_TARGETS = test
293N/A
293N/Abuild: $(BUILD_32_and_64)
293N/A
3996N/Ainstall: $(INSTALL_32_and_64)
3996N/A
3996N/Atest: $(TEST_32_and_64)
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include ../../make-rules/depend.mk