Makefile revision 1348
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney#
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# CDDL HEADER START
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney#
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# The contents of this file are subject to the terms of the
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# Common Development and Distribution License (the "License").
907832d1673f61ebfd345035d4a26c20d5662953Matt Sweeney# You may not use this file except in compliance with the License.
907832d1673f61ebfd345035d4a26c20d5662953Matt Sweeney#
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# or http://www.opensolaris.org/os/licensing.
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# See the License for the specific language governing permissions
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# and limitations under the License.
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney#
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# When distributing Covered Code, include this CDDL HEADER in each
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# If applicable, add the following below this CDDL HEADER, with the
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# fields enclosed by brackets "[]" replaced with your own identifying
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# information: Portions Copyright [yyyy] [name of copyright owner]
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney#
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# CDDL HEADER END
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney#
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney#
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney#
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeneyinclude ../../make-rules/shared-macros.mk
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCOMPONENT_NAME= ncurses
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCOMPONENT_VERSION= 5.7
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCOMPONENT_PROJECT_URL= http://www.gnu.org/software/ncurses/
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCOMPONENT_ARCHIVE_HASH= \
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney sha256:0a9bdea5c7de8ded5c9327ed642915f2cc380753f12d4ad120ef7da3ea3498f4
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/pub/gnu/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCOMPONENT_BUGDB= library/ncurses
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeneyinclude ../../make-rules/prep.mk
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeneyinclude ../../make-rules/configure.mk
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeneyinclude ../../make-rules/ips.mk
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# Needed to make "gmake test" work.
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCOMPONENT_PRE_CONFIGURE_ACTION = \
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney ($(CLONEY) $(SOURCE_DIR) $(@D))
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCONFIGURE_PREFIX = /usr/gnu
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# Needed to correctly build that 64-bit library.
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyLDFLAGS += $(CC_BITS)
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCONFIGURE_OPTIONS += --with-shared
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCONFIGURE_OPTIONS += --with-normal
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCONFIGURE_OPTIONS += --enable-rpath
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCONFIGURE_OPTIONS += --enable-widec
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCONFIGURE_OPTIONS += --includedir=$(USRINCDIR)/ncurses
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# Needed to pass -m32 or -m64 to the C/C++ compiler and linker.
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)"
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)"
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# XXX: Ugly hack copied directly from the desktop SUNWncurses.spec file:
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# The sun-color terminfo included in ncurses does not work;
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# copying the one shipped with Sun's curses fixes it:
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyCOMPONENT_POST_INSTALL_ACTION += \
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney $(CP) /usr/share/lib/terminfo/s/sun-color \
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney $(PROTO_DIR)$(GNULIB)/terminfo/s/
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney# common targets
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeneybuild: $(BUILD_32_and_64)
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeneyinstall: $(INSTALL_32_and_64)
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeneytest: $(BUILD_32_and_64)
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney (cd $(BUILD_DIR)/$(MACH32)/test; $(GMAKE))
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney (cd $(BUILD_DIR)/$(MACH64)/test; $(GMAKE))
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt SweeneyBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeneyinclude ../../make-rules/depend.mk
7b8680288e79cc11a4c20b66ce5c167619f1431fMatt Sweeney