2007-11-30 02:08:36 +01:00
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# lua
|
|
|
|
#
|
|
|
|
#############################################################
|
|
|
|
|
2009-04-08 22:50:03 +02:00
|
|
|
LUA_VERSION=5.1.4
|
2007-11-30 02:08:36 +01:00
|
|
|
|
|
|
|
LUA_SOURCE=lua-$(LUA_VERSION).tar.gz
|
|
|
|
LUA_CAT:=$(ZCAT)
|
|
|
|
LUA_SITE=http://www.lua.org/ftp
|
|
|
|
|
|
|
|
LUA_DIR=$(BUILD_DIR)/lua-$(LUA_VERSION)
|
|
|
|
|
2008-03-27 16:42:42 +01:00
|
|
|
LUA_CFLAGS=-DLUA_USE_LINUX
|
2007-11-30 02:08:36 +01:00
|
|
|
LUA_MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
|
|
|
|
|
|
|
|
$(DL_DIR)/$(LUA_SOURCE):
|
2009-01-16 12:42:52 +01:00
|
|
|
$(call DOWNLOAD,$(LUA_SITE),$(LUA_SOURCE))
|
2007-11-30 02:08:36 +01:00
|
|
|
|
|
|
|
$(LUA_DIR)/.unpacked: $(DL_DIR)/$(LUA_SOURCE)
|
|
|
|
$(LUA_CAT) $(DL_DIR)/$(LUA_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
|
|
touch $(LUA_DIR)/.unpacked
|
|
|
|
|
|
|
|
$(LUA_DIR)/src/lua: $(LUA_DIR)/.unpacked
|
|
|
|
rm -f $@
|
|
|
|
$(MAKE) $(TARGET_CONFIGURE_OPTS) \
|
|
|
|
MYCFLAGS=$(LUA_CFLAGS) \
|
|
|
|
MYLIBS=$(LUA_MYLIBS) \
|
|
|
|
AR="$(TARGET_CROSS)ar rcu" \
|
|
|
|
-C $(LUA_DIR)/src all
|
|
|
|
|
|
|
|
$(LUA_DIR)/src/luac: $(LUA_DIR)/src/lua
|
|
|
|
|
|
|
|
$(LUA_DIR)/src/liblua.a: $(LUA_DIR)/src/lua
|
|
|
|
|
|
|
|
$(STAGING_DIR)/usr/lib/liblua.a: $(LUA_DIR)/src/liblua.a
|
|
|
|
cp -dpf $(LUA_DIR)/src/liblua.a $(STAGING_DIR)/usr/lib/liblua.a
|
|
|
|
|
|
|
|
$(STAGING_DIR)/usr/bin/lua: $(LUA_DIR)/src/lua
|
|
|
|
cp -dpf $(LUA_DIR)/src/lua $(STAGING_DIR)/usr/bin/lua
|
|
|
|
|
|
|
|
$(STAGING_DIR)/usr/bin/luac: $(LUA_DIR)/src/luac
|
|
|
|
cp -dpf $(LUA_DIR)/src/luac $(STAGING_DIR)/usr/bin/luac
|
|
|
|
|
|
|
|
$(TARGET_DIR)/usr/lib/liblua.a: $(STAGING_DIR)/usr/lib/liblua.a
|
|
|
|
cp -dpf $(STAGING_DIR)/usr/lib/liblua.a $(TARGET_DIR)/usr/lib/liblua.a
|
|
|
|
|
|
|
|
$(TARGET_DIR)/usr/bin/lua: $(STAGING_DIR)/usr/bin/lua
|
|
|
|
cp -dpf $(STAGING_DIR)/usr/bin/lua $(TARGET_DIR)/usr/bin/lua
|
|
|
|
|
|
|
|
$(TARGET_DIR)/usr/bin/luac: $(STAGING_DIR)/usr/bin/luac
|
|
|
|
cp -dpf $(STAGING_DIR)/usr/bin/luac $(TARGET_DIR)/usr/bin/luac
|
|
|
|
|
|
|
|
|
2008-03-27 16:42:42 +01:00
|
|
|
lua-bins: $(TARGET_DIR)/usr/bin/lua $(TARGET_DIR)/usr/bin/luac
|
2007-11-30 02:08:36 +01:00
|
|
|
|
|
|
|
lua-libs: $(TARGET_DIR)/usr/lib/liblua.a
|
|
|
|
|
2009-09-02 17:02:02 +02:00
|
|
|
lua: readline ncurses lua-bins lua-libs
|
2007-11-30 02:08:36 +01:00
|
|
|
|
|
|
|
lua-source: $(DL_DIR)/$(LUA_SOURCE)
|
|
|
|
|
|
|
|
lua-clean:
|
2008-03-27 16:42:42 +01:00
|
|
|
rm -f $(STAGING_DIR)/usr/bin/lua $(TARGET_DIR)/usr/bin/luac
|
|
|
|
rm -f $(STAGING_DIR)/usr/lib/liblua.a
|
|
|
|
rm -f $(TARGET_DIR)/usr/bin/lua $(TARGET_DIR)/usr/bin/luac
|
|
|
|
rm -f $(TARGET_DIR)/usr/lib/liblua.a
|
|
|
|
-$(MAKE) -C $(LUA_DIR) clean
|
2007-11-30 02:08:36 +01:00
|
|
|
|
|
|
|
lua-dirclean:
|
|
|
|
rm -rf $(LUA_DIR)
|
|
|
|
|
|
|
|
#############################################################
|
|
|
|
#
|
|
|
|
# Toplevel Makefile options
|
|
|
|
#
|
|
|
|
#############################################################
|
2008-12-08 09:15:27 +01:00
|
|
|
ifeq ($(BR2_PACKAGE_LUA),y)
|
2007-11-30 02:08:36 +01:00
|
|
|
TARGETS+=lua
|
|
|
|
endif
|