1 2 3 4 5 6 7 8 9 10 11 12 13
BUILDDIR=build SRCDIR=parts VPATH = $(SRCDIR) STL_TARGETS = $(patsubst $(SRCDIR)/%.scad,$(BUILDDIR)/%.stl,$(wildcard $(SRCDIR)/*.scad)) all: $(STL_TARGETS) $(BUILDDIR)/%.stl: %.scad mkdir -p ${BUILDDIR} openscad -o $@ $^