BLEND_FILES = $(shell find -type f -name '*.blend') GLB_TARGETS = $(patsubst %.blend, ../godot/%.glb, $(BLEND_FILES)) all: ${GLB_TARGETS} # --factory-startup disables addons (My custom addons are buggy and crash lots) ../godot/%.glb: %.blend mkdir -p $(shell dirname $@) blender -b --factory-startup $< --python-text export.py --export-path $@