3 all: $(LIBRARIES) $(M_LIBRARIES) install metalua
8 LUA_COMPILE = ../lua/luac
16 # Library which compiles an AST into a bytecode string.
23 # Library which compiles source strings into AST
35 bytecode.luac: $(BYTECODE_LUA)
36 $(LUA_COMPILE) -o $@ $^
39 $(LUA_COMPILE) -o $@ $^
41 # Plain lua files compilation
42 %.luac: %.mlua bootstrap.lua mlp.luac bytecode.luac
43 $(LUA_RUN) bootstrap.lua $<
45 # Metalua files compilation through the bootstrap compiler
47 $(LUA_COMPILE) -o $@ bootstrap $<
49 # Compiler/interpreter
50 metalua: metalua.luac $(LIBRARIES)
51 $(LUA_RUN) metalua.luac --verbose --sharpbang '#!/usr/bin/env lua' --output metalua --file metalua.mlua
53 install: metalua $(LIBRARIES)
54 cp metalua $(TARGET_BIN_PATH)
55 cp $(LIBRARIES) $(TARGET_LUA_PATH)/
57 .PHONY: all lib install