PARAMETERS := $(shell cat Lego.json | grep -v '"parameterSets": ""' | jq -r '.parameterSets | keys[]') STL = $(PARAMETERS:%=%.stl) all: $(STL) $(STL): Lego.scad Lego.json openscad -o $@ -P $@ $<