From dba1274bc3b04329f5c64dd210d4557227f6cfda Mon Sep 17 00:00:00 2001 From: TSnake41 Date: Sun, 20 Mar 2022 12:53:25 +0100 Subject: [PATCH] Add saphire build system support for raylua_r (#3) --- Saphirefile.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Saphirefile.lua b/Saphirefile.lua index c687c45..1466b53 100644 --- a/Saphirefile.lua +++ b/Saphirefile.lua @@ -30,6 +30,7 @@ local needs_luajit_built = not (os.getenv "LUA") local cflags = os.getenv "CFLAGS" or "-O2 -s" local ldflags = os.getenv "LDFLAGS" or "-O2 -s -lm" +local ldflags_r = os.getenv "LDFLAGS_R" or "" local modules = "raymath rlgl easings gestures physac raygui" local graphics = os.getenv "GRAPHICS" or "GRAPHICS_API_OPENGL_43" @@ -48,6 +49,7 @@ elseif los.type() == "win32" then ldflags = ldflags .. " -lopengl32 -lgdi32 -lwinmm -static " so_ldflags = ldflags .. " -llua5.1.dll" raylua_so_path = "raylua.dll" + ldflags_r = ldflags_r .. "-mwindows" lua = lua or "luajit\\src\\luajit" end @@ -149,6 +151,14 @@ local raylua_e = c.link("raylua_e", cc ) +local raylua_r = c.link("raylua_r", + saphire.merge(raylua_e_objs, { libraylua, libraylib, libluajit, icon }), + ldflags .. " " .. ldflags_r, + false, + "raylua_r", + cc +) + local raylua_so = c.link(raylua_so_path, saphire.merge(raylua_obj, { libraylib }), so_ldflags,