From: Joseph Lenox Date: Tue, 20 Jan 2015 23:12:11 +0000 (-0600) Subject: Added configuration option to output AMF or STL files based on the initial output. X-Git-Url: http://git.hcoop.net/clinton/prusa3.git/commitdiff_plain/d3df5f4e1393a123c12b42ac64dae7a2c7f7b925 Added configuration option to output AMF or STL files based on the initial output. Defaults to STL. --- diff --git a/box_frame/Makefile b/box_frame/Makefile index 7b9f338..7168703 100644 --- a/box_frame/Makefile +++ b/box_frame/Makefile @@ -1,22 +1,24 @@ #openscad -o output/bushing.stl bushing.scad +# Type of 3D Model file to output. Known to work with AMF or STL. +OUTPUT_TYPE=stl INCLUDES = $(wildcard inc/*.scad) MODELS = $(filter-out configuration.scad, $(wildcard *.scad)) STL_FILES_1 = $(foreach src, $(MODELS),output/$(src)) -STL_FILES = $(STL_FILES_1:%.scad=%.stl) +STL_FILES = $(STL_FILES_1:%.scad=%.$(OUTPUT_TYPE)) all: $(STL_FILES) MODELS_EXTRAS = $(wildcard extras/*.scad) STL_EXTRAS_1 = $(foreach src, $(MODELS_EXTRAS),output/$(src)) -STL_EXTRAS = $(STL_EXTRAS_1:%.scad=%.stl) +STL_EXTRAS = $(STL_EXTRAS_1:%.scad=%.$(OUTPUT_TYPE)) extras: $(STL_EXTRAS) -output/%.stl: %.scad $(INCLUDES) configuration.scad +output/%.$(OUTPUT_TYPE): %.scad $(INCLUDES) configuration.scad openscad -o $@ $< clean: - rm output/*.stl output/*.gcode output/extras/*.stl output/extras/*.gcode + rm output/*.$(OUTPUT_TYPE) output/*.gcode output/extras/*.stl output/extras/*.gcode