Makefile revision 911
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose#
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# CDDL HEADER START
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose#
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# The contents of this file are subject to the terms of the
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# Common Development and Distribution License (the "License").
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# You may not use this file except in compliance with the License.
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose#
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# or http://www.opensolaris.org/os/licensing.
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# See the License for the specific language governing permissions
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# and limitations under the License.
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose#
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# When distributing Covered Code, include this CDDL HEADER in each
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# If applicable, add the following below this CDDL HEADER, with the
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# fields enclosed by brackets "[]" replaced with your own identifying
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# information: Portions Copyright [yyyy] [name of copyright owner]
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose#
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# CDDL HEADER END
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose#
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose#
6cb34580ee6e9e2c9190b77b10db8a3c43e3c9c8Sumit Boseinclude ../../make-rules/shared-macros.mk
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
fb81f337b68c85471c3f5140850dccf549a2d0acFabiano FidêncioPATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
fb81f337b68c85471c3f5140850dccf549a2d0acFabiano Fidêncio
fb81f337b68c85471c3f5140850dccf549a2d0acFabiano FidêncioCOMPONENT_NAME= libidn
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCOMPONENT_VERSION= 1.19
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCOMPONENT_PROJECT_URL= http://www.gnu.org/software/libidn/
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCOMPONENT_ARCHIVE_HASH= sha1:2b6dcb500e8135a9444a250d7df76f545915f25f
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/libidn/$(COMPONENT_ARCHIVE)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCOMPONENT_ARCHIVE_1 = tld-0.7.tar.gz
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCOMPONENT_ARCHIVE_HASH_1 = sha1:da1aa69757f040c8e89ce0933e67463979a64555
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCOMPONENT_ARCHIVE_URL_1 = http://download.berlios.de/tldchk/$(COMPONENT_ARCHIVE_1)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Boseinclude ../../make-rules/prep.mk
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Boseinclude ../../make-rules/configure.mk
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Boseinclude ../../make-rules/ips.mk
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Boseinclude ../../make-rules/lint-libraries.mk
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BosePATCH_LEVEL = 0
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseLINT_FLAGS += -I$(PROTOUSRINCDIR)/idn
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# Enable C99 mode + -Xc for its additional warnings.
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bosestudio_C99MODE = -Xc $(studio_C99_ENABLE)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# -xinline=%auto -- we like inlining where appropriate
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCFLAGS += -xinline=%auto
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# -xbuiltin=%none -- builtins have been known to be buggy
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCFLAGS += -xbuiltin=%none
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCFLAGS += $(CPP_LARGEFILES)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCFLAGS += $(XPG6MODE)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCFLAGS += $(CPP_POSIX)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCFLAGS += $(CPP_C99_EXTENDED_MATH)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCFLAGS += $(studio_PIC)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseGUNZIP = /usr/bin/gunzip
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseTAR = /usr/bin/tar
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseFIND = /usr/bin/find
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_ENV += CFLAGS="$(CFLAGS)"
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_ENV += INSTALL="$(INSTALL)"
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --includedir=/usr/include/idn
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --localstatedir=/var
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --enable-shared
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --disable-static
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --disable-csharp
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --disable-rpath
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --disable-valgrind-tests
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --enable-tld
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --enable-nls
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --disable-gtk-doc
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --enable-java
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --with-libiconv-prefix=$(CONFIGURE_PREFIX)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --with-libintl-prefix=$(CONFIGURE_PREFIX)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --with-html-dir=$(CONFIGURE_PREFIX)/share/doc
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCONFIGURE_OPTIONS += --with-pic
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BosePROTOUSRSHAREDOCDIR = $(PROTOUSRSHAREDIR)/doc
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseIDNDOCDIR = $(PROTOUSRSHAREDOCDIR)/idn
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseHTMLDOCDIR = $(IDNDOCDIR)/html
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseHTMLDOCLIST = libidn-components.png libidn.html
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseDOCLIST = libidn-components.pdf libidn.pdf
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# We must unpack the TLD database and touch the perl scripts in order
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose# to force re-generation of the TLD tables after augmenting them
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit BoseCOMPONENT_PRE_CONFIGURE_ACTION = \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose ( cd $(SOURCE_DIR) ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(CP) $(COMPONENT_DIR)/tld-0.7.tar.gz . ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(GUNZIP) tld-0.7.tar.gz ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(TAR) xvf tld-0.7.tar > /dev/null 2>&1 ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(RM) tld-0.7.tar ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(RM) java/libidn-1.19.jar ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(RM) tld/no.tld tld/fr.tld ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(CP) doc/tld/fr.tld tld/ ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(CP) doc/tld/no.tld tld/ ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(FIND) . -type d -exec chmod 0755 {} + ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(FIND) ./tld -type f -name "*.tld" -exec chmod 0644 {} + ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(FIND) ./tld -type f -name "*.tld" -exec touch -acm {} + ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(FIND) ./tld/templates -type f -exec chmod 0644 {} + ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(FIND) ./tld/templates -type f -exec touch -acm {} + ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(FIND) ./lib -type f -name "*.pl" -exec touch -acm {} + ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(FIND) ./lib -type f -name "*.pl" -exec chmod 0755 {} + )
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bosebuild: $(BUILD_32_and_64)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Boseinstall: $(INSTALL_32_and_64)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(MKDIR) $(HTMLDOCDIR) ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose list1='$(HTMLDOCLIST)' ; for f in $$list1; do \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(INSTALL) -m 0644 $(COMPONENT_DIR)/$(COMPONENT_SRC)/doc/$$f \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(HTMLDOCDIR)/ ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose done
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose list2='$(DOCLIST)' ; for f in $$list2; do \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(INSTALL) -m 0644 $(COMPONENT_DIR)/$(COMPONENT_SRC)/doc/$$f \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(IDNDOCDIR)/ ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose done
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(CP) -Rp $(COMPONENT_DIR)/$(COMPONENT_SRC)/doc/java \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(IDNDOCDIR)/ ; \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(CP) -Rp $(COMPONENT_DIR)/$(COMPONENT_SRC)/tld \
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(IDNDOCDIR)/
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose $(CP) -Rp $(PROTOUSRSHAREDIR)/locale/en@boldquot \
cd5033e86bb4065d75188e2b6ef287a4421344c8Sumit Bose $(PROTOUSRSHAREDIR)/locale/en
cd5033e86bb4065d75188e2b6ef287a4421344c8Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bosetest: $(TEST_32_and_64)
cd5033e86bb4065d75188e2b6ef287a4421344c8Sumit Bose
cd5033e86bb4065d75188e2b6ef287a4421344c8Sumit BoseBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Boseinclude ../../make-rules/depend.mk
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose
2ef62c64e7f07c8aced3f72850008ecb72860162Sumit Bose