GODOT=godot3-server EXPORT_TEMPLATE_SOURCE=https://downloads.tuxfamily.org/godotengine/3.0.2/Godot_v3.0.2-stable_export_templates.tpz BUILD_DIR?=build GODOT_PROJECT_PATH?=game PROJECT_NAME?=game TARGET_HTML5?=HTML5 TARGET_WINDOWS?=Windows Desktop TARGET_MACOSX?=Mac OSX TARGET_LINUX?=Linux/X11 build-dir: mkdir -p "$(BUILD_DIR)" clean: rm -rf "$(BUILD_DIR)"/ export-all: export-html5 export-windows export-osx export-linux export-pack: build-dir $(GODOT) --path "$(GODOT_PROJECT_PATH)" --export "pack" "../$(BUILD_DIR)/$(PROJECT_NAME).pck" export-html5: build-dir mkdir -p "$(BUILD_DIR)/html" $(GODOT) --path "$(GODOT_PROJECT_PATH)" --export "$(TARGET_HTML5)" "../$(BUILD_DIR)/html/$(PROJECT_NAME).html" zip -j -r "$(BUILD_DIR)/$(PROJECT_NAME)-html5.zip" "$(BUILD_DIR)/html" rm -rf "$(BUILD_DIR)/html" export-windows: build-dir $(GODOT) --path "$(GODOT_PROJECT_PATH)" --export "$(TARGET_WINDOWS)" "../$(BUILD_DIR)/$(PROJECT_NAME).exe" export-osx: build-dir $(GODOT) --path "$(GODOT_PROJECT_PATH)" --export "$(TARGET_MACOSX)" "../$(BUILD_DIR)/$(PROJECT_NAME)-osx" export-linux: build-dir $(GODOT) --path "$(GODOT_PROJECT_PATH)" --export "$(TARGET_LINUX)" "../$(BUILD_DIR)/$(PROJECT_NAME)-x11"