diff --git a/Makefile b/Makefile index 5f5867e..1437027 100644 --- a/Makefile +++ b/Makefile @@ -181,14 +181,14 @@ linux64: CFLAGS += -fPIC linux64: build/linux_x86_64/liblua_pluginscript.so windows32: build/windows_x86/lua_pluginscript.dll -cross-windows32: CROSS = i686-w64-mingw32- -cross-windows32: MAKE_LUAJIT_ARGS += HOST_CC="$(CC) -m32" CROSS="i686-w64-mingw32-" LDFLAGS=-static-libgcc -cross-windows32: windows32 +mingw-windows32: CROSS = i686-w64-mingw32- +mingw-windows32: MAKE_LUAJIT_ARGS += HOST_CC="$(CC) -m32" CROSS="$(CROSS)" LDFLAGS=-static-libgcc +mingw-windows32: windows32 windows64: build/windows_x86_64/lua_pluginscript.dll -cross-windows64: CROSS = x86_64-w64-mingw32- -cross-windows64: MAKE_LUAJIT_ARGS += HOST_CC="$(CC)" CROSS="x86_64-w64-mingw32-" LDFLAGS=-static-libgcc -cross-windows64: windows64 +mingw-windows64: CROSS = x86_64-w64-mingw32- +mingw-windows64: MAKE_LUAJIT_ARGS += HOST_CC="$(CC)" CROSS="$(CROSS)" LDFLAGS=-static-libgcc +mingw-windows64: windows64 osx-x86_64: build/osx_x86_64/lua_pluginscript.dylib osx-arm64: build/osx_arm64/lua_pluginscript.dylib diff --git a/README.md b/README.md index ecf400d..bfce924 100644 --- a/README.md +++ b/README.md @@ -238,6 +238,12 @@ make linux64 # x86_64 make linux32 # x86 make osx64 \ # "universal" multiarch x86_64 + amd64 dylib MACOSX_DEPLOYMENT_TARGET=XX.YY + +# Cross-compiling for Windows using MinGW +make mingw-windows64 # x86_64 +make mingw-windows32 # x86 + +# Cross-compiling for Android using NDK make android-armv7a \ # Android ARMv7 NDK_TOOLCHAIN_BIN=/path/to/ndk/toolchains/llvm/prebuild/host_os-arch/bin make android-aarch64 \ # Android ARM64 @@ -246,12 +252,20 @@ make android-x86 \ # Android x86 NDK_TOOLCHAIN_BIN=/path/to/ndk/toolchains/llvm/prebuild/host_os-arch/bin make android-x86_64 \ # Android x86_64 NDK_TOOLCHAIN_BIN=/path/to/ndk/toolchains/llvm/prebuild/host_os-arch/bin + +# If you plan in using the export plugin, this is also required +make plugin ``` The GDNativeLibrary file `lua_pluginscript.gdnlib` is already configured to use the built files stored in the `build` folder, so that one can use this -repository directly inside a Godot project under the folder -`addons/godot-lua-pluginscript`. +repository directly inside a Godot project under the folder `addons/godot-lua-pluginscript`. + +After building the desired libraries, a distribution zip can be built with: + +```sh +make dist +``` ## Third-party software