diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2023-01-24 16:38:30 +0100 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2023-01-24 16:38:30 +0100 |
commit | e962c204f3949829614c8445c5c93150e615607f (patch) | |
tree | 5d83b7f8d02f45876d7999979cadb31ca260baac /Makefile | |
parent | f2074c15ceb9e3a4511343fd2d2738cda804691e (diff) | |
download | oscad_gridfinity-e962c204f3949829614c8445c5c93150e615607f.tar.gz |
better multibuild
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 18 |
1 files changed, 10 insertions, 8 deletions
@@ -12,6 +12,9 @@ SRC = $(wildcard *.scad) STL = $(addprefix $(STLDIR)/,$(SRC:.scad=.stl)) PNG = $(addprefix $(PNGDIR)/,$(SRC:.scad=.png)) +BITSTORAGE_SIZES = $(STLDIR)/bitstorage_1x1x6.35.stl $(STLDIR)/bitstorage_1x2x6.35.stl $(STLDIR)/bitstorage_2x2x6.35.stl \ + $(STLDIR)/bitstorage_1x1x4.stl $(STLDIR)/bitstorage_1x2x4.stl $(STLDIR)/bitstorage_2x2x4.stl + .PHONY: _default _default: stl @@ -24,15 +27,14 @@ stl: $(STLDIR) $(STL) $(STLDIR)/gridfinity.stl: gridfinity.scad @echo -$(STLDIR)/bitstorage_1x2.stl: bitstorage.scad - @echo [ STL ] $< - @$(SCAD) $(STLOPTS) -D ux=2 -o $@ $< - -$(STLDIR)/bitstorage_1x1.stl: bitstorage.scad - @echo [ STL ] $< - @$(SCAD) $(STLOPTS) -D ux=1 -o $@ $< +$(STLDIR)/bitstorage_%.stl: bitstorage.scad + @echo [ STL ] $< $* + @$(SCAD) $(STLOPTS) \ + -D ux=$(firstword $(subst x, ,$*)) -D uy=$(word 2,$(subst x, ,$*)) \ + -D wrench_size=$(word 3,$(subst x, ,$*))\ + -o $@ $< -$(STLDIR)/bitstorage.stl: $(STLDIR)/bitstorage_1x1.stl $(STLDIR)/bitstorage_1x2.stl +$(STLDIR)/bitstorage.stl: $(BITSTORAGE_SIZES) @echo $(STLDIR)/%.stl: %.scad |