genode/libports/ports/lua.mk
Christian Helmuth 0200c27e33 Lua: Port of Lua runtime and simple example
The Lua runtime library is built in two variants: ANSI C and C++. The
C++ provides all Lua API function with C++ linkage and uses C++
exceptions instead of setjmp/longjmp for protected execution of Lua
chunks.

The ported version of Lua is 5.1.5.
2012-05-29 13:54:52 +02:00

35 lines
760 B
Makefile

LUA = lua-5.1.5
LUA_TGZ = $(LUA).tar.gz
LUA_URL = http://www.lua.org/ftp/$(LUA_TGZ)
#
# Interface to top-level prepare Makefile
#
PORTS += $(LUA)
LUA_INC_DIR = include/lua
prepare-lua: $(CONTRIB_DIR)/$(LUA) $(LUA_INC_DIR)
$(CONTRIB_DIR)/$(LUA): clean-lua
#
# Port-specific local rules
#
$(DOWNLOAD_DIR)/$(LUA_TGZ):
$(VERBOSE)wget -c -P $(DOWNLOAD_DIR) $(LUA_URL) && touch $@
$(CONTRIB_DIR)/$(LUA): $(DOWNLOAD_DIR)/$(LUA_TGZ)
$(VERBOSE)tar xfz $< -C $(CONTRIB_DIR) && touch $@
LUA_INCLUDES = lua.h lauxlib.h luaconf.h lualib.h
$(LUA_INC_DIR):
$(VERBOSE)mkdir -p $@
$(VERBOSE)for i in $(LUA_INCLUDES); do \
ln -sf ../../$(CONTRIB_DIR)/$(LUA)/src/$$i $@; done
clean-lua:
$(VERBOSE)rm -rf $(LUA_INC_DIR)
$(VERBOSE)rm -rf $(CONTRIB_DIR)/$(LUA)