Makefile revision 1625
d4ab9cd94f0fe0cf24ba36d21240215ae648c8d5James Brister#
d4ab9cd94f0fe0cf24ba36d21240215ae648c8d5James Brister# CDDL HEADER START
d4ab9cd94f0fe0cf24ba36d21240215ae648c8d5James Brister#
d4ab9cd94f0fe0cf24ba36d21240215ae648c8d5James Brister# The contents of this file are subject to the terms of the
080a4fe83c3ad208073bffbce1a2af8fe444214fMichael Sawyer# Common Development and Distribution License (the "License").
080a4fe83c3ad208073bffbce1a2af8fe444214fMichael Sawyer# You may not use this file except in compliance with the License.
080a4fe83c3ad208073bffbce1a2af8fe444214fMichael Sawyer#
36007b707f28f36864e8d76f11379b22e9737538Michael Sawyer# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
36007b707f28f36864e8d76f11379b22e9737538Michael Sawyer# or http://www.opensolaris.org/os/licensing.
36007b707f28f36864e8d76f11379b22e9737538Michael Sawyer# See the License for the specific language governing permissions
375f19cfb2f9cf5a9efbc65b557a8ce865de85c2Michael Sawyer# and limitations under the License.
375f19cfb2f9cf5a9efbc65b557a8ce865de85c2Michael Sawyer#
375f19cfb2f9cf5a9efbc65b557a8ce865de85c2Michael Sawyer# When distributing Covered Code, include this CDDL HEADER in each
375f19cfb2f9cf5a9efbc65b557a8ce865de85c2Michael Sawyer# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
375f19cfb2f9cf5a9efbc65b557a8ce865de85c2Michael Sawyer# If applicable, add the following below this CDDL HEADER, with the
375f19cfb2f9cf5a9efbc65b557a8ce865de85c2Michael Sawyer# fields enclosed by brackets "[]" replaced with your own identifying
9bef4575d71a084edf59ac681e53e35ae1b72166Andreas Gustafsson# information: Portions Copyright [yyyy] [name of copyright owner]
9bef4575d71a084edf59ac681e53e35ae1b72166Andreas Gustafsson#
9bef4575d71a084edf59ac681e53e35ae1b72166Andreas Gustafsson# CDDL HEADER END
9bef4575d71a084edf59ac681e53e35ae1b72166Andreas Gustafsson#
9bef4575d71a084edf59ac681e53e35ae1b72166Andreas Gustafsson
87f4c7933fd2962cca3b9b7e046327f3c6306b84Andreas Gustafsson#
87f4c7933fd2962cca3b9b7e046327f3c6306b84Andreas Gustafsson# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
87f4c7933fd2962cca3b9b7e046327f3c6306b84Andreas Gustafsson#
87f4c7933fd2962cca3b9b7e046327f3c6306b84Andreas Gustafsson
87f4c7933fd2962cca3b9b7e046327f3c6306b84Andreas Gustafssoninclude ../../make-rules/shared-macros.mk
87f4c7933fd2962cca3b9b7e046327f3c6306b84Andreas Gustafsson
87f4c7933fd2962cca3b9b7e046327f3c6306b84Andreas GustafssonCOMPONENT_NAME= ncurses
87f4c7933fd2962cca3b9b7e046327f3c6306b84Andreas GustafssonCOMPONENT_VERSION= 5.7
87f4c7933fd2962cca3b9b7e046327f3c6306b84Andreas GustafssonCOMPONENT_PROJECT_URL= http://www.gnu.org/software/ncurses/
c35f1e59379ff961b56163dd463b623898e2d0f6James BristerCOMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION)
c35f1e59379ff961b56163dd463b623898e2d0f6James BristerCOMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.gz
c35f1e59379ff961b56163dd463b623898e2d0f6James BristerCOMPONENT_ARCHIVE_HASH= \
c35f1e59379ff961b56163dd463b623898e2d0f6James Brister sha256:0a9bdea5c7de8ded5c9327ed642915f2cc380753f12d4ad120ef7da3ea3498f4
c35f1e59379ff961b56163dd463b623898e2d0f6James BristerCOMPONENT_ARCHIVE_URL= http://ftp.gnu.org/pub/gnu/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
c35f1e59379ff961b56163dd463b623898e2d0f6James BristerCOMPONENT_BUGDB= library/ncurses
c35f1e59379ff961b56163dd463b623898e2d0f6James Brister
bf68c5151b5c4f7d6b2783584434e61045a88d7fAndreas Gustafssoninclude ../../make-rules/prep.mk
dae5ce6ddb0a3c425865d3b6f0f13c4126eacc17Andreas Gustafssoninclude ../../make-rules/configure.mk
dae5ce6ddb0a3c425865d3b6f0f13c4126eacc17Andreas Gustafssoninclude ../../make-rules/ips.mk
dae5ce6ddb0a3c425865d3b6f0f13c4126eacc17Andreas Gustafsson
9a8fea7bc8fb79ff1d31f0a2ba3c9694041c6f3aAndreas Gustafsson# Needed to make "gmake test" work.
9a8fea7bc8fb79ff1d31f0a2ba3c9694041c6f3aAndreas GustafssonCOMPONENT_PRE_CONFIGURE_ACTION = \
9a8fea7bc8fb79ff1d31f0a2ba3c9694041c6f3aAndreas Gustafsson ($(CLONEY) $(SOURCE_DIR) $(@D))
9a8fea7bc8fb79ff1d31f0a2ba3c9694041c6f3aAndreas Gustafsson
663841abe0bb1cc8040e552597ef721c35b799e5Brian WellingtonCONFIGURE_PREFIX = /usr/gnu
663841abe0bb1cc8040e552597ef721c35b799e5Brian Wellington
c49e3222b0912479015161e8b54a67a1abf9a0ffAndreas Gustafsson# Needed to correctly build that 64-bit library.
c49e3222b0912479015161e8b54a67a1abf9a0ffAndreas GustafssonLDFLAGS += $(CC_BITS)
c49e3222b0912479015161e8b54a67a1abf9a0ffAndreas Gustafsson
bf68c5151b5c4f7d6b2783584434e61045a88d7fAndreas GustafssonCONFIGURE_OPTIONS += --with-shared
bf68c5151b5c4f7d6b2783584434e61045a88d7fAndreas GustafssonCONFIGURE_OPTIONS += --with-normal
bf68c5151b5c4f7d6b2783584434e61045a88d7fAndreas GustafssonCONFIGURE_OPTIONS += --enable-rpath
bf68c5151b5c4f7d6b2783584434e61045a88d7fAndreas GustafssonCONFIGURE_OPTIONS += --enable-widec
178f73169a27ac031f58863ae12cdb33dc15f6c4Brian WellingtonCONFIGURE_OPTIONS += --includedir=$(USRINCDIR)/ncurses
178f73169a27ac031f58863ae12cdb33dc15f6c4Brian Wellington
178f73169a27ac031f58863ae12cdb33dc15f6c4Brian Wellington# Needed to pass -m32 or -m64 to the C/C++ compiler and linker.
9c4cba349f52bb8176c3858b2b5b340f13603802Brian WellingtonCONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
9c4cba349f52bb8176c3858b2b5b340f13603802Brian WellingtonCONFIGURE_OPTIONS += CXXFLAGS="$(CXXFLAGS)"
64024eaa4d029b0bd090c435b8b02b45eef5cd89Andreas GustafssonCONFIGURE_OPTIONS += LDFLAGS="$(LDFLAGS)"
0e65062acb2b0d14ab64e0c7ae7eb4137758339bAndreas Gustafsson
0e65062acb2b0d14ab64e0c7ae7eb4137758339bAndreas Gustafsson# XXX: Ugly hack copied directly from the desktop SUNWncurses.spec file:
64024eaa4d029b0bd090c435b8b02b45eef5cd89Andreas Gustafsson# The sun-color terminfo included in ncurses does not work;
da527e4ff6a013364826637963e7ac372e024f33David Lawrence# copying the one shipped with Sun's curses fixes it:
da527e4ff6a013364826637963e7ac372e024f33David LawrenceCOMPONENT_POST_INSTALL_ACTION += \
8d51d9e67e1e5dcf10203c4147ece519c7daa57dMark Andrews $(CP) /usr/share/lib/terminfo/s/sun-color \
8d51d9e67e1e5dcf10203c4147ece519c7daa57dMark Andrews $(PROTO_DIR)$(GNULIB)/terminfo/s/
30576c592b538cab293cf6e1f6265d376cd5a12cAndreas Gustafsson
30576c592b538cab293cf6e1f6265d376cd5a12cAndreas GustafssonASLR_MODE = $(ASLR_ENABLE)
ce2be9b7211ab5bacaa10fe74ef35def3a3f6089David Lawrence
ce2be9b7211ab5bacaa10fe74ef35def3a3f6089David Lawrence# common targets
ce2be9b7211ab5bacaa10fe74ef35def3a3f6089David Lawrencebuild: $(BUILD_32_and_64)
ce2be9b7211ab5bacaa10fe74ef35def3a3f6089David Lawrence
9bf765ab3a5203b854d32266e6162e547791383cDavid Lawrenceinstall: $(INSTALL_32_and_64)
9bf765ab3a5203b854d32266e6162e547791383cDavid Lawrence
f4d9f465cd29963a99554bbe2936509ea3568c89James Bristertest: $(BUILD_32_and_64)
f4d9f465cd29963a99554bbe2936509ea3568c89James Brister (cd $(BUILD_DIR)/$(MACH32)/test; $(GMAKE))
f4d9f465cd29963a99554bbe2936509ea3568c89James Brister (cd $(BUILD_DIR)/$(MACH64)/test; $(GMAKE))
adade77942b069127a7094df419b3ad39dafb385James Brister
adade77942b069127a7094df419b3ad39dafb385James BristerBUILD_PKG_DEPENDENCIES = $(BUILD_TOOLS)
9bf765ab3a5203b854d32266e6162e547791383cDavid Lawrence
9bf765ab3a5203b854d32266e6162e547791383cDavid Lawrenceinclude ../../make-rules/depend.mk
adade77942b069127a7094df419b3ad39dafb385James Brister