| 1 | #openscad -o output/bushing.stl bushing.scad |
| 2 | |
| 3 | INCLUDES = $(wildcard inc/*.scad) |
| 4 | |
| 5 | MODELS = $(filter-out configuration.scad, $(wildcard *.scad)) |
| 6 | |
| 7 | STL_FILES_1 = $(foreach src, $(MODELS),output/$(src)) |
| 8 | STL_FILES = $(STL_FILES_1:%.scad=%.stl) |
| 9 | |
| 10 | all: $(STL_FILES) |
| 11 | |
| 12 | MODELS_EXTRAS = $(wildcard extras/*.scad) |
| 13 | STL_EXTRAS_1 = $(foreach src, $(MODELS_EXTRAS),output/$(src)) |
| 14 | STL_EXTRAS = $(STL_EXTRAS_1:%.scad=%.stl) |
| 15 | |
| 16 | extras: $(STL_EXTRAS) |
| 17 | |
| 18 | output/%.stl: %.scad $(INCLUDES) configuration.scad |
| 19 | openscad -o $@ $< |
| 20 | |
| 21 | clean: |
| 22 | rm output/*.stl output/*.gcode output/extras/*.stl output/extras/*.gcode |