summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2015-07-20 16:22:16 +0200
committerElena ``of Valhalla'' Grandi <valhalla@trueelena.org>2015-07-20 16:22:16 +0200
commit178b098927b8f5cff30324374a4d46110cc992c8 (patch)
tree3122e64fe3c86915dc5a0d1e9ff374f7a9a63608 /Makefile
makefile + basic slic3r conf.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile27
1 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..940c53c
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+
+BUILDDIR = build
+CONFDIR = conf
+SRCDIR = src
+
+SLIC3R = slic3r
+
+VPATH = $(SRCDIR):$(BUILDDIR)
+
+STL_TARGETS = $(patsubst $(SRCDIR)/%.scad,$(BUILDDIR)/%.stl,$(wildcard $(SRCDIR)/*.scad))
+GCODE_TARGETS = $(patsubst $(SRCDIR)/%.scad,$(BUILDDIR)/%.gcode,$(wildcard $(SRCDIR)/*.scad))
+
+.PHONY: all gcode clean
+all: $(STL_TARGETS)
+
+gcode: $(GCODE_TARGETS)
+
+$(BUILDDIR)/%.stl: %.scad
+ mkdir -p ${BUILDDIR}
+ openscad -o $@ $^
+
+$(BUILDDIR)/%.gcode: %.stl
+ ${SLIC3R} --load ${CONFDIR}/basic.ini $^
+
+clean:
+ rm -f ${BUILDDIR}/*.stl ${BUILDDIR}/*.gcode
+