OPENSCAD := openscad-nightly IMGSIZE := 1024,768 THUMBSIZE := 256,192 .PHONY: all clean all: # --- Pegboard Shelf --- PEGBOARD_SHELF_SIZES_1 := 1 2 3 4 5 6 7 8 PEGBOARD_SHELF_SIZES_2 := 1 2 3 4 5 6 7 8 PEGBOARD_SHELF_SIZES_3 := 1 2 3 4 5 6 7 8 PEGBOARD_SHELF_MODELS := \ $(foreach x,$(PEGBOARD_SHELF_SIZES_1),pegboard-shelf/pegboard-shelf-$(x)x1.3mf) \ $(foreach x,$(PEGBOARD_SHELF_SIZES_2),pegboard-shelf/pegboard-shelf-$(x)x2.3mf) \ $(foreach x,$(PEGBOARD_SHELF_SIZES_3),pegboard-shelf/pegboard-shelf-$(x)x3.3mf) PEGBOARD_SHELF_IMAGES := $(PEGBOARD_SHELF_MODELS:.3mf=.png) PEGBOARD_SHELF_THUMBNAIL := pegboard-shelf.png pegboard-shelf.png: pegboard-shelf.scad Makefile $(OPENSCAD) -o $@ -D 'grid_x=4' -D 'grid_y=2' --autocenter --viewall --imgsize $(THUMBSIZE) --render '' $< pegboard-shelf/pegboard-shelf-%x1.3mf: pegboard-shelf.scad Makefile $(OPENSCAD) -o $@ -D 'grid_x=$*' -D 'grid_y=1' $< pegboard-shelf/pegboard-shelf-%x2.3mf: pegboard-shelf.scad Makefile $(OPENSCAD) -o $@ -D 'grid_x=$*' -D 'grid_y=2' $< pegboard-shelf/pegboard-shelf-%x1.png: pegboard-shelf.scad Makefile $(OPENSCAD) -o $@ -D 'grid_x=$*' -D 'grid_y=1' --autocenter --viewall --imgsize $(IMGSIZE) --render '' $< pegboard-shelf/pegboard-shelf-%x2.png: pegboard-shelf.scad Makefile $(OPENSCAD) -o $@ -D 'grid_x=$*' -D 'grid_y=2' --autocenter --viewall --imgsize $(IMGSIZE) --render '' $< pegboard-shelf/pegboard-shelf-%x3.3mf: pegboard-shelf.scad Makefile $(OPENSCAD) -o $@ -D 'grid_x=$*' -D 'grid_y=3' $< pegboard-shelf/pegboard-shelf-%x3.png: pegboard-shelf.scad Makefile $(OPENSCAD) -o $@ -D 'grid_x=$*' -D 'grid_y=3' --autocenter --viewall --imgsize $(IMGSIZE) --render '' $< # --- Plastic Drawer Bottom --- PLASTIC_DRAWER_BOTTOM_MODEL := plastic-drawer-bottom.3mf PLASTIC_DRAWER_BOTTOM_THUMBNAIL := plastic-drawer-bottom.png plastic-drawer-bottom.3mf: plastic-drawer-bottom.scad Makefile $(OPENSCAD) -o $@ $< plastic-drawer-bottom.png: plastic-drawer-bottom.scad Makefile $(OPENSCAD) -o $@ --autocenter --viewall --imgsize $(THUMBSIZE) --render '' $< # --- Top-level targets --- ALL_OUTPUTS := \ $(PEGBOARD_SHELF_MODELS) $(PEGBOARD_SHELF_IMAGES) $(PEGBOARD_SHELF_THUMBNAIL) \ $(PLASTIC_DRAWER_BOTTOM_MODEL) $(PLASTIC_DRAWER_BOTTOM_THUMBNAIL) all: $(ALL_OUTPUTS) clean: rm -f $(ALL_OUTPUTS)