Makefile revision 4102
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews#
b091b4bb803b830d2d5a9e71b6648b669655d7dcFrancis Dupont# CDDL HEADER START
46bb3884a0738664862e3a36b7848aa374aebd45Tinderbox User#
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt# The contents of this file are subject to the terms of the
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# Common Development and Distribution License (the "License").
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User# You may not use this file except in compliance with the License.
5347c0fcb04eaea19d9f39795646239f487c6207Tinderbox User#
b091b4bb803b830d2d5a9e71b6648b669655d7dcFrancis Dupont# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
d6fa26d0adaec6c910115be34fe7a5a5f402c14fMark Andrews# or http://www.opensolaris.org/os/licensing.
b091b4bb803b830d2d5a9e71b6648b669655d7dcFrancis Dupont# See the License for the specific language governing permissions
b091b4bb803b830d2d5a9e71b6648b669655d7dcFrancis Dupont# and limitations under the License.
33d0a7767d53cb366039fd0ac4f63cf8a9c351b0Tinderbox User#
33d0a7767d53cb366039fd0ac4f63cf8a9c351b0Tinderbox User# When distributing Covered Code, include this CDDL HEADER in each
b091b4bb803b830d2d5a9e71b6648b669655d7dcFrancis Dupont# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
33d0a7767d53cb366039fd0ac4f63cf8a9c351b0Tinderbox User# If applicable, add the following below this CDDL HEADER, with the
33d0a7767d53cb366039fd0ac4f63cf8a9c351b0Tinderbox User# fields enclosed by brackets "[]" replaced with your own identifying
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# information: Portions Copyright [yyyy] [name of copyright owner]
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User#
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# CDDL HEADER END
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User#
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User#
b091b4bb803b830d2d5a9e71b6648b669655d7dcFrancis Dupontinclude ../../make-rules/shared-macros.mk
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_NAME= openexr
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_VERSION= 1.6.1
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
b091b4bb803b830d2d5a9e71b6648b669655d7dcFrancis DupontCOMPONENT_PROJECT_URL= http://www.openexr.com/
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_ARCHIVE_HASH= \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User sha256:c616906ab958de9c37bb86ca7547cfedbdfbad5e1ca2a4ab98983c9afa6a5950
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_ARCHIVE_URL= http://download.savannah.nongnu.org/releases/openexr/$(COMPONENT_ARCHIVE)
b091b4bb803b830d2d5a9e71b6648b669655d7dcFrancis DupontCOMPONENT_BUGDB= library/openexr
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserTPNO= 10771
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userinclude $(WS_MAKE_RULES)/prep.mk
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userinclude $(WS_MAKE_RULES)/configure.mk
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userinclude $(WS_MAKE_RULES)/ips.mk
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserPATCH_LEVEL = 0
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# there seems to be no other way to enable large files support
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCXXFLAGS += $(CPP_LARGEFILES)
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# it seems that --with-pic doesn't get PIC flags to the C++ compiler
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCXXFLAGS += $(CC_PIC)
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCXXFLAGS += -template=extdef
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# libtools seems to be forcing -nolibs, so we have to add back libc, libm,
33d0a7767d53cb366039fd0ac4f63cf8a9c351b0Tinderbox User# libCstd and libCrun. The last two are needed because with Studio 12.2
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# (and beyond), there is a bug in the CC driver that is not correctly using
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User# the '-library=Cstd,Crun' we are passing to it.
33d0a7767d53cb366039fd0ac4f63cf8a9c351b0Tinderbox UserLIBS += -lc -lm -lCstd -lCrun
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntCOMPONENT_TEST_TRANSFORMS += \
b091b4bb803b830d2d5a9e71b6648b669655d7dcFrancis Dupont '-e "s^-L$(CONFIGURE_LIBDIR.$(BITS))^^g"' \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User '-e "/libtool/d"' \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User '-e "/-m32/d"' \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User '-e "/-m64/d"' \
33d0a7767d53cb366039fd0ac4f63cf8a9c351b0Tinderbox User '-e "/DEPDIR=/d"'
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCONFIGURE_ENV += CFLAGS="$(CFLAGS)"
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntCONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCONFIGURE_ENV += LIBS="$(LIBS)"
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCONFIGURE_ENV += PKG_CONFIG_PATH="$(PKG_CONFIG_PATH)"
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox UserCONFIGURE_OPTIONS += --disable-static
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntCONFIGURE_OPTIONS += --enable-threading
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntCONFIGURE_OPTIONS += --enable-posix-sem
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox UserCONFIGURE_OPTIONS += --with-pic
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserPROTOPKGCONFIGDIR.32 = $(PROTOUSRLIBDIR)/pkgconfig
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserPROTOPKGCONFIGDIR.64 = $(PROTOUSRLIBDIR64)/pkgconfig
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserCOMPONENT_POST_INSTALL_ACTION = \
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User ( cd $(PROTOPKGCONFIGDIR.$(BITS)) ; \
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt $(GSED) -i "s^-L$(CONFIGURE_LIBDIR.$(BITS))^^g" OpenEXR.pc )
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox UserASLR_MODE = $(ASLR_ENABLE)
bfb7b680bf88c1fdd9949197b71c512c532280a4Tinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userconfigure: $(CONFIGURE_32_and_64)
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Huntbuild: $(BUILD_32_and_64)
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Userinstall: $(INSTALL_32_and_64)
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan Hunt
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox Usertest: $(TEST_32_and_64)
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntREQUIRED_PACKAGES += library/ilmbase
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserREQUIRED_PACKAGES += library/zlib
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox UserREQUIRED_PACKAGES += system/library
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntREQUIRED_PACKAGES += system/library/c++-runtime
ba751492fcc4f161a18b983d4f018a1a52938cb9Evan HuntREQUIRED_PACKAGES += system/library/math
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User
7911e6f9de303bca5a3d8b34f4330c8f7cecffaeTinderbox User