diff options
author | Jonas Gunz <himself@jonasgunz.de> | 2023-07-06 17:56:16 +0200 |
---|---|---|
committer | Jonas Gunz <himself@jonasgunz.de> | 2023-07-06 17:56:16 +0200 |
commit | 98f4d3d694433071ac8cb0b747a3ebc6d6433646 (patch) | |
tree | 73acac001526a577411b2a9a41e29709d6283ad9 /Makefile | |
download | webcam_fmount-98f4d3d694433071ac8cb0b747a3ebc6d6433646.tar.gz |
initial
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..39a3000 --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ +SCAD=openscad + +STLOPTS= --export-format binstl +PNGOPTS= --colorscheme BeforeDawn --viewall --autocenter --imgsize 800,800 \ + --render + +STLDIR = stlout +PNGDIR = pngout + +SRC = $(wildcard *.scad) + +STL = $(addprefix $(STLDIR)/,$(SRC:.scad=.stl)) +PNG = $(addprefix $(PNGDIR)/,$(SRC:.scad=.png)) + +.PHONY: _default +_default: stl + +.PHONY: all +all: clean stl png + +.PHONY: stl +stl: $(STLDIR) $(STL) + +$(STLDIR)/%.stl: %.scad + @echo [ STL ] $< + @$(SCAD) $(STLOPTS) -o $@ $< + +png: $(PNGDIR) $(PNG) + +$(PNGDIR)/%.png: %.scad + @echo [ PNG ] $< + @$(SCAD) $(PNGOPTS) -o $@ $< + +$(PNGDIR): + @mkdir -p $(PNGDIR)/ + +$(STLDIR): + @mkdir -p $(STLDIR)/ + +.PHONY: clean +clean: + @rm -rf $(STLDIR)/ + @rm -rf $(PNGDIR)/ |