Makefile revision 4911
3952N/A#
3952N/A# CDDL HEADER START
3952N/A#
3952N/A# The contents of this file are subject to the terms of the
3952N/A# Common Development and Distribution License (the "License").
3952N/A# You may not use this file except in compliance with the License.
3952N/A#
6983N/A# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
6983N/A# or http://www.opensolaris.org/os/licensing.
3952N/A# See the License for the specific language governing permissions
3952N/A# and limitations under the License.
3952N/A#
3952N/A# When distributing Covered Code, include this CDDL HEADER in each
6983N/A# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
6983N/A# If applicable, add the following below this CDDL HEADER, with the
6983N/A# fields enclosed by brackets "[]" replaced with your own identifying
6983N/A# information: Portions Copyright [yyyy] [name of copyright owner]
3952N/A#
3952N/A# CDDL HEADER END
3952N/A#
3952N/A# Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
5185N/A#
6307N/Ainclude ../../make-rules/shared-macros.mk
5185N/A
5185N/ACOMPONENT_NAME= pixz
5185N/ACOMPONENT_VERSION= 1.0
3952N/ACOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
3952N/ACOMPONENT_PROJECT_URL= http://github.com/vasi/pixz/
3952N/ACOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
3952N/ACOMPONENT_ARCHIVE_HASH= \
3952N/A sha256:912c60de88f7eca2e1c6fe13eec5371f723018dca933796c47cd50bf6a349fc9
3952N/ACOMPONENT_ARCHIVE_URL= $(COMPONENT_PROJECT_URL)archive/$(COMPONENT_ARCHIVE)
3952N/ACOMPONENT_BUGDB= utility/pixz
5185N/A
3952N/ATPNO= 11623
3952N/A
3952N/Ainclude $(WS_MAKE_RULES)/prep.mk
3952N/Ainclude $(WS_MAKE_RULES)/justmake.mk
3952N/Ainclude $(WS_MAKE_RULES)/ips.mk
3952N/A
3952N/APKG_PROTO_DIRS += $(BUILD_DIR_64)
3952N/APKG_PROTO_DIRS += $(COMPONENT_DIR)/files
3952N/A
3952N/A# Userland default includes -mt which links with libthread which we don't need.
3952N/Astudio_MT =
3952N/A
3952N/A# pixz's Makefile hard-codes some gcc-only flags in MYCFLAGS and MYLDFLAGS,
3952N/A# then appends CFLAGS & LDFLAGS to each. Here we include their preset values
3952N/A# minus the gcc-only parts, so we can build with Studio.
3952N/ACOMPONENT_BUILD_ARGS += CC="$(CC)"
3952N/ACOMPONENT_BUILD_ARGS += MYCFLAGS='$(patsubst %,-I%/include,$(LIBPREFIX)) $(OPT)'
4115N/ACOMPONENT_BUILD_ARGS += MYLDFLAGS='$(patsubst %,-L%/lib,$(LIBPREFIX)) $(OPT)'
3952N/ACOMPONENT_BUILD_ARGS += CFLAGS="$(CFLAGS)"
6307N/ACOMPONENT_BUILD_ARGS += LDFLAGS="$(CC_BITS)"
4770N/A
4770N/A# Create a small testball to use with the test script.
3952N/ACOMPONENT_PRE_TEST_ACTION = \
3952N/A (cd $(@D); tar cvf pixz-test-tarball.tar *.c *.o)
5223N/ACOMPONENT_PRE_SYSTEM_TEST_ACTION = \
3952N/A (cd $(@D); tar cvf pixz-test-tarball.tar *.c *.o)
3952N/A
3952N/ACOMPONENT_TEST_TRANSFORMS += \
3952N/A '-e "/^real/d" ' \
3952N/A '-e "/^user/d" ' \
3952N/A '-e "/^sys/d" '
3952N/A
3952N/ACOMPONENT_TEST_ENV = PATH=$(GNUBIN):$(PATH)
4804N/ACOMPONENT_TEST_CMD = $(SOURCE_DIR)/test.sh
3952N/ACOMPONENT_TEST_ARGS = pixz-test-tarball.tar pixz.c
5185N/ACOMPONENT_TEST_TARGETS =
4804N/A
5185N/ACOMPONENT_SYSTEM_TEST_ENV = PATH=$(GNUBIN):$(PATH)
5185N/ACOMPONENT_SYSTEM_TEST_ENV += PIXZ_BIN=/usr/bin/pixz
5185N/ACOMPONENT_SYSTEM_TEST_CMD = $(SOURCE_DIR)/test.sh
5185N/ACOMPONENT_SYSTEM_TEST_ARGS = pixz-test-tarball.tar pixz.c
3952N/ACOMPONENT_SYSTEM_TEST_TARGETS =
3952N/A
4495N/AASLR_MODE = $(ASLR_ENABLE)
3952N/A
3952N/Abuild: $(BUILD_64)
3952N/A
3952N/Ainstall: $(BUILD_64)
3952N/A
3952N/Atest: $(TEST_64)
3952N/A
3952N/Asystem-test: build $(SYSTEM_TEST_64)
3952N/A
3952N/A
3952N/AREQUIRED_PACKAGES += compress/xz
4495N/AREQUIRED_PACKAGES += library/libarchive
4495N/AREQUIRED_PACKAGES += system/library
3952N/A