Add sort-stl capabilties to makefile for OpenSCAD models

This commit is contained in:
mmcwilliams 2023-04-05 23:35:58 -04:00
parent e5a915ae7c
commit 3cfa2a28a0
1 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,8 @@
PREFIX=intval3
OPENSCAD=openscad
OPENSCAD_OPTIONS=-D VERBOSE=false
OPENSCAD_OPTIONS_STL=--enable sort-stl -D VERBOSE=false
OPENSCAD_OPTIONS_DXF=-D VERBOSE=false
STL=./stl
DXF=./dxf
@ -48,7 +49,7 @@ cleanall:
# Dependencies for models
$(MODELS) : $(STL)/$(PREFIX)_%.stl : $(PREFIX).scad
$(OPENSCAD) $(OPENSCAD_OPTIONS) -o $@ -D MODEL=\"$(subst $(PREFIX)_,,$(subst .stl,,$(@F)))\" $<
$(OPENSCAD) $(OPENSCAD_OPTIONS_STL) -o $@ -D MODEL=\"$(subst $(PREFIX)_,,$(subst .stl,,$(@F)))\" $<
$(LASER) : $(DXF)/$(PREFIX)_%.dxf : $(PREFIX).scad
$(OPENSCAD) $(OPENSCAD_OPTIONS) -o $@ -D LASER=\"$(subst $(PREFIX)_,,$(subst .dxf,,$(@F)))\" $<
$(OPENSCAD) $(OPENSCAD_OPTIONS_DXF) -o $@ -D LASER=\"$(subst $(PREFIX)_,,$(subst .dxf,,$(@F)))\" $<