Root/nethack/Makefile

1#
2# Copyright (C) 2009 Qi Hardware Inc.
3# Author: Xiangfu Liu <xiangfu@sharism.cc>
4#
5# This is free software, licensed under the GNU General Public License v2.
6# See /LICENSE for more information.
7#
8
9include $(TOPDIR)/rules.mk
10
11PKG_NAME:=nethack
12PKG_VERSION:=343
13
14PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-src.tgz
15PKG_SOURCE_URL:=http://downloads.sourceforge.net/project/nethack/nethack/3.4.3/
16PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-3.4.3
17
18include $(INCLUDE_DIR)/package.mk
19
20define Package/nethack
21    SECTION:=games
22    CATEGORY:=Games
23    DEPENDS:=nethack
24    TITLE:=single player dungeon exploration game
25    DEPENDS:=+libncurses
26endef
27
28define Package/nethack/description
29    NetHack is a single player dungeon exploration game
30endef
31
32TARGET_CFLAGS+=-I$(STAGING_DIR)/usr/include
33TARGET_LDFLAGS+= -Wl,-rpath-link=$(STAGING_DIR)/usr/lib
34
35define Build/Compile
36    (cd $(PKG_BUILD_DIR)/sys/unix; \
37    sh setup.sh; \
38    cd ../../; \
39    export CFLAGS="${TARGET_CFLAGS}";\
40    export LDFLAGS="${TARGET_LDFLAGS}";\
41    export PREFIX="${PKG_INSTALL_DIR}";\
42    make;\
43    )
44endef
45
46define Package/nethack/install
47    $(INSTALL_DIR) \
48        $(1)/usr/bin \
49
50    $(INSTALL_BIN) \
51        $(PKG_BUILD_DIR)/src/nethack \
52        $(1)/usr/bin/
53endef
54
55$(eval $(call BuildPackage,nethack))
56

Archive Download this file



interactive