bolex_rewind_key/Makefile

27 lines
854 B
Makefile
Raw Normal View History

SRC=scad/bolex_rewind_key.scad
IM=convert
OPENSCAD=openscad
2024-10-17 00:16:43 +00:00
OPENSCAD_OPTIONS=-D VERBOSE=false --export-format=asciistl
THEME=DeepOcean
OPENSCAD_IMAGE=--viewall --render --imgsize=512,512 --colorscheme=$(THEME)
ORDER_STL=python3 scad/common/c14n_stl.py
all: bolex_rewind_key bolex_rewind_key_handle
bolex_rewind_key : $(SRC)
echo "Generating $@.stl from $(SRC)..."
$(OPENSCAD) $(OPENSCAD_OPTIONS) -o stl/$@.stl -D PART=\"$@\" $(SRC)
$(ORDER_STL) stl/$@.stl
$(OPENSCAD) $(OPENSCAD_IMAGE) -o img/$@.png -D PART=\"$@\" $(SRC)
$(IM) img/$@.png img/$@.jpg
rm img/$@.png
bolex_rewind_key_handle : $(SRC)
echo "Generating $@.stl from $(SRC)..."
$(OPENSCAD) $(OPENSCAD_OPTIONS) -o stl/$@.stl -D PART=\"$@\" $(SRC)
$(ORDER_STL) stl/$@.stl
$(OPENSCAD) $(OPENSCAD_IMAGE) -o img/$@.png -D PART=\"$@\" $(SRC)
$(IM) img/$@.png img/$@.jpg
rm img/$@.png