components/lcms/Makefile
author Norm Jacobs <Norm.Jacobs@Oracle.COM>
Wed, 13 Apr 2011 09:58:06 -0700
changeset 181 87e11e685b1f
parent 174 187aa0541610
child 206 a4474882bf60
permissions -rw-r--r--
7003927 userland should postprocess packaged files 7034188 userland should have common lint library rules 7034992 userland packages should include opensolaris.arc_url data 7019309 move ghostscript to userland (fix build)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
174
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     1
#
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     3
#
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     7
#
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    12
#
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    18
#
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    20
#
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    21
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    22
#
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    24
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    25
COMPONENT_NAME =        lcms
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    26
COMPONENT_VERSION=      1.19
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    27
COMPONENT_SRC=          $(COMPONENT_NAME)-$(COMPONENT_VERSION)
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    28
COMPONENT_PROJECT_URL=  http://www.littlecms.com/
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    29
COMPONENT_ARCHIVE=      $(COMPONENT_SRC).tar.gz
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    30
COMPONENT_ARCHIVE_HASH= sha1:d5b075ccffc0068015f74f78e4bc39138bcfe2d4
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    31
COMPONENT_ARCHIVE_URL=  http://sourceforge.net/projects/lcms/files/lcms/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    32
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    33
PYTHON_VERSION = 2.6
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    34
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    35
include ../../make-rules/prep.mk
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    36
include ../../make-rules/configure.mk
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    37
include ../../make-rules/ips.mk
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 174
diff changeset
    38
include ../../make-rules/lint-libraries.mk
174
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    39
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    40
PKG_CONFIG_PATH_32 = /usr/lib/pkgconfig
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    41
PKG_CONFIG_PATH_64 = /usr/lib/$(MACH64)/pkgconfig
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    42
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    43
PATCH_LEVEL = 0
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    44
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    45
# These aren't set by default.
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    46
PYTHON.$(PYTHON_VERSION).32 = /usr/bin/python2.6
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    47
PYTHON.$(PYTHON_VERSION).64 = /usr/bin/$(MACH64)/python2.6
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    48
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    49
PYTHONMODULEDIR_32 = /usr/lib/python$(PYTHON_VERSION)/vendor-packages
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    50
PYTHONMODULEDIR_64 = /usr/lib/python$(PYTHON_VERSION)/vendor-packages/64
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    51
PROTOPYTHONMODULE32DIR = $(PROTOUSRLIBDIR)/python$(PYTHON_VERSION)/vendor-packages
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    52
PROTOPYTHONMODULE64DIR = $(PROTOUSRLIBDIR)/python$(PYTHON_VERSION)/vendor-packages/64
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    53
PROTOUSRINCLUDEDIR = $(PROTO_DIR)/usr/include
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    54
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 174
diff changeset
    55
# We have to do this because libtool builds the C++ library with an
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 174
diff changeset
    56
# incorrect RUNPATH/RPATH
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 174
diff changeset
    57
CCC += -norunpath
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 174
diff changeset
    58
174
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    59
CFLAGS += -Xc -xnorunpath $(CC_BITS)
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    60
CFLAGS += $(studio_C99_ENABLE) $(CPP_POSIX) $(CPP_LARGEFILES)
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    61
CPPFLAGS += $(CPP_POSIX) $(CPP_LARGEFILES) -DNDEBUG
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    62
CXXFLAGS += -mt -library=Crun -library=Cstd -compat=5
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    63
CXXFLAGS += -features=anachronisms,except,rtti,export,extensions,nestedaccess,tmplife,tmplrefstatic
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    64
CXXFLAGS += -instances=global -template=geninlinefuncs -xlang=c99
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    65
CXXFLAGS += -xbuiltin=%none -xinline=%auto
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    66
CXXFLAGS += -D_XPG5 -D_XOPEN_SOURCE=500 -D__EXTENSIONS__=1
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    67
CXXFLAGS += $(CPP_POSIX) $(CPP_LARGEFILES) $(CC_BITS)
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    68
LDFLAGS += -lpython$(PYTHON_VERSION) -lc -lm
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    69
PYTHONPATH_32 = /usr/lib/python$(PYTHON_VERSION)
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    70
PYTHONPATH_64 = /usr/lib/$(MACH64)/python$(PYTHON_VERSION)
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    71
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    72
CONFIGURE_ENV += CXX="$(CCC)"
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    73
CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    74
CONFIGURE_ENV += CXXFLAGS="$(CXXFLAGS)"
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    75
CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    76
CONFIGURE_ENV += CCLD="$(CC) $(CFLAGS) $(LDFLAGS)"
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    77
CONFIGURE_ENV += CXXLD="$(CCC) $(CXXFLAGS) $(LDFLAGS)"
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    78
CONFIGURE_ENV += CXXCPP="$(CCC) $(CPPFLAGS) $(CXXFLAGS) -E"
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    79
CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    80
CONFIGURE_ENV += PYTHON="$(PYTHON)"
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    81
CONFIGURE_ENV += PYTHONPATH="$(PYTHONPATH_$(BITS))"
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    82
CONFIGURE_ENV += PYTHONMODULEDIR="$(PYTHONMODULEDIR_$(BITS))"
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    83
CONFIGURE_ENV += PKG_CONFIG_PATH="$(PKG_CONFIG_PATH_$(BITS))"
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    84
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    85
CONFIGURE_OPTIONS  +=           --includedir=/usr/include/lcms
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    86
CONFIGURE_OPTIONS  +=           --enable-shared
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    87
CONFIGURE_OPTIONS  +=           --disable-static
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    88
CONFIGURE_OPTIONS  +=           --with-jpeg
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    89
CONFIGURE_OPTIONS  +=           --with-tiff
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    90
CONFIGURE_OPTIONS  +=           --with-zlib
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    91
CONFIGURE_OPTIONS  +=           --with-python
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    92
CONFIGURE_OPTIONS  +=           --with-pic
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    93
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    94
PKG_PROTO_DIRS +=	$(COMPONENT_SRC)
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    95
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    96
COMPONENT_POST_CONFIGURE_ACTION = \
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    97
    ( cd $(@D); \
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    98
    $(CP) -p $(SOURCE_DIR)/include/lcms.h ./include/ ; \
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
    99
    $(RM) -f $(SOURCE_DIR)/include/icc34.h ; \
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
   100
    $(CP) -p include/icc34.h $(SOURCE_DIR)/include/ )
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
   101
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 174
diff changeset
   102
LINT_FLAGS += -I$(COMPONENT_DIR)/$(COMPONENT_SRC)/include
174
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
   103
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
   104
build: $(BUILD_32_and_64)
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
   105
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 174
diff changeset
   106
install: $(INSTALL_32_and_64)
174
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
   107
181
87e11e685b1f 7003927 userland should postprocess packaged files
Norm Jacobs <Norm.Jacobs@Oracle.COM>
parents: 174
diff changeset
   108
test: $(TEST_32_and_64)
174
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
   109
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
   110
BUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
   111
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
   112
include ../../make-rules/depend.mk
187aa0541610 7031766 LCMS needs to move to Userland
Stefan Teleman <stefan.teleman@oracle.com>
parents:
diff changeset
   113