Added configuration option to output AMF or STL files based on the initial output.
[clinton/prusa3.git] / box_frame / Makefile
1 #openscad -o output/bushing.stl bushing.scad
2
3 # Type of 3D Model file to output. Known to work with AMF or STL.
4 OUTPUT_TYPE=stl
5 INCLUDES = $(wildcard inc/*.scad)
6
7 MODELS = $(filter-out configuration.scad, $(wildcard *.scad))
8
9 STL_FILES_1 = $(foreach src, $(MODELS),output/$(src))
10 STL_FILES = $(STL_FILES_1:%.scad=%.$(OUTPUT_TYPE))
11
12 all: $(STL_FILES)
13
14 MODELS_EXTRAS = $(wildcard extras/*.scad)
15 STL_EXTRAS_1 = $(foreach src, $(MODELS_EXTRAS),output/$(src))
16 STL_EXTRAS = $(STL_EXTRAS_1:%.scad=%.$(OUTPUT_TYPE))
17
18 extras: $(STL_EXTRAS)
19
20 output/%.$(OUTPUT_TYPE): %.scad $(INCLUDES) configuration.scad
21 openscad -o $@ $<
22
23 clean:
24 rm output/*.$(OUTPUT_TYPE) output/*.gcode output/extras/*.stl output/extras/*.gcode