From ebfb628ab36da629d64459fa503c71a9b01214b2 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Fri, 2 Jan 2026 23:35:18 +0100 Subject: [PATCH] build: native or generic builds --- .gitignore | 3 ++- Makefile | 13 +++++++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 7bea225..3316d5e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.dll -liblua \ No newline at end of file +liblua +liblua.native \ No newline at end of file diff --git a/Makefile b/Makefile index 12895f7..d288002 100644 --- a/Makefile +++ b/Makefile @@ -2,11 +2,20 @@ liblua: gcc -c lua/*.c ar rcs liblua *.o rm *.o +liblua-native: + gcc -c lua/*.c -march=native + ar rcs liblua.native *.o + rm *.o build: liblua - gcc -O2 -shared -static -o luahost.dll plugin.c liblua -lgdi32 -luser32 -lshell32 \ + gcc -O2 -shared -static -o luahost-x86.dll plugin.c liblua -lgdi32 -luser32 -lshell32 \ -Wl,--add-stdcall-alias \ -ffunction-sections -fdata-sections -install: build +build-native: liblua + gcc -O2 -shared -static -o luahost.dll plugin.c liblua.native -lgdi32 -luser32 -lshell32 -march=native \ + -Wl,--add-stdcall-alias \ + -ffunction-sections -fdata-sections + +install: build-native cp luahost.dll "/c/Program Files (x86)/RDS Spy/plugins" \ No newline at end of file