2022-10-07 12:38:34 +00:00
|
|
|
|
|
|
|
PREFIX=intval2
|
|
|
|
|
|
|
|
OPENSCAD=openscad
|
2023-04-06 03:02:45 +00:00
|
|
|
OPENSCAD_OPTIONS_STL=--enable sort-stl -D VERBOSE=false
|
|
|
|
OPENSCAD_OPTIONS_DXF=-D VERBOSE=false
|
2022-10-07 12:38:34 +00:00
|
|
|
|
|
|
|
STL=../stl
|
|
|
|
DXF=../dxf
|
|
|
|
MODELS=$(shell cat models.txt | tr '\n' ' ')
|
|
|
|
LASER=$(shell cat laser.txt | tr '\n' ' ')
|
|
|
|
|
|
|
|
all: directories models
|
|
|
|
|
|
|
|
directories:
|
|
|
|
mkdir -p $(STL) $(DXF)
|
|
|
|
|
|
|
|
models: directories $(MODELS) $(LASER)
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(STL)/$(PREFIX)_*
|
|
|
|
|
|
|
|
cleanall:
|
|
|
|
rm -rf $(STL)
|
|
|
|
|
|
|
|
# Dependencies for models
|
|
|
|
|
|
|
|
$(MODELS) : $(STL)/$(PREFIX)_%.stl : $(PREFIX).scad
|
2023-04-06 03:02:45 +00:00
|
|
|
$(OPENSCAD) $(OPENSCAD_OPTIONS_STL) -o $@ -D PART=\"$(subst $(PREFIX)_,,$(subst .stl,,$(@F)))\" $<
|
2022-10-07 12:38:34 +00:00
|
|
|
|
|
|
|
$(LASER) : $(DXF)/$(PREFIX)_%.dxf : $(PREFIX).scad
|
2023-04-06 03:02:45 +00:00
|
|
|
$(OPENSCAD) $(OPENSCAD_OPTIONS_DXF) -o $@ -D PART=\"$(subst $(PREFIX)_,,$(subst .dxf,,$(@F)))\" $<
|