BLENDER = ../../blender-3.6.20-linux-x64/blender SERVER = src/godot/bin/godot_server.x11.opt.tools.64 .PHONY: all godot-editor-main export export-models export-clothes \ export-clean export-linux-demo export-windows-demo \ export-binaries patch tests import-vrm all: godot-editor-main godot-main ARCH=$(patsubst aarch64,arm64,$(shell uname -m)) godot-main: patch 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=server target=release_debug tools=yes custom_modules=../modules -j16 godot-editor-main: patch cd src/godot; \ scons platform=x11 arch=$(ARCH) verbose=yes target=release_debug tools=yes custom_modules=../modules -j24; patch: ./src/godot/scene/animation/skeleton_ik.cpp cd ./src/godot && git reset --hard HEAD && 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 export: export-models export-clothes rm -Rf godot/.import export-clean: rm -Rf godot/character-data/* rm -f assets/blender/scripts/tmp-*.blend install-addons: $(BLENDER) -b -Y -P assets/blender/scripts/install_addons.py import-vrm: install-addons export-clean mkdir -p assets/blender/scripts/shapes/male assets/blender/scripts/shapes/female $(BLENDER) -b -Y -P assets/blender/scripts/import_vrm.py export2edit: import-vrm $(BLENDER) -b -Y -P assets/blender/scripts/export_for_modelling.py export-models: export-clean import-vrm $(BLENDER) -b -Y -P assets/blender/scripts/export_models.py export-clothes: export-clean $(BLENDER) -b -Y -P assets/blender/scripts/export_clothes.py export-binaries: mkdir -p export $(SERVER) --path godot --export linux_demo ../export/office-demo-linux.x86_64 $(SERVER) --path godot --export-debug linux_demo ../export/office-demo-debug-linux.x86_64 $(SERVER) --path godot --export windows_demo ../export/office-demo-windows.x86_64.exe $(SERVER) --path godot --export-debug windows_demo ../export/office-demo-debug-windows.x86_64.exe tests: make -C tests all