buildrootschalter/package/luacjson/luacjson.mk
Francois Perrad 4a09e9b54f luainterpreter: create virtual package
This patch introduces the luainterpreter virtual package, which
is provided either by 'lua' or by 'lua-jit'.

Packages that require a Lua interpreter can then depend on
BR2_PACKAGE_LUAINTERPRETER (in their Config.in) and luainterpreter
(in their .mk).

Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
[yann.morin.1998@free.fr: switch to package-defined providers,
                          apply Thomas' comments]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-13 23:15:33 +01:00

28 lines
796 B
Makefile

################################################################################
#
# luacjson
#
################################################################################
LUACJSON_VERSION = 2.1.0
LUACJSON_SOURCE = lua-cjson-$(LUACJSON_VERSION).tar.gz
LUACJSON_SITE = http://www.kyne.com.au/~mark/software/download
LUACJSON_DEPENDENCIES = luainterpreter
LUACJSON_LICENSE = MIT
LUACJSON_LICENSE_FILES = LICENSE
define LUACJSON_BUILD_CMDS
$(MAKE) -C $(@D) \
CFLAGS="$(TARGET_CFLAGS)" \
LDFLAGS="$(TARGET_LDFLAGS)" \
CC="$(TARGET_CC)" \
LD="$(TARGET_LD)" \
PREFIX=$(STAGING_DIR)/usr
endef
define LUACJSON_INSTALL_TARGET_CMDS
install -D -m 0644 $(@D)/cjson.so $(TARGET_DIR)/usr/lib/lua/cjson.so
endef
$(eval $(generic-package))