components/nethack/Makefile
author Mike Sullivan <Mike.Sullivan@Oracle.COM>
Thu, 08 Oct 2015 23:00:32 -0700
changeset 4929 29020dc0c404
parent 4339 6501cf9c29f9
child 5682 94c0ca64c022
permissions -rw-r--r--
Added tag s12-85 for changeset 264d4a0eb386
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
301
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     1
#
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     3
#
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     7
#
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    12
#
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    18
#
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    20
#
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    21
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    22
#
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    23
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
301
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    24
#
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    25
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    26
include ../../make-rules/shared-macros.mk
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    27
485
9b12cda204fe 7080213 gcc-3 should not deliver /usr/gnu/bin/cc and its man page.
Rich Burridge <rich.burridge@oracle.com>
parents: 301
diff changeset
    28
PATH=$(dir $(CC)):/usr/bin:/usr/gnu/bin
9b12cda204fe 7080213 gcc-3 should not deliver /usr/gnu/bin/cc and its man page.
Rich Burridge <rich.burridge@oracle.com>
parents: 301
diff changeset
    29
301
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    30
COMPONENT_NAME=		nethack
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    31
COMPONENT_VERSION=	3.4.3
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 485
diff changeset
    32
COMPONENT_PROJECT_URL=	http://www.nethack.org/
301
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    33
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    34
COMPONENT_ARCHIVE=	$(COMPONENT_NAME)-343-src.tgz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    35
COMPONENT_ARCHIVE_HASH=	\
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 774
diff changeset
    36
    sha256:bb39c3d2a9ee2df4a0c8fdde708fbc63740853a7608d2f4c560b488124866fe4
301
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    37
COMPONENT_ARCHIVE_URL=	http://sourceforge.net/projects/$(COMPONENT_NAME)/files/$(COMPONENT_NAME)/$(COMPONENT_VERSION)/$(COMPONENT_ARCHIVE)/download
1058
34d7aaa03423 15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    38
COMPONENT_BUGDB=	utility/nethack
301
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    39
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1058
diff changeset
    40
TPNO=			9239
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1058
diff changeset
    41
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    42
include $(WS_MAKE_RULES)/prep.mk
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    43
include $(WS_MAKE_RULES)/justmake.mk
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    44
include $(WS_MAKE_RULES)/ips.mk
301
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    45
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    46
PATCH_LEVEL=0
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    47
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    48
# Need to use Makefiles in the sys/unix directory and copy them into various
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    49
# other directories.
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    50
#
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    51
COMPONENT_PREP_ACTION= (cd $(SOURCE_DIR)/sys/unix ; sh setup.sh)
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    52
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    53
COMPONENT_INSTALL_ARGS += CHOWN=true
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    54
COMPONENT_INSTALL_ARGS += CHGRP=true
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    55
COMPONENT_INSTALL_ARGS += ROOT=$(PROTO_DIR)
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    56
4029
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    57
# Nethack's build infrastructure doesn't let you easily override CFLAGS.
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    58
# Luckily, all the source files live in the same location relative to the
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    59
# include directory, so we can just stuff a -I into CFLAGS matching what's
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    60
# there in the Makefiles.  And we have to force this to be overridden by
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    61
# putting -e into MAKEFLAGS.
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 609
diff changeset
    62
COMPONENT_BUILD_ENV += CC=$(CC)
4029
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    63
COMPONENT_BUILD_ENV += CFLAGS="$(CFLAGS) -I../include"
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    64
COMPONENT_BUILD_ENV += LFLAGS="$(CC_BITS)"
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    65
COMPONENT_BUILD_ENV += MAKEFLAGS=-e
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 609
diff changeset
    66
COMPONENT_INSTALL_ENV += CC=$(CC)
4029
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    67
COMPONENT_INSTALL_ENV += CFLAGS="$(CFLAGS) -I../include"
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    68
COMPONENT_INSTALL_ENV += LFLAGS="$(CC_BITS)"
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    69
COMPONENT_INSTALL_ENV += MAKEFLAGS=-e
774
d0cbca26a17c 7035978 parfait support for userland bits
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 609
diff changeset
    70
301
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    71
PKG_PROTO_DIRS += $(COMPONENT_SRC)/doc
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    72
4029
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    73
ASLR_MODE = $(ASLR_ENABLE)
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    74
301
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    75
# common targets
4029
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    76
build:		$(BUILD_64)
301
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    77
4029
d0b41e7f3e31 20781120 nethack fails to compile 64-bit
Danek Duvall <danek.duvall@oracle.com>
parents: 3817
diff changeset
    78
install:	$(INSTALL_64)
301
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    79
	sed -e 's/^!\(NetHack.tomb\)/\1/' -e 's/^!\(NetHack.pet\)/\1/' \
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    80
		-e 's/^!\(NetHack.tile_file\)/\1/' \
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    81
		$(COMPONENT_SRC)/win/X11/NetHack.ad \
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    82
		> $(PROTO_DIR)/usr/lib/nethack/NetHack.ad
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    83
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    84
test:		$(NO_TESTS)
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    85
4339
6501cf9c29f9 21116842 add system-test targets to each component Makefile and to top-level Makefiles
Stacy Yeh <stacy.yeh@oracle.com>
parents: 4029
diff changeset
    86
system-test:    $(NO_TESTS)
6501cf9c29f9 21116842 add system-test targets to each component Makefile and to top-level Makefiles
Stacy Yeh <stacy.yeh@oracle.com>
parents: 4029
diff changeset
    87
301
ab9eef4f4029 7054109 Move nethack to userland
Rich Burridge <rich.burridge@oracle.com>
parents:
diff changeset
    88
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    89
REQUIRED_PACKAGES += shell/ksh93
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    90
REQUIRED_PACKAGES += system/library
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    91
REQUIRED_PACKAGES += x11/compatibility/links-xorg
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    92
REQUIRED_PACKAGES += x11/library/libx11
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    93
REQUIRED_PACKAGES += x11/library/libxpm
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    94
REQUIRED_PACKAGES += x11/library/toolkit/libxaw7
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 1948
diff changeset
    95
REQUIRED_PACKAGES += x11/library/toolkit/libxt