aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorGravatar Jonas Gunz <himself@jonasgunz.de> 2023-01-15 20:47:24 +0100
committerGravatar Jonas Gunz <himself@jonasgunz.de> 2023-01-15 20:47:24 +0100
commit1b003081b689d0f999e6123cc330bb94d6aa6662 (patch)
tree122cc6f6741091c4f93200c6a0de51ff8bc9d64d /Makefile
parente91581d515b0ac1489669e02b14046ed8fd095be (diff)
downloadoscad_gridfinity-1b003081b689d0f999e6123cc330bb94d6aa6662.tar.gz
Makefile, readme
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 37 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..a47a419
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,37 @@
+SCAD=openscad
+
+STLOPTS= --export-format binstl
+PNGOPTS= --viewall --autocenter --imgsize 400,400 --render
+
+SRC = $(wildcard *.scad)
+
+STL = $(SRC:.scad=.stl)
+PNG = $(SRC:.scad=.png)
+
+_default: stl
+
+all: clean stl png
+
+stl: $(STL)
+
+gridfinity.stl: gridfinity.scad
+ @echo
+
+%.stl: %.scad
+ @echo [ STL ] $<
+ @$(SCAD) $(STLOPTS) -o $@ $<
+
+
+png: $(PNG)
+
+gridfinity.png: gridfinity.scad
+ @echo
+
+%.png: %.scad
+ @echo [ PNG ] $<
+ @$(SCAD) $(SCADOPTS) -o $@ $<
+
+.PHONY: clean
+clean:
+ @rm -f *.stl
+ @rm -f *.png