aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorElena of Valhalla'' Grandi <valhalla@trueelena.org>2014-06-22 10:46:28 +0200
committerElena of Valhalla'' Grandi <valhalla@trueelena.org>2014-06-22 10:46:28 +0200
commitf9d5958260bb6168faeea051ba0f901a9fe1824c (patch)
treef6912fd715449583bb0f5090b8a9ab70bbadbddd /Makefile
parent3383067cf5958242bff20bf998789106ed3f7a49 (diff)
New source layout; added d6 and pips faces
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..943c209
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+
+BUILDDIR = build
+CONFDIR = conf
+SRCDIR = designs
+
+SLIC3R = ~/opt/Slic3r/bin/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}/dice.ini $^
+
+clean:
+ rm -f ${BUILDDIR}/*.stl ${BUILDDIR}/*.gcode
+