2a4afa77f2
The project builds a tiny static library that consists of a single
symbol which creates an in-memory LevelDB database.
That library is not installed by default and may be used by other
projects.
This commit installs in the staging directory the libmemenv.a static
library and the memenv.h header file.
Signed-off-by: Gaël PORTAY <gael.portay@collabora.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
(cherry picked from commit 16f847340d
)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
39 lines
1.2 KiB
Makefile
39 lines
1.2 KiB
Makefile
################################################################################
|
|
#
|
|
# leveldb
|
|
#
|
|
################################################################################
|
|
|
|
LEVELDB_VERSION = v1.20
|
|
LEVELDB_SITE = $(call github,google,leveldb,$(LEVELDB_VERSION))
|
|
LEVELDB_LICENSE = BSD-3-Clause
|
|
LEVELDB_LICENSE_FILES = LICENSE
|
|
LEVELDB_INSTALL_STAGING = YES
|
|
LEVELDB_DEPENDENCIES = snappy
|
|
|
|
# Disable the shared library for static only build
|
|
ifeq ($(BR2_STATIC_LIBS),y)
|
|
LEVELDB_MAKE_ARGS += SHARED_LIBS= SHARED_PROGRAMS=
|
|
endif
|
|
|
|
define LEVELDB_BUILD_CMDS
|
|
$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE1) \
|
|
$(LEVELDB_MAKE_ARGS) -C $(@D)
|
|
endef
|
|
|
|
define LEVELDB_INSTALL_STAGING_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE1) \
|
|
INSTALL_ROOT=$(STAGING_DIR) INSTALL_PREFIX=/usr \
|
|
$(LEVELDB_MAKE_ARGS) -C $(@D) install
|
|
$(INSTALL) -D -m 0644 $(@D)/out-static/libmemenv.a $(STAGING_DIR)/usr/lib/libmemenv.a
|
|
$(INSTALL) -D -m 0644 $(@D)/helpers/memenv/memenv.h $(STAGING_DIR)/usr/include/helpers/memenv/memenv.h
|
|
endef
|
|
|
|
define LEVELDB_INSTALL_TARGET_CMDS
|
|
$(TARGET_MAKE_ENV) $(MAKE1) \
|
|
INSTALL_ROOT=$(TARGET_DIR) INSTALL_PREFIX=/usr \
|
|
$(LEVELDB_MAKE_ARGS) -C $(@D) install
|
|
endef
|
|
|
|
$(eval $(generic-package))
|