Move tracks to modules, add Makefile
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
SCAD=train_tracks_generator.scad
|
||||
SUFFIX=.stl
|
||||
|
||||
# match "module foobar() { // `make` me"
|
||||
TARGETS != sed -n 's/^module *\([A-Za-z0-9_-]*\)() *.*make.* me.*$$/\1$(SUFFIX)/p' $(SCAD)
|
||||
|
||||
$(shell mkdir -p output)
|
||||
|
||||
all: ${TARGETS}
|
||||
|
||||
.SUFFIXES: ${SUFFIX}
|
||||
|
||||
${TARGETS}: $(SCAD)
|
||||
echo 'use <$(SCAD)>;\n$*();' | openscad -m make -o output/$@ -
|
||||
Reference in New Issue
Block a user