### -*-makefile-gmake-*- ### ### Build OpenSCAD models ### ### (c) 2022 Mark Wooding ### ###----- Licensing notice --------------------------------------------------- ### ### This program is free software: you can redistribute it and/or modify ### it under the terms of the GNU General Public License as published by ### the Free Software Foundation; either version 3 of the License, or (at ### your option) any later version. ### ### This program is distributed in the hope that it will be useful, but ### WITHOUT ANY WARRANTY; without even the implied warranty of ### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ### General Public License for more details. ### ### You should have received a copy of the GNU General Public License ### along with this program. If not, see . all: ## `Silent-rules' machinery. V = 0 V_AT = $(V_AT).$V V_AT.0 = @ v-tag = $(call v-tag.$V,$1) v-tag.0 = @printf " %-8s %s\n" "$1" "$@"; ## Other configuration. OPENSCAD = openscad ## Main list of models. MODELS += discpick-collar.scad MODELS += discpick-tensioner.scad ## Building models. CLEANFILES += *.stl %.stl: %.scad $(call v-tag,SCAD)$(OPENSCAD) -o$@ -d$*.dep $< STLS = $(MODELS:.scad=.stl) all: $(STLS) ## Dependency file management. CLEANFILES += *.dep DEPS += $(MODELS:.scad=.dep) -include $(DEPS) ## Cleaning up. clean:; rm -f $(CLEANFILES) ###----- That's all, folks --------------------------------------------------