Commit | Line | Data |
---|---|---|
92eecbb1 VAH |
1 | #openscad -o output/bushing.stl bushing.scad |
2 | ||
d3df5f4e JL |
3 | # Type of 3D Model file to output. Known to work with AMF or STL. |
4 | OUTPUT_TYPE=stl | |
92eecbb1 VAH |
5 | INCLUDES = $(wildcard inc/*.scad) |
6 | ||
7 | MODELS = $(filter-out configuration.scad, $(wildcard *.scad)) | |
8 | ||
9 | STL_FILES_1 = $(foreach src, $(MODELS),output/$(src)) | |
d3df5f4e | 10 | STL_FILES = $(STL_FILES_1:%.scad=%.$(OUTPUT_TYPE)) |
92eecbb1 VAH |
11 | |
12 | all: $(STL_FILES) | |
13 | ||
06ec233c VAH |
14 | MODELS_EXTRAS = $(wildcard extras/*.scad) |
15 | STL_EXTRAS_1 = $(foreach src, $(MODELS_EXTRAS),output/$(src)) | |
d3df5f4e | 16 | STL_EXTRAS = $(STL_EXTRAS_1:%.scad=%.$(OUTPUT_TYPE)) |
06ec233c VAH |
17 | |
18 | extras: $(STL_EXTRAS) | |
19 | ||
d3df5f4e | 20 | output/%.$(OUTPUT_TYPE): %.scad $(INCLUDES) configuration.scad |
92eecbb1 | 21 | openscad -o $@ $< |
0fe64cc4 VAH |
22 | |
23 | clean: | |
d3df5f4e | 24 | rm output/*.$(OUTPUT_TYPE) output/*.gcode output/extras/*.stl output/extras/*.gcode |