Last active
January 19, 2016 22:23
-
-
Save choffee/5a4f06abebdbc832b144 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Makefile for OpenScad | |
# | |
# Copy of http://social.gl-como.it/display/3e3ce0df2355b11e6937f69900231262 | |
# | |
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 $(SRCDIR)/lib/* | |
mkdir -p ${BUILDDIR} | |
openscad -o $@ $< | |
$(BUILDDIR)/%.gcode: %.stl ${CONFDIR}/basic.ini | |
${SLIC3R} --load ${CONFDIR}/basic.ini $< | |
clean: | |
rm -f ${BUILDDIR}/*.stl ${BUILDDIR}/*.gcode |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment