2022-10-07 12:38:34 +00:00
|
|
|
|
|
|
|
PREFIX=intval2
|
|
|
|
|
|
|
|
OPENSCAD=openscad
|
2024-11-12 03:43:45 +00:00
|
|
|
OPENSCAD_OPTIONS_STL=--enable manifold -D VERBOSE=false
|
2023-04-06 03:02:45 +00:00
|
|
|
OPENSCAD_OPTIONS_DXF=-D VERBOSE=false
|
2024-11-12 03:43:45 +00:00
|
|
|
ORDER_STL=python3 ./c14n_stl.py
|
|
|
|
|
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)))\" $<
|
2024-11-12 03:43:45 +00:00
|
|
|
$(ORDER_STL) $@
|
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)))\" $<
|