SCAD_MODELS = top-keyboard.scad SCAD_INCLUDE = params.scad STL_MODELS = top-keyboard.stl STL_MODEL_PARAM = top-keyboard.json OPENSCAD = /usr/bin/openscad all: $(SCAD_MODELS) $(STL_MODELS) top-keyboard.scad: SCAD_INPUT = top.scad top-outline.scad: SCAD_INPUT = outline.scad $(SCAD_MODELS): $(SCAD_INPUT) $(SCAD_INCLUDE) cat $(SCAD_INCLUDE) $(SCAD_INPUT) > $@ $(STL_MODELS): %.stl: %.scad $(OPENSCAD) $< -o $@ clean: $(RM) $(SCAD_MODELS) $(STL_MODELS)