Makefile 515 Bytes
Newer Older
Jan Koniarik's avatar
Jan Koniarik committed
1
2
3
4
5
6
7
8
9
10
# inspired based on https://github.com/olikraus/scad/blob/master/train_tube_track/Makefile

SCAD=$(wildcard example/*.scad)
STL=$(addprefix example/, $(notdir $(SCAD:.scad=.stl)))
PNG=$(addprefix example/, $(notdir $(SCAD:.scad=.png)))

example/%.stl: example/%.scad
	openscad $< -o $@

example/%.png: example/%.scad
Jan Koniarik's avatar
Jan Koniarik committed
11
	openscad $< --autocenter --viewall --imgsize=640,480 -o $@
Jan Koniarik's avatar
Jan Koniarik committed
12

Jan Koniarik's avatar
Jan Koniarik committed
13
.PHONY: all gen_example_readme
Jan Koniarik's avatar
Jan Koniarik committed
14
all: $(STL) $(PNG)
Jan Koniarik's avatar
Jan Koniarik committed
15
16
17

gen_example_readme:
	python3 example/gen_readme.py $(SCAD:.scad=) > example/README.md