Root/sparsehash/Makefile

Source at commit 36c149ecbe9376d615e9cac3d2ec114cb43185f8 created 11 years 2 months ago.
By Mirko Lindner, add sparsehash
1#
2# Copyright (C) 2010 OpenWrt.org
3#
4# This is free software, licensed under the GNU General Public License v2.
5# See /LICENSE for more information.
6#
7
8include $(TOPDIR)/rules.mk
9
10PKG_NAME:=sparsehash
11PKG_VERSION:=1.6
12PKG_RELEASE:=1
13
14PKG_SOURCE:=sparsehash-$(PKG_VERSION).tar.gz
15PKG_SOURCE_URL:=http://google-sparsehash.googlecode.com/files/
16PKG_MD5SUM:=054fc9626730cd866ea15fe26b9462c6
17PKG_BUILD_DIR:=$(BUILD_DIR)/sparsehash-$(PKG_VERSION)
18
19include $(INCLUDE_DIR)/package.mk
20
21define Package/sparsehash
22  SECTION:=libs
23  CATEGORY:=Libraries
24  TITLE:=Sparsehash
25  URL:=http://code.google.com/p/google-sparsehash/
26  DEPENDS:=
27endef
28
29define Package/sparsehash/description
30    An extremely memory-efficient hash_map implementation. 2 bits/entry overhead! The SparseHash library contains several hash-map implementations, including implementations that optimize for space or speed.
31    These hashtable implementations are similar in API to SGI's hash_map class and the tr1 unordered_map class, but with different performance characteristics. It's easy to replace hash_map or unordered_map by sparse_hash_map or dense_hash_map in C++ code.
32endef
33#
34# TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include/SDL
35#
36# CONFIGURE_ARGS += \
37# --with-sdl-exec-prefix=$(STAGING_DIR)
38#
39# CONFIGURE_VARS += \
40# LIBS="-lSDL -ldirect -ldirectfb -lfusion"
41
42define Build/Compile
43    rm -rf $(PKG_INSTALL_DIR)
44    $(MAKE) -C $(PKG_BUILD_DIR) \
45        DESTDIR="$(PKG_INSTALL_DIR)" \
46        all install
47endef
48
49# define Build/InstallDev
50# $(INSTALL_DIR) $(1)/usr/include/SDL $(1)/usr/lib
51# $(CP) \
52# $(PKG_INSTALL_DIR)/usr/include/SDL/SDL_image.h \
53# $(1)/usr/include/SDL/
54# $(CP) \
55# $(PKG_INSTALL_DIR)/usr/lib/libSDL_image*.{a,so*} \
56# $(1)/usr/lib/
57# endef
58
59define Package/sparsehash/install
60    $(INSTALL_DIR) $(1)/usr/lib
61    $(CP) $(PKG_INSTALL_DIR)/usr/include/google/ $(1)/usr/lib/
62    $(CP) $(PKG_INSTALL_DIR)/usr/share/doc/sparsehash-$(PKG_VERSION)/ $(1)/usr/doc/
63endef
64
65$(eval $(call BuildPackage,sparsehash))
66

Archive Download this file



interactive