Makefile revision 151
70N/A#
70N/A# CDDL HEADER START
70N/A#
70N/A# The contents of this file are subject to the terms of the
943N/A# Common Development and Distribution License (the "License").
70N/A# You may not use this file except in compliance with the License.
70N/A#
919N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
919N/A# or http://www.opensolaris.org/os/licensing.
919N/A# See the License for the specific language governing permissions
919N/A# and limitations under the License.
919N/A#
919N/A# When distributing Covered Code, include this CDDL HEADER in each
919N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
919N/A# If applicable, add the following below this CDDL HEADER, with the
919N/A# fields enclosed by brackets "[]" replaced with your own identifying
919N/A# information: Portions Copyright [yyyy] [name of copyright owner]
919N/A#
919N/A# CDDL HEADER END
919N/A#
919N/A
919N/A#
919N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
919N/A#
70N/A
70N/Ainclude ../../make-rules/shared-macros.mk
70N/A
70N/ACOMPONENT_NAME= bzip2
493N/ACOMPONENT_VERSION= 1.0.6
70N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
70N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
851N/ACOMPONENT_ARCHIVE_HASH= sha1:3f89f861209ce81a6bab1fd1998c0ef311712002
70N/ACOMPONENT_ARCHIVE_URL= http://www.bzip.org/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
911N/A
911N/Ainclude ../../make-rules/prep.mk
911N/Ainclude ../../make-rules/justmake.mk
911N/Ainclude ../../make-rules/ips.mk
970N/A
970N/ALIBNAME= bz2
970N/ALINTOUT= lint.out
970N/ALINTFLAGS= -nsvx -I. $(BITS32)
970N/ALINTFLAGS64= -nsvx -I. $(BITS64)
970N/A
970N/A# we need to enable large file support and build PIC for our shared libraries
970N/ACFLAGS += $(CPP_LARGEFILE) $(CC_PIC)
970N/A
970N/ACOMPONENT_BUILD_ENV += CC="$(CC)"
970N/ACOMPONENT_BUILD_ARGS += CC="$(CC)"
970N/ACOMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)"
70N/ACOMPONENT_INSTALL_ARGS += PREFIX=$(PROTOUSRDIR)
70N/A
493N/ACOMPONENT_PRE_BUILD_ACTION= \
70N/A (cd $(@D) ; \
970N/A cp ../../oldapi.c . )
970N/A
970N/ACOMPONENT_POST_BUILD_ACTION= \
70N/A (cd $(@D) ; \
970N/A $(LINT) -o $(LIBNAME) ../../llib-lbz2 > $(LINTOUT) 2>&1)
970N/A
970N/A
970N/A# common targets
970N/Abuild: $(BUILD_32) $(BUILD_64)
970N/A
MAN1FILES= bunzip2.1 bzcat.1 bzdiff.1 bzgrep.1 \
bzip2.1 bzip2recover.1 bzmore.1
MAN3FILES=libbz2.3
include ../../make-rules/shared-targets.mk
install: build $(INSTALL_32) $(PROTOMAN3FILES) $(PROTOMAN1FILES)
$(INSTALL) $(BUILD_DIR_32)/libbz2.so.1 $(PROTOUSRLIBDIR)
cd $(PROTOUSRLIBDIR); rm -f libbz2.so; ln -s libbz2.so.1 libbz2.so
$(INSTALL) llib-lbz2 $(PROTOUSRLIBDIR)
$(INSTALL) $(BUILD_DIR_32)/llib-lbz2.ln $(PROTOUSRLIBDIR)
$(MKDIR) $(PROTOUSRLIBDIR64)
$(INSTALL) $(BUILD_DIR_64)/libbz2.so.1 $(PROTOUSRLIBDIR64)
cd $(PROTOUSRLIBDIR64); rm -f libbz2.so; ln -s libbz2.so.1 libbz2.so
$(INSTALL) $(BUILD_DIR_64)/llib-lbz2.ln $(PROTOUSRLIBDIR64)
# build does this always
test: build
@cd $(BUILD_DIR_32); $(MAKE) check
@cd $(BUILD_DIR_64); $(MAKE) check
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
include ../../make-rules/depend.mk