Fixed build

This commit is contained in:
2025-04-01 12:04:50 +03:00
parent 69993ba696
commit c727a1912c

View File

@@ -1,27 +1,41 @@
ARCH=$(patsubst aarch64,arm64,$(shell uname -m))
BLENDER = ../../blender-3.6.20-linux-x64/blender
SERVER = src/godot/bin/godot_server.x11.opt.tools.$(ARCH)
EDITOR_PLATFORM=x11es
DEMO_PLATFORMS=x11 x11es
EDITOR = src/godot/bin/godot.$(EDITOR_PLATFORM).opt.tools.$(ARCH)
.PHONY: all godot-editor-main export export-models export-clothes \
export-clean export-linux-demo export-windows-demo \
export-binaries patch tests import-vrm export-buildings
all: godot-editor-main godot-main
godot-main: patch
SCONS_EXTRA=-j16
define build_godot
$(4): $(5)
@echo Building $(4)
cd src/godot; \
scons platform=x11 arch=$(ARCH) target=release tools=no custom_modules=../modules -j16; \
scons platform=x11 arch=$(ARCH) target=release_debug tools=no custom_modules=../modules -j16;
cd src/godot; \
scons platform=x11 arch=$(ARCH) target=release tools=no custom_modules=../modules -j16; \
scons platform=$(1) arch=$(ARCH) target=$(2) tools=$(3) custom_modules=../modules $(SCONS_EXTRA)
endef
define build_godot_platform
$(eval $(call build_godot,$(1),release,no,godot-main-release-$(1),patch))
$(eval $(call build_godot,$(1),debug,no,godot-main-debug-$(1),patch))
$(eval $(call build_godot,$(1),release_debug,no,godot-main-rdebug-$(1),patch))
GODOT_MAIN_TARGETS += godot-main-release-$(1) godot-main-debug-$(1) godot-main-rdebug-$(1)
endef
$(foreach pt,$(DEMO_PLATFORMS),$(eval $(call build_godot_platform,$(pt))))
godot-main: $(GODOT_MAIN_TARGETS) godot-editor-main godot-server-main
godot-server-main: $(SERVER)
godot-editor-main: $(EDITOR)
$(SERVER): patch
cd src/godot; \
scons platform=server arch=$(ARCH) target=release_debug tools=yes custom_modules=../modules -j16
godot-editor-main: patch
cd src/godot; \
scons platform=x11es arch=$(ARCH) verbose=yes target=release_debug tools=yes custom_modules=../modules -j16;
$(eval $(call build_godot,server,release_debug,yes,$(SERVER),patch))
$(eval $(call build_godot,x11es,release_debug,yes,$(EDITOR),patch))
patch: ./src/godot/scene/animation/skeleton_ik.cpp
cd ./src/godot && git reset --hard HEAD && rm -Rf platform/x11es; for p in ../patches/*.patch; do git apply $$p; done
cd ./src/godot && git reset --hard HEAD && rm -Rf platform/x11es && for p in ../patches/*.patch; do git apply $$p; done
sed -e 's/ERR_FAIL_COND_V(-1 == p_task->root_bone, false);//g' -i ./src/godot/scene/animation/skeleton_ik.cpp
cd ./src/modules/voxel && git reset --hard HEAD && for p in ../../patches/voxel/*.patch; do git apply $$p; done