30 lines
731 B
Makefile
30 lines
731 B
Makefile
PREFIX=/usr
|
|
SHAREDIR=$(PREFIX)/share/models
|
|
PRINT_TEMP=220
|
|
PRINT_BED_TEMP=65
|
|
PRINT_NOZZLE_DIAM=0.4
|
|
PRINT_FILA_DIAM=1.75
|
|
# XXX: Slic2r doesn't always set the bed temperature correctly. fix by specifying it also for the first layer.
|
|
SLIC3R_FLAGS=\
|
|
--temperature $(PRINT_TEMP) \
|
|
--first-layer-temperature $(PRINT_TEMP) \
|
|
--bed-temperature $(PRINT_BED_TEMP) \
|
|
--first-layer-bed-temperature $(PRINT_BED_TEMP) \
|
|
--nozzle-diameter $(PRINT_NOZZLE_DIAM) \
|
|
--filament-diameter $(PRINT_FILA_DIAM)
|
|
|
|
all: build/case.stl build/case.gcode
|
|
|
|
build/%.stl: %.scad *.scad
|
|
mkdir -p build
|
|
openscad $< -o $@
|
|
|
|
%.gcode: %.stl
|
|
slic3r $(SLIC3R_FLAGS) $< -o $@
|
|
|
|
install:
|
|
mkdir -p $(SHAREDIR)
|
|
install -m644 case.stl $(SHAREDIR)
|
|
|
|
.PHONY: all install
|