raylua v4.0a
This commit is contained in:
parent
95d558cb98
commit
262a663355
@ -25,26 +25,29 @@ local ar = os.getenv "AR" or "ar"
|
|||||||
local windres = os.getenv "WINDRES" or "windres"
|
local windres = os.getenv "WINDRES" or "windres"
|
||||||
|
|
||||||
-- TODO: Use current lua interpreter
|
-- TODO: Use current lua interpreter
|
||||||
local lua = os.getenv "LUA" or "luajit\\src\\luajit"
|
local lua = os.getenv "LUA"
|
||||||
local needs_luajit_built = not (os.getenv "LUA")
|
local needs_luajit_built = not (os.getenv "LUA")
|
||||||
|
|
||||||
local cflags = os.getenv "CFLAGS" or "-O2 -s"
|
local cflags = os.getenv "CFLAGS" or "-O2 -s"
|
||||||
local ldflags = os.getenv "LDFLAGS" or "-O2 -s -lm"
|
local ldflags = os.getenv "LDFLAGS" or "-O2 -s -lm"
|
||||||
|
|
||||||
local modules = "raymath rlgl easings gestures physac raygui"
|
local modules = "raymath rlgl easings gestures physac raygui"
|
||||||
local graphics = os.getenv "GRAPHICS" or "GRAPHICS_API_OPENGL_33"
|
local graphics = os.getenv "GRAPHICS" or "GRAPHICS_API_OPENGL_43"
|
||||||
|
|
||||||
cflags = cflags .. " -Iluajit/src -Iraygui/src -Iraylib/src"
|
cflags = cflags .. " -Iluajit/src -Iraygui/src -Iraylib/src".. " -D" .. graphics
|
||||||
ldflags = ldflags .. " luajit/src/libluajit.a raylib/src/libraylib.a luajit/src/libluajit.a"
|
|
||||||
|
|
||||||
cflags = cflags .. " -D" .. graphics
|
local raylua_so_path = "raylua.so" -- assume unix-like by default
|
||||||
|
local so_ldflags = ldflags
|
||||||
local exe_ldflags = ""
|
|
||||||
|
|
||||||
if los.type() == "linux" then
|
if los.type() == "linux" then
|
||||||
ldflags = ldflags .. " -ldl -pthread"
|
ldflags = ldflags .. " -ldl -pthread"
|
||||||
|
so_ldflags = ldflags .. " -llua5.1"
|
||||||
|
lua = lua or "luajit/src/luajit"
|
||||||
elseif los.type() == "win32" then
|
elseif los.type() == "win32" then
|
||||||
ldflags = ldflags .. " -lopengl32 -lgdi32 -lwinmm -static "
|
ldflags = ldflags .. " -lopengl32 -lgdi32 -lwinmm -static "
|
||||||
|
so_ldflags = ldflags .. " -llua5.1.dll"
|
||||||
|
raylua_so_path = "raylua.dll"
|
||||||
|
lua = lua or "luajit\\src\\luajit"
|
||||||
end
|
end
|
||||||
|
|
||||||
local libluajit
|
local libluajit
|
||||||
@ -144,3 +147,11 @@ local raylua_e = c.link("raylua_e",
|
|||||||
"raylua_e",
|
"raylua_e",
|
||||||
cc
|
cc
|
||||||
)
|
)
|
||||||
|
|
||||||
|
local raylua_so = c.link(raylua_so_path,
|
||||||
|
saphire.merge(raylua_obj, { libraylib }),
|
||||||
|
so_ldflags,
|
||||||
|
true,
|
||||||
|
raylua_so_path,
|
||||||
|
cc
|
||||||
|
)
|
||||||
|
2
raylib
2
raylib
@ -1 +1 @@
|
|||||||
Subproject commit 99f6707e2c80be2ac4c169fd6986ff2fd8d181a7
|
Subproject commit 0851960397f02a477d80eda2239f90fae14dec64
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
local load = loadstring
|
local load = loadstring
|
||||||
|
|
||||||
raylua.version = "v4.0-dev"
|
raylua.version = "v4.0a"
|
||||||
|
|
||||||
function raylua.repl()
|
function raylua.repl()
|
||||||
print("> raylua " .. raylua.version .. " <")
|
print("> raylua " .. raylua.version .. " <")
|
||||||
|
@ -130,7 +130,6 @@ void SetExitKey(int key)
|
|||||||
int GetKeyPressed(void)
|
int GetKeyPressed(void)
|
||||||
int GetCharPressed(void)
|
int GetCharPressed(void)
|
||||||
bool IsGamepadAvailable(int gamepad)
|
bool IsGamepadAvailable(int gamepad)
|
||||||
bool IsGamepadName(int gamepad, const char *name)
|
|
||||||
const char *GetGamepadName(int gamepad)
|
const char *GetGamepadName(int gamepad)
|
||||||
bool IsGamepadButtonPressed(int gamepad, int button)
|
bool IsGamepadButtonPressed(int gamepad, int button)
|
||||||
bool IsGamepadButtonDown(int gamepad, int button)
|
bool IsGamepadButtonDown(int gamepad, int button)
|
||||||
|
Loading…
Reference in New Issue
Block a user