Something went wrong. Try again.
My Gridfinity models
Something went wrong. Try again.
gridfinity Makefile
2.3 kB · 64 lines
Makefile
at main
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465OPENSCAD := openscad-nightlyIMGSIZE := 1024,768THUMBSIZE := 256,192
.PHONY: all cleanall:
# --- Pegboard Shelf ---
PEGBOARD_SHELF_SIZES_1 := 1 2 3 4 5 6 7 8PEGBOARD_SHELF_SIZES_2 := 1 2 3 4 5 6 7 8PEGBOARD_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.3mfPLASTIC_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)