Makefile revision 171
499b34cea04a46823d003d4c0520c8b03e8513cbBrian Wellington#
816e576f77e2c46df3e3d97d65822aa8aded7c4bDavid Lawrence# CDDL HEADER START
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson#
69b641bf31d95fd79a50dcea2cdb0fcb23fe22c6David Lawrence# The contents of this file are subject to the terms of the
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson# Common Development and Distribution License (the "License").
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson# You may not use this file except in compliance with the License.
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson#
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson# or http://www.opensolaris.org/os/licensing.
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson# See the License for the specific language governing permissions
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson# and limitations under the License.
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson#
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson# When distributing Covered Code, include this CDDL HEADER in each
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
adb6b4397091d2380f0cb412c603816610638f95Brian Wellington# If applicable, add the following below this CDDL HEADER, with the
adb6b4397091d2380f0cb412c603816610638f95Brian Wellington# fields enclosed by brackets "[]" replaced with your own identifying
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson# information: Portions Copyright [yyyy] [name of copyright owner]
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson#
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson# CDDL HEADER END
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson#
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson
59ddb53fd74be6c4d76536e45465f34f1a08b834Andreas Gustafsson#
59ddb53fd74be6c4d76536e45465f34f1a08b834Andreas Gustafsson# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
59ddb53fd74be6c4d76536e45465f34f1a08b834Andreas Gustafsson#
59ddb53fd74be6c4d76536e45465f34f1a08b834Andreas Gustafsson
59ddb53fd74be6c4d76536e45465f34f1a08b834Andreas Gustafssoninclude ../../make-rules/shared-macros.mk
59ddb53fd74be6c4d76536e45465f34f1a08b834Andreas Gustafsson
35b61b8fb1f377ec9b68bbc8e4e43fbd2756a04dAndreas Gustafsson# The archive untars to directory without the '-2' suffix, so
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson# COMPONENT_SUBVERSION had to be introduced
35b61b8fb1f377ec9b68bbc8e4e43fbd2756a04dAndreas Gustafsson#
35b61b8fb1f377ec9b68bbc8e4e43fbd2756a04dAndreas GustafssonCOMPONENT_NAME= ImageMagick
35b61b8fb1f377ec9b68bbc8e4e43fbd2756a04dAndreas GustafssonCOMPONENT_VERSION= 6.3.4
35b61b8fb1f377ec9b68bbc8e4e43fbd2756a04dAndreas GustafssonCOMPONENT_SUBVERSION= 2
35b61b8fb1f377ec9b68bbc8e4e43fbd2756a04dAndreas GustafssonCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
5c62008dee307058a7f70511bf260fdea6f5b1d6Andreas GustafssonCOMPONENT_ARCHIVE= $(COMPONENT_SRC)-$(COMPONENT_SUBVERSION).tar.gz
5c62008dee307058a7f70511bf260fdea6f5b1d6Andreas GustafssonCOMPONENT_ARCHIVE_HASH= sha1:516bb273afb007fb08f15c2747862d819a94d391
35b61b8fb1f377ec9b68bbc8e4e43fbd2756a04dAndreas GustafssonCOMPONENT_ARCHIVE_URL= http://image_magick.veidrodis.com/image_magick/$(COMPONENT_ARCHIVE)
074ae7bf0993ced96b32e3e85553a401f3f3eca9Andreas Gustafsson
074ae7bf0993ced96b32e3e85553a401f3f3eca9Andreas Gustafssoninclude ../../make-rules/prep.mk
074ae7bf0993ced96b32e3e85553a401f3f3eca9Andreas Gustafssoninclude ../../make-rules/configure.mk
074ae7bf0993ced96b32e3e85553a401f3f3eca9Andreas Gustafssoninclude ../../make-rules/ips.mk
074ae7bf0993ced96b32e3e85553a401f3f3eca9Andreas Gustafsson
074ae7bf0993ced96b32e3e85553a401f3f3eca9Andreas Gustafsson# IPS_COMPONENT_VERSION is by default set to $(COMPONENT_VERSION) but in
074ae7bf0993ced96b32e3e85553a401f3f3eca9Andreas Gustafsson# this case we need to replace the '-' by '.'.
074ae7bf0993ced96b32e3e85553a401f3f3eca9Andreas Gustafsson#
074ae7bf0993ced96b32e3e85553a401f3f3eca9Andreas GustafssonIPS_COMPONENT_VERSION= $(COMPONENT_VERSION).$(COMPONENT_SUBVERSION)
074ae7bf0993ced96b32e3e85553a401f3f3eca9Andreas Gustafsson
074ae7bf0993ced96b32e3e85553a401f3f3eca9Andreas Gustafsson# The archive contains pre-generated magick-config.h header, which is later on
074ae7bf0993ced96b32e3e85553a401f3f3eca9Andreas Gustafsson# being used and the build fails. However, we want to use the header generated
074ae7bf0993ced96b32e3e85553a401f3f3eca9Andreas Gustafsson# by configure from BUILD_DIR_32 / BUILD_DIR_64 directory, so the pre-generated
074ae7bf0993ced96b32e3e85553a401f3f3eca9Andreas Gustafsson# header file needs to be deleted.
322445da85b6a318cb2506d216442b3e5af7c3c0Andreas Gustafsson#
533df4efdafcf7a8b7292a298f45df9ab7f7f7f9Mark AndrewsCOMPONENT_PREP_ACTION= (cd $(@D) ; $(RM) magick/magick-config.h)
533df4efdafcf7a8b7292a298f45df9ab7f7f7f9Mark Andrews
a488e91e5dedfd055b6a6e6dc3018866478facceAndreas Gustafsson# To get the Perl modules built it is necessary to copy the PerlMagick directory
a488e91e5dedfd055b6a6e6dc3018866478facceAndreas Gustafsson# to the build directory
95940593a680fd37704b74849902ca7fd2ff8f2aAndreas Gustafsson#
322445da85b6a318cb2506d216442b3e5af7c3c0Andreas GustafssonCOMPONENT_PRE_CONFIGURE_ACTION= ($(CP) -R $(SOURCE_DIR)/PerlMagick $(@D))
692f5c282d13b6a0276e5a60c87ab4af013d3b80Mark Andrews
692f5c282d13b6a0276e5a60c87ab4af013d3b80Mark Andrews# Studio 12.1 -xO4 + -zignore on sparc causes linker core dump prior to
692f5c282d13b6a0276e5a60c87ab4af013d3b80Mark Andrews# build 163.
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafssonstudio_OPT.sparc.32 = -xO3
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafssonstudio_OPT.sparc.64 = -xO3
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson# Show name of "error tag" as part of the warning
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson#
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas GustafssonCFLAGS+= -errtags
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas GustafssonCONFIGURE_OPTIONS+= CFLAGS="$(CFLAGS)"
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas GustafssonCONFIGURE_OPTIONS+= CPPFLAGS="$(CFLAGS)"
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas GustafssonCONFIGURE_OPTIONS+= --with-modules
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas GustafssonCONFIGURE_OPTIONS+= --enable-shared=yes
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas GustafssonCONFIGURE_OPTIONS+= --enable-static=no
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas GustafssonCONFIGURE_OPTIONS+= --without-gvc
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas GustafssonCONFIGURE_OPTIONS.64+= --without-perl
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson
9769d3146777ca71af80b459ecec1ef8e2d05950Andreas Gustafsson# common targets
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson#
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafssonbuild: $(BUILD_32_and_64)
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafssoninstall: $(INSTALL_32_and_64)
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson# ImageMagick tests have hard-coded absolute paths inside, so essentially they
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson# can be run only after ImageMagick is actually installed and this is not
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson# possible, so the tests are not invoked.
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson#
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafssontest:
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson @echo "Tests can be run only after ImageMagick is installed."
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas GustafssonBUILD_PKG_DEPENDENCIES= $(BUILD_TOOLS)
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafsson
d8417b5f3406f4ace0f3bdb228b05a7b701976d6Andreas Gustafssoninclude ../../make-rules/depend.mk
4e0ab18258915b14c163aa9087390402f5ff599bAndreas Gustafsson