Makefile revision 3517
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# CDDL HEADER START
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# The contents of this file are subject to the terms of the
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Common Development and Distribution License (the "License").
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# You may not use this file except in compliance with the License.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# or http://www.opensolaris.org/os/licensing.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# See the License for the specific language governing permissions
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# and limitations under the License.
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# When distributing Covered Code, include this CDDL HEADER in each
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
09ab886382ad9e7149d9b72b4cf9a03ae4a1cddfDavid Lawrence# If applicable, add the following below this CDDL HEADER, with the
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# fields enclosed by brackets "[]" replaced with your own identifying
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# information: Portions Copyright [yyyy] [name of copyright owner]
09ab886382ad9e7149d9b72b4cf9a03ae4a1cddfDavid Lawrence#
09ab886382ad9e7149d9b72b4cf9a03ae4a1cddfDavid Lawrence# CDDL HEADER END
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington#
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
09ab886382ad9e7149d9b72b4cf9a03ae4a1cddfDavid Lawrence#
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude ../../make-rules/shared-macros.mk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonPATH=$(dir $(CC)):$(JAVA_HOME)/bin:/usr/bin:/usr/gnu/bin
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCOMPONENT_NAME= libidn
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCOMPONENT_VERSION= 1.19
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCOMPONENT_PROJECT_URL= http://www.gnu.org/software/libidn/
e4757e3dafe50ae59f693eec828f68c42c197a70Andreas GustafssonCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCOMPONENT_ARCHIVE_HASH= \
f9d068745ddfeb513db6184d9dddde835bed42d4Andreas Gustafsson sha256:8ed2e936b1ae3e30b45b54ca3672deaa83ee0f4d20db5ad83dc1af7222d39f41
e4757e3dafe50ae59f693eec828f68c42c197a70Andreas GustafssonCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/gnu/libidn/$(COMPONENT_ARCHIVE)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCOMPONENT_BUGDB= library/libidn
e4757e3dafe50ae59f693eec828f68c42c197a70Andreas Gustafsson
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCOMPONENT_ARCHIVE_1 = tld-0.7.tar.gz
f9d068745ddfeb513db6184d9dddde835bed42d4Andreas GustafssonCOMPONENT_ARCHIVE_HASH_1 = \
e4757e3dafe50ae59f693eec828f68c42c197a70Andreas Gustafsson sha256:7423f48d15fb1377ee0050c3e1f22e8a91668c2f158afed57b8ead3fed908785
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCOMPONENT_ARCHIVE_URL_1 = http://download.berlios.de/tldchk/$(COMPONENT_ARCHIVE_1)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonTPNO= 8441
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude ../../make-rules/prep.mk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude ../../make-rules/configure.mk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude ../../make-rules/ips.mk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafssoninclude ../../make-rules/lint-libraries.mk
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonPATCH_LEVEL = 0
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonLINT_FLAGS += -I$(PROTOUSRINCDIR)/idn
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# Enable C99 mode + -Xc for its additional warnings.
09ab886382ad9e7149d9b72b4cf9a03ae4a1cddfDavid Lawrencestudio_C99MODE = -Xc $(studio_C99_ENABLE)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington# -xinline=%auto -- we like inlining where appropriate
09ab886382ad9e7149d9b72b4cf9a03ae4a1cddfDavid LawrenceCFLAGS += -xinline=%auto
09ab886382ad9e7149d9b72b4cf9a03ae4a1cddfDavid Lawrence
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# -xbuiltin=%none -- builtins have been known to be buggy
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian WellingtonCFLAGS += -xbuiltin=%none
09ab886382ad9e7149d9b72b4cf9a03ae4a1cddfDavid Lawrence
09ab886382ad9e7149d9b72b4cf9a03ae4a1cddfDavid LawrenceCFLAGS += $(CPP_LARGEFILES)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCFLAGS += $(XPG6MODE)
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian WellingtonCFLAGS += $(CPP_POSIX)
09ab886382ad9e7149d9b72b4cf9a03ae4a1cddfDavid LawrenceCFLAGS += $(CPP_C99_EXTENDED_MATH)
09ab886382ad9e7149d9b72b4cf9a03ae4a1cddfDavid LawrenceCFLAGS += $(studio_PIC)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian WellingtonGUNZIP = /usr/bin/gunzip
09ab886382ad9e7149d9b72b4cf9a03ae4a1cddfDavid LawrenceTAR = /usr/bin/tar
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonFIND = /usr/bin/find
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_ENV += CFLAGS="$(CFLAGS)"
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_ENV += LDFLAGS="$(LDFLAGS)"
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_ENV += INSTALL="$(INSTALL)"
91216cff91b34c9ff6e846dc23f248219cafe660Andreas Gustafsson
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_OPTIONS += --includedir=/usr/include/idn
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_OPTIONS += --localstatedir=/var
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_OPTIONS += --infodir=$(CONFIGURE_INFODIR)
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_OPTIONS += --enable-shared
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_OPTIONS += --disable-static
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_OPTIONS += --disable-csharp
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_OPTIONS += --disable-rpath
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_OPTIONS += --disable-valgrind-tests
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_OPTIONS += --enable-tld
91216cff91b34c9ff6e846dc23f248219cafe660Andreas GustafssonCONFIGURE_OPTIONS += --enable-nls
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCONFIGURE_OPTIONS += --disable-gtk-doc
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCONFIGURE_OPTIONS += --enable-java
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCONFIGURE_OPTIONS += --with-libiconv-prefix=$(CONFIGURE_PREFIX)
17453368fa0136f6287c56d6600bee58809334bcAndreas GustafssonCONFIGURE_OPTIONS += --with-libintl-prefix=$(CONFIGURE_PREFIX)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCONFIGURE_OPTIONS += --with-html-dir=$(CONFIGURE_PREFIX)/share/doc
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian WellingtonCONFIGURE_OPTIONS += --with-pic
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian WellingtonPROTOUSRSHAREDOCDIR = $(PROTOUSRSHAREDIR)/doc
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonIDNDOCDIR = $(PROTOUSRSHAREDOCDIR)/idn
17453368fa0136f6287c56d6600bee58809334bcAndreas GustafssonHTMLDOCDIR = $(IDNDOCDIR)/html
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonHTMLDOCLIST = libidn-components.png libidn.html
90c099e88e9f16bfee9edee3ac1a51fc98843772Brian WellingtonDOCLIST = libidn-components.pdf libidn.pdf
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# We must unpack the TLD database and touch the perl scripts in order
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington# to force re-generation of the TLD tables after augmenting them
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonCOMPONENT_PRE_CONFIGURE_ACTION = \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington ( cd $(SOURCE_DIR) ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(CP) $(COMPONENT_DIR)/tld-0.7.tar.gz . ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(GUNZIP) tld-0.7.tar.gz ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(TAR) xvf tld-0.7.tar > /dev/null 2>&1 ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(RM) tld-0.7.tar ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(RM) java/libidn-1.19.jar ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(RM) tld/no.tld tld/fr.tld ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(CP) doc/tld/fr.tld tld/ ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(CP) doc/tld/no.tld tld/ ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(FIND) . -type d -exec chmod 0755 {} + ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(FIND) ./tld -type f -name "*.tld" -exec chmod 0644 {} + ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(FIND) ./tld -type f -name "*.tld" -exec touch -acm {} + ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(FIND) ./tld/templates -type f -exec chmod 0644 {} + ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(FIND) ./tld/templates -type f -exec touch -acm {} + ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(FIND) ./lib -type f -name "*.pl" -exec touch -acm {} + ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(FIND) ./lib -type f -name "*.pl" -exec chmod 0755 {} + )
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonASLR_MODE = $(ASLR_ENABLE)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtonbuild: $(BUILD_32_and_64)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtoninstall: $(INSTALL_32_and_64)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(MKDIR) $(HTMLDOCDIR) ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington list1='$(HTMLDOCLIST)' ; for f in $$list1; do \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(INSTALL) -m 0644 $(COMPONENT_DIR)/$(COMPONENT_SRC)/doc/$$f \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(HTMLDOCDIR)/ ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington done
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington list2='$(DOCLIST)' ; for f in $$list2; do \
622df0afb82c1b711b5f3c272db4c4b83d09bc4aBob Halley $(INSTALL) -m 0644 $(COMPONENT_DIR)/$(COMPONENT_SRC)/doc/$$f \
d4ef65050feac78554addf6e16a06c6e2e0bd331Brian Wellington $(IDNDOCDIR)/ ; \
622df0afb82c1b711b5f3c272db4c4b83d09bc4aBob Halley done
622df0afb82c1b711b5f3c272db4c4b83d09bc4aBob Halley $(CP) -Rp $(COMPONENT_DIR)/$(COMPONENT_SRC)/doc/java \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(IDNDOCDIR)/ ; \
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington $(CP) -Rp $(COMPONENT_DIR)/$(COMPONENT_SRC)/tld \
622df0afb82c1b711b5f3c272db4c4b83d09bc4aBob Halley $(IDNDOCDIR)/
622df0afb82c1b711b5f3c272db4c4b83d09bc4aBob Halley $(CP) -Rp $(PROTOUSRSHAREDIR)/locale/en@boldquot \
622df0afb82c1b711b5f3c272db4c4b83d09bc4aBob Halley $(PROTOUSRSHAREDIR)/locale/en
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtontest: $(TEST_32_and_64)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian WellingtonBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellingtoninclude ../../make-rules/depend.mk
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington
9e3a7b0faf417a10f5f689edf288807b2d5eedc5Brian Wellington