Created
March 5, 2017 11:51
-
-
Save jinhwanlazy/681e579e01aa2663b2920e3e4456f26f to your computer and use it in GitHub Desktop.
barebone makefile for openscad
This file contains hidden or 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
BUILDDIR = build | |
SRCDIR = src | |
OPENSCAD:=$(shell type -p openscad || echo /Applications/OpenSCAD.app/Contents/MacOS/OpenSCAD) | |
VPATH = $(SRCDIR):$(BUILDDIR) | |
STL_TARGETS = $(patsubst $(SRCDIR)/%.scad,$(BUILDDIR)/%.stl,$(wildcard $(SRCDIR)/*.scad)) | |
.PHONY: all clean | |
all: $(STL_TARGETS) | |
$(BUILDDIR)/%.stl: %.scad | |
mkdir -p ${BUILDDIR} | |
${OPENSCAD} -o $@ $< | |
clean: | |
rm -f ${BUILDDIR}/*.stl |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment