components/libmng/Makefile
changeset 200 936900594dba
child 206 a4474882bf60
equal deleted inserted replaced
199:b87534be1a76 200:936900594dba
       
     1 #
       
     2 # CDDL HEADER START
       
     3 #
       
     4 # The contents of this file are subject to the terms of the
       
     5 # Common Development and Distribution License (the "License").
       
     6 # You may not use this file except in compliance with the License.
       
     7 #
       
     8 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
       
     9 # or http://www.opensolaris.org/os/licensing.
       
    10 # See the License for the specific language governing permissions
       
    11 # and limitations under the License.
       
    12 #
       
    13 # When distributing Covered Code, include this CDDL HEADER in each
       
    14 # file and include the License file at usr/src/OPENSOLARIS.LICENSE.
       
    15 # If applicable, add the following below this CDDL HEADER, with the
       
    16 # fields enclosed by brackets "[]" replaced with your own identifying
       
    17 # information: Portions Copyright [yyyy] [name of copyright owner]
       
    18 #
       
    19 # CDDL HEADER END
       
    20 #
       
    21 
       
    22 #
       
    23 # Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
       
    24 #
       
    25 
       
    26 include ../../make-rules/shared-macros.mk
       
    27 
       
    28 COMPONENT_NAME=		libmng
       
    29 COMPONENT_VERSION=	1.0.10
       
    30 COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
       
    31 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
       
    32 COMPONENT_ARCHIVE_HASH=	sha1:78ad516a1de79d00de720bf2a7c9afea2c896b09
       
    33 COMPONENT_ARCHIVE_URL=	http://sourceforge.net/projects/libmng/files/libmng-devel/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)
       
    34 COMPONENT_ARCHIVE_1 =	mng-1.0-20010209-pdg.html
       
    35 COMPONENT_ARCHIVE_HASH_1 = sha1:074c31b6f6f7c8ee98b4f0b893dfefcba6fd926f
       
    36 COMPONENT_ARCHIVE_URL_1 = http://www.libpng.org/pub/mng/spec/mng-1.0-20010209-pdg.html
       
    37 COMPONENT_ARCHIVE_2 =	mng-lc-1.0-20010209-pdg.html
       
    38 COMPONENT_ARCHIVE_HASH_2 = sha1:42f01c79cfbd226a9d4b327017e49b5fd4856f94
       
    39 COMPONENT_ARCHIVE_URL_2 = http://www.libpng.org/pub/mng/spec/mng-lc-1.0-20010209-pdg.html
       
    40 COMPONENT_ARCHIVE_3 =	mng-vlc-1.0-20010209-pdg.html
       
    41 COMPONENT_ARCHIVE_HASH_3 = sha1:906c1db4ff9efc3f36b913651c6e9b05256d25ec
       
    42 COMPONENT_ARCHIVE_URL_3 = http://www.libpng.org/pub/mng/spec/mng-vlc-1.0-20010209-pdg.html
       
    43 COMPONENT_ARCHIVE_4 =	jng-1.0-20010209-pdg.html
       
    44 COMPONENT_ARCHIVE_HASH_4 = sha1:b5a036d6249ebbbad04e80bd7d203cbb5b31f0de
       
    45 COMPONENT_ARCHIVE_URL_4 = http://www.libpng.org/pub/mng/spec/jng-1.0-20010209-pdg.html
       
    46 COMPONENT_ARCHIVE_5 =	index.html
       
    47 COMPONENT_ARCHIVE_HASH_5 = sha1:074c31b6f6f7c8ee98b4f0b893dfefcba6fd926f
       
    48 COMPONENT_ARCHIVE_URL_5 = http://www.libpng.org/pub/mng/spec/index.html
       
    49 
       
    50 include ../../make-rules/prep.mk
       
    51 include ../../make-rules/configure.mk
       
    52 include ../../make-rules/ips.mk
       
    53 include ../../make-rules/lint-libraries.mk
       
    54 
       
    55 CFLAGS += -Xc $(CC_BITS)
       
    56 CFLAGS += $(studio_C99_ENABLE) $(CPP_POSIX)
       
    57 CFLAGS += `pkg-config --cflags lcms`
       
    58 CPPFLAGS += $(CPP_LARGEFILES) $(CPP_POSIX)
       
    59 CPPFLAGS += `pkg-config --cflags lcms`
       
    60 LDFLAGS += `pkg-config --libs lcms`
       
    61 
       
    62 CONFIGURE_ENV += CC="$(CC)"
       
    63 CONFIGURE_ENV += CFLAGS="$(CFLAGS)"
       
    64 CONFIGURE_ENV += CPPFLAGS="$(CPPFLAGS)"
       
    65 CONFIGURE_ENV += CPP="$(CC) $(CPPFLAGS) $(CFLAGS) -E"
       
    66 CONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
       
    67 CONFIGURE_ENV += LD="$(CC) $(CFLAGS) $(LDFLAGS)"
       
    68 CONFIGURE_ENV += CCLD="$(CC) $(CFLAGS) $(LDFLAGS)"
       
    69 
       
    70 CONFIGURE_OPTIONS += --includedir=/usr/include/libmng
       
    71 CONFIGURE_OPTIONS += --disable-static
       
    72 CONFIGURE_OPTIONS += --with-pic
       
    73 CONFIGURE_OPTIONS += --enable-shared 
       
    74 CONFIGURE_OPTIONS += --disable-static 
       
    75 CONFIGURE_OPTIONS += --disable-libtool-lock 
       
    76 CONFIGURE_OPTIONS += --enable-largefile 
       
    77 CONFIGURE_OPTIONS += --enable-buildso 
       
    78 CONFIGURE_OPTIONS += --enable-read 
       
    79 CONFIGURE_OPTIONS += --enable-write 
       
    80 CONFIGURE_OPTIONS += --enable-display 
       
    81 CONFIGURE_OPTIONS += --enable-dynamic 
       
    82 CONFIGURE_OPTIONS += --enable-chunks 
       
    83 CONFIGURE_OPTIONS += --enable-storechunks 
       
    84 CONFIGURE_OPTIONS += --with-lcms
       
    85 CONFIGURE_OPTIONS += --with-zlib
       
    86 CONFIGURE_OPTIONS += --with-jpeg
       
    87 
       
    88 GSED = /usr/gnu/bin/sed
       
    89 
       
    90 PROTOUSRSHAREDOCDIR = $(PROTOUSRSHAREDIR)/doc/libmng/html
       
    91 PROTOUSRLIBPKGCONFIGDIR = $(PROTOUSRLIBDIR)/pkgconfig
       
    92 PROTOUSRLIB64PKGCONFIGDIR = $(PROTOUSRLIBDIR64)/pkgconfig
       
    93 
       
    94 HTMLDOCLIST = index.html  \
       
    95 	      mng-1.0-20010209-pdg.html \
       
    96 	      mng-lc-1.0-20010209-pdg.html \
       
    97 	      mng-vlc-1.0-20010209-pdg.html \
       
    98 	      jng-1.0-20010209-pdg.html
       
    99 
       
   100 PNGLIST = Plan1.png Plan2.png
       
   101 
       
   102 COMPONENT_PREP_ACTION = \
       
   103 	( cd $(@D) ; \
       
   104 	    $(CP) makefiles/configure.in makefiles/Makefile.am . ; \
       
   105 		    libtoolize --force --copy ; aclocal-1.10 ; \
       
   106 		    automake-1.10 --add-missing --copy ; autoconf )
       
   107 
       
   108 # common targets
       
   109 build:		$(BUILD_32_and_64)
       
   110 
       
   111 install:	$(INSTALL_32_and_64)
       
   112 	$(MKDIR) $(PROTOUSRSHAREDOCDIR) ; \
       
   113 	$(MKDIR) $(PROTOUSRLIBPKGCONFIGDIR) ; \
       
   114 	$(MKDIR) $(PROTOUSRLIB64PKGCONFIGDIR) ; \
       
   115 	    list1='$(HTMLDOCLIST)' ; for f in $$list1; do \
       
   116 	    $(INSTALL) -m 0644 $(COMPONENT_DIR)/$$f \
       
   117 		$(PROTOUSRSHAREDOCDIR)/ ; \
       
   118 	    done 
       
   119 	    list2='$(PNGLIST)' ; for f in $$list2 ; do \
       
   120 	    $(INSTALL) -m 0644 $(COMPONENT_DIR)/$(COMPONENT_SRC)/doc/$$f \
       
   121 		$(PROTOUSRSHAREDOCDIR)/ ; \
       
   122 	    done 
       
   123 	    $(INSTALL) -m 0644 $(COMPONENT_DIR)/Solaris/libmng.pc \
       
   124 		$(PROTOUSRLIBPKGCONFIGDIR)/
       
   125 	    $(GSED) -e "s#MACH64#$(MACH64)#g" \
       
   126 		$(COMPONENT_DIR)/Solaris/libmng-64.pc > \
       
   127 		    $(COMPONENT_DIR)/libmng.pc
       
   128 	    $(INSTALL) -m 0644 $(COMPONENT_DIR)/libmng.pc \
       
   129 		$(PROTOUSRLIB64PKGCONFIGDIR)/
       
   130 	    $(RM) $(COMPONENT_DIR)/libmng.pc
       
   131 
       
   132 test:	$(NO_TESTS)
       
   133 
       
   134 BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
       
   135 
       
   136 include ../../make-rules/depend.mk
       
   137