Added configuration option to output AMF or STL files based on the initial output.
[clinton/prusa3.git] / box_frame / Makefile
CommitLineData
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.
4OUTPUT_TYPE=stl
92eecbb1
VAH
5INCLUDES = $(wildcard inc/*.scad)
6
7MODELS = $(filter-out configuration.scad, $(wildcard *.scad))
8
9STL_FILES_1 = $(foreach src, $(MODELS),output/$(src))
d3df5f4e 10STL_FILES = $(STL_FILES_1:%.scad=%.$(OUTPUT_TYPE))
92eecbb1
VAH
11
12all: $(STL_FILES)
13
06ec233c
VAH
14MODELS_EXTRAS = $(wildcard extras/*.scad)
15STL_EXTRAS_1 = $(foreach src, $(MODELS_EXTRAS),output/$(src))
d3df5f4e 16STL_EXTRAS = $(STL_EXTRAS_1:%.scad=%.$(OUTPUT_TYPE))
06ec233c
VAH
17
18extras: $(STL_EXTRAS)
19
d3df5f4e 20output/%.$(OUTPUT_TYPE): %.scad $(INCLUDES) configuration.scad
92eecbb1 21 openscad -o $@ $<
0fe64cc4
VAH
22
23clean:
d3df5f4e 24 rm output/*.$(OUTPUT_TYPE) output/*.gcode output/extras/*.stl output/extras/*.gcode